日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

[ 物联网篇 ] ESP32 AWS IoT and Amazon Alexa Development / FreeRTOS平台的Alexa语音助手

發布時間:2023/12/14 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 [ 物联网篇 ] ESP32 AWS IoT and Amazon Alexa Development / FreeRTOS平台的Alexa语音助手 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
AVS to AIA的變化

Build the future of the connected home with AWS IoT and Amazon Alexa

Alexa Voice Service Integration for AWS IoT

開發框架

1. ESP32 與 DSPG 通訊失敗
[http_transport]: Current time in London: Fri Apr 10 06:37:04 2020 E (9938) [dspg_utility]: Trigger Acoustic model was not successfully uploaded 0 E (9978) [dspg_utility]: No Clock in TDM0 pin - Try number 0 E (12338) [dspg_utility]: Trigger Acoustic model was not successfully uploaded 0 E (12378) [dspg_utility]: No Clock in TDM0 pin - Try number 0 W (14198) httpd_uri: httpd_uri: URI '/rootDesc.xml' not found W (14198) httpd_txrx: httpd_resp_send_err: 404 Not Found - This URI doesn't exist E (14788) [dspg_utility]: Trigger Acoustic model was not successfully uploaded 0 E (14828) [dspg_utility]: No Clock in TDM0 pin - Try number 0 [http_transport]: Waiting for authentication token. [http_transport]: Waiting for authentication token. E (17198) [dspg_utility]: Trigger Acoustic model was not successfully uploaded 0 E (17228) [dspg_utility]: No Clock in TDM0 pin - Try number 0其中 可以發現 dspg_utility 的報錯日志
2. Audio ES8311 無法正常工作
  • I2S 工作正常
  • I2C Read Data NO ACK 情況 i2c信號的ACK與NACK
3. ESP32 AWS IOT Connect Fail
I (1237) esp_image: segment 5: paddr=0x003da0d0 vaddr=0x40080400 size=0x1aaf8 (109304) load I (1299) boot: Loaded app from partition at offset 0x20000 I (1299) boot: Disabling RNG early entropy source... [conn_mgr_prov]: Found ssid: Test [conn_mgr_prov]: Found password: test123 [app_main]: Connected with IP Address: 192.168.1.49 [alexa]: Waiting for time to be updated [alexa]: Done getting current time: 1586431887 [alexa]: Authentication done [http_transport]: AWS Account ID: 22343294582284[http_transport]: Client ID: 989dafd-1403-4c33-bdfb-993fc0fd89ef [http_transport]: Current time in London: Thu Apr 9 11:31:28 2020 E (2661) aws_iot: failed! mbedtls_net_connect returned -0x52 E (2661) [http_transport]: Error(-23) connecting to 989dafd-ats.iot.us-east-1.amazonaws.com :8883 E (3761) aws_iot: failed! mbedtls_net_connect returned -0x52 E (3761) [http_transport]: Error(-23) connecting to 989dafd-ats.iot.us-east-1.amazonaws.com :8883 E (4841) aws_iot: failed! mbedtls_net_connect returned -0x52 E (4841) [http_transport]: Error(-23) connecting to 989dafd-ats.iot.us-east-1.amazonaws.com :8883 [dspg_utility]: Trigger Acoustic model was successfully uploaded>> [dspg_driver]: ASRP User defined delay: 300 W (5481) httpd_uri: httpd_uri: URI '/rootDesc.xml' not found W (5481) httpd_txrx: httpd_resp_send_err: 404 Not Found - This URI doesn't exist E (5951) aws_iot: failed! mbedtls_net_connect returned -0x52 E (5951) [http_transport]: Error(-23) connecting to 989dafd-ats.iot.us-east-1.amazonaws.com :8883 [auth-delegate]: Token will be refreshed after 3000 seconds. E (7031) aws_iot: failed! mbedtls_net_connect returned -0x52 E (7031) [http_transport]: Error(-23) connecting to 989dafd-ats.iot.us-east-1.amazonaws.com :8883

參考 RT thread mqtt 使用TLS組件時出問題

對比mfg.bin文件的差異 :

阿里云設備接入Link Kit SDK常見問題列表

解決方案:

4. ESP32 燒錄工具的使用

  • 使用的燒錄工具為V3.6.6
串口沖突
? ais_sdk git:(master) ? ./build_flash.sh esptool.py v2.8 Serial port /dev/ttyUSB0 Connecting....... Traceback (most recent call last):File "/home/mike/Work/ESP32/ESP32_AIA/ais_sdk/tools/esptool.py", line 3201, in <module>_main()File "/home/mike/Work/ESP32/ESP32_AIA/ais_sdk/tools/esptool.py", line 3194, in _mainmain()File "/home/mike/Work/ESP32/ESP32_AIA/ais_sdk/tools/esptool.py", line 2890, in mainesp.connect(args.before)File "/home/mike/Work/ESP32/ESP32_AIA/ais_sdk/tools/esptool.py", line 475, in connectlast_error = self._connect_attempt(mode=mode, esp32r0_delay=False)File "/home/mike/Work/ESP32/ESP32_AIA/ais_sdk/tools/esptool.py", line 455, in _connect_attemptself.sync()File "/home/mike/Work/ESP32/ESP32_AIA/ais_sdk/tools/esptool.py", line 394, in synctimeout=SYNC_TIMEOUT)File "/home/mike/Work/ESP32/ESP32_AIA/ais_sdk/tools/esptool.py", line 347, in commandp = self.read()File "/home/mike/Work/ESP32/ESP32_AIA/ais_sdk/tools/esptool.py", line 292, in readreturn next(self._slip_reader)File "/home/mike/Work/ESP32/ESP32_AIA/ais_sdk/tools/esptool.py", line 2041, in slip_readerread_bytes = port.read(1 if waiting == 0 else waiting)File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 501, in read'device reports readiness to read but returned no data ' serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
授權失敗
W (64579) httpd_uri: httpd_uri: URI '/rootDesc.xml' not found W (64579) httpd_txrx: httpd_resp_send_err: 404 Not Found - This URI doesn't exist E (65519) [auth-delegate]: Error! response code: 403, receive ret: 99 E (66029) [alexa_auth_delegate]: Registration attempt failed...retrying ! E (66029) [alexa_auth_delegate]: Please check connectivity and/or credentials E (66029) [alexa_auth_delegate]: In case of authentication failure try resetting the device to factory mode and restart provisioning [alexa_auth_delegate]: Registration Request Buffer: {"authentication":{"token":"Atzr|IwEBILWJyLsYkiW9huVjML9dFXTJXlRfc7fxAhd_EP7GMMMMS9kroOSjEVso9UDp3uXE4r2YroftrYks9pMBKSsjeaF52ikO8gk_B70CMy9-mY5C2YZ50oJqlwuaXnwZzr7Z6tbAOnIMU7E7W-tv5czapBAheKPsyFVMfAHuGqXL7yupu7udW8jzNATlfkoyVxbylbmOiTNXxeZZf8SzGZL7HhIzFidbQLIPwp9EIQg581y00ZN_FpbEhfLycy63UZ9hdffNGizJo0dJqFLQI7dVsGlh0IQJDueZuk2MrcabBJrPD4ui94xwm189ueTzWmfatvKkSNQXAL0V80PMVScs5FdXswQSOGwsn7WD7RR3Lsa5OumSNxAp408zZVhmzyAZBqX2piiEnYJdagnF-mCRUuF8C341NvDY63ImajHbF1pfvsm4BdTp2qjGj21sUu3mW_A", "clientId":"amzn1.application-oa2-client.320d0c28204541e4a061b7aff8e7d1b9"},"encryption":{"algorithm":"ECDH_CURVE_25519_32_BYTE", "publicKey":"9WhtDty/F8WnRmSTGbaDbnMFT05PND6EQbW35IBssVc="},"iot":{"awsAccountId":"222294582284", "clientId":"9f4bc610-8de1-4b5c-816e-fb1a412841da","endpoint":"a39yhypxjgqgon-ats.iot.us-east-1.amazonaws.com","topicRoot":"$aws/alexa"}}
錯誤的請求
E (26917) [auth-delegate]: Error! response code: 400, receive ret: 79 E (27417) [alexa_auth_delegate]: Registration attempt failed...retrying ! E (27417) [alexa_auth_delegate]: Please check connectivity and/or credentials E (27417) [alexa_auth_delegate]: In case of authentication failure try resetting the device to factory mode and restart provisioning [alexa_auth_delegate]: Registration Request Buffer: {"authentication":{"token":"Atzr|IwEBIKKaDpzjjNC-N-o3Cvb-fB6YbE5ER4Aj7pDvl3Q584jGEK5FTuabXVeThNaIhExnP3Umt_HZ6AtTLjr4tIXZyv4bI6HMJgJxIkMFBtNel1DKVfBbuWLDpw2y1ydffkQmuGOJgiPaDA_6MAl-Gozvv3feIP3ll7MEwcpG39r41ejqzMx-mH-qIO63Ic-s3hIb6HliCGt698HomsJePLJrxKThglVwk05DzQCuH9117ZGVkrUQYqaiQOSFhQ1jdFmXAbEGhP11Fk9F7BaZKLD85fZTl5sglDtH5UPoAatteFClglxI70ys6DC0LgG4SZj-VDlI6fPkJQeRkJcpC-pIy6ofMShamCwgcpt0AjsM2HYlyu2wx6Rh56gc5Et_pHXlqFOxTrErysOkGSRQ1QQ6MC-Q827ZtYUXNTYAGd5cZiiq9JLzF5eyFB0JNTmb4bJ-r_-hmzo2NMUOaId5-W8Pttzm", "clientId":"amzn1.application-oa2-client.320d0c28204541e4a061b7aff8e7d1b9"},"encryption":{"algorithm":"ECDH_CURVE_25519_32_BYTE", "publicKey":"Fu/lTve99rChIC2huORb/1so+xt9s4q0719DsDi1Mxk="},"iot":{"awsAccountId":"222294582284", "clientId":"amzn1.application-oa2-client.3491a05ca7e54afeab47007809a844a5 ","endpoint":"a39yhypxjgqgon-ats.iot.us-east-1.amazonaws.com","topicRoot":"$aws/alexa"}}
  • Also there seems to be a <new_line> at the end of your client ID. Can you remove that and try?
  • This current client ID might be too long.

由于device.info 中多了一行導致的異常,正常如下 :

修改這種配置文件,用vim打開保存之后會修改之前的格式,建議用VS Code修改

  • GPIO 異常
[alexa]: Authentication done [http_transport]: AWS Account ID: 282183071650 [http_transport]: Client ID: 9d8dff38-4773-4ed9-81e6-ba829da47baf [http_transport]: Current time in London: Tue Apr 21 09:49:33 2020 E (2354) gpio: GPIO34-39 can only be used as input mode E (2364) gpio: gpio_set_level(176): GPIO output gpio_num error

總結

以上是生活随笔為你收集整理的[ 物联网篇 ] ESP32 AWS IoT and Amazon Alexa Development / FreeRTOS平台的Alexa语音助手的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。