1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > [ 物联网篇 ] ESP32 AWS IoT and Amazon Alexa Development / FreeRTOS平台的Alexa语音助手

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

时间:2021-09-21 21:08:13

相关推荐

[ 物联网篇 ] 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 E (9938) [dspg_utility]: Trigger Acoustic model was not successfully uploaded 0E (9978) [dspg_utility]: No Clock in TDM0 pin - Try number 0E (12338) [dspg_utility]: Trigger Acoustic model was not successfully uploaded 0E (12378) [dspg_utility]: No Clock in TDM0 pin - Try number 0W (14198) httpd_uri: httpd_uri: URI '/rootDesc.xml' not foundW (14198) httpd_txrx: httpd_resp_send_err: 404 Not Found - This URI doesn't existE (14788) [dspg_utility]: Trigger Acoustic model was not successfully uploaded 0E (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 0E (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) loadI (1299) boot: Loaded app from partition at offset 0x20000I (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 E (2661) aws_iot: failed! mbedtls_net_connect returned -0x52E (2661) [http_transport]: Error(-23) connecting to 989dafd-ats.iot.us-east-:8883E (3761) aws_iot: failed! mbedtls_net_connect returned -0x52E (3761) [http_transport]: Error(-23) connecting to 989dafd-ats.iot.us-east-:8883E (4841) aws_iot: failed! mbedtls_net_connect returned -0x52E (4841) [http_transport]: Error(-23) connecting to 989dafd-ats.iot.us-east-:8883[dspg_utility]: Trigger Acoustic model was successfully uploaded>> [dspg_driver]: ASRP User defined delay: 300W (5481) httpd_uri: httpd_uri: URI '/rootDesc.xml' not foundW (5481) httpd_txrx: httpd_resp_send_err: 404 Not Found - This URI doesn't existE (5951) aws_iot: failed! mbedtls_net_connect returned -0x52E (5951) [http_transport]: Error(-23) connecting to 989dafd-ats.iot.us-east-:8883[auth-delegate]: Token will be refreshed after 3000 seconds.E (7031) aws_iot: failed! mbedtls_net_connect returned -0x52E (7031) [http_transport]: Error(-23) connecting to 989dafd-ats.iot.us-east-: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.8Serial port /dev/ttyUSB0Connecting.......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 foundW (64579) httpd_txrx: httpd_resp_send_err: 404 Not Found - This URI doesn't existE (65519) [auth-delegate]: Error! response code: 403, receive ret: 99E (66029) [alexa_auth_delegate]: Registration attempt failed...retrying !E (66029) [alexa_auth_delegate]: Please check connectivity and/or credentialsE (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-","topicRoot":"$aws/alexa"}}

错误的请求

E (26917) [auth-delegate]: Error! response code: 400, receive ret: 79E (27417) [alexa_auth_delegate]: Registration attempt failed...retrying !E (27417) [alexa_auth_delegate]: Please check connectivity and/or credentialsE (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-","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 E (2354) gpio: GPIO34-39 can only be used as input modeE (2364) gpio: gpio_set_level(176): GPIO output gpio_num error

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。