完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
ESP32-C6跑ESP-IDF5.1.1下advanced_https_ota_example范例出现如下问题,请问如何解决?
连接Https server后,刚开始能下载一部分OTA BIN文件,后续仍在loop里调用esp_https_ota_perform(https_ota_handle),但get不到数据。 logo如下: I (4046) wifi:[ADDBA]RX addba response, status:0, tid:5/tb:1(0xa1), bufsize:64, batimeout:0, txa_wnd:64 I (5056) esp_netif_handlers: example_netif_sta ip: 192.168.6.105, mask: 255.255.255.0, gw: 192.168.6.1 I (5056) example_connect: Got IPv4 event: Interface "example_netif_sta" address: 192.168.6.105 I (5506) example_connect: Got IPv6 event: Interface "example_netif_sta" address: fe80:0000:0000:0000:424c:caff:fe40:a74c, type: ESP_IP6_ADDR_IS_LINK_LOCAL I (5506) example_common: Connected to example_netif_sta I (5516) example_common: - IPv4 address: 192.168.6.105, I (5516) example_common: - IPv6 address: fe80:0000:0000:0000:424c:caff:fe40:a74c, type: ESP_IP6_ADDR_IS_LINK_LOCAL I (5526) wifi:Set ps type: 0, coexist: 0 I (5536) advanced_https_ota_example: Starting Advanced OTA example I (5536) advanced_https_ota_example: OTA started I (5546) main_task: Returned from app_main() W (5636) wifi:idx:0, ifx:0, tid:0, TAHI:0x100324a, TALO:0x412934cc, (ssn:436, win:64, cur_ssn:436), CONF:0xc0000005 I (6036) advanced_https_ota_example: Connected to server I (6036) esp_https_ota: Starting OTA... I (6036) esp_https_ota: Writing to partition subtype 17 at offset 0x190000 I (6046) advanced_https_ota_example: Reading Image Description I (6046) advanced_https_ota_example: Running validate_image_header I (6056) advanced_https_ota_example: Running firmware version: 1 I (6066) advanced_https_ota_example: Begin to esp_https_ota_perform I (6066) advanced_https_ota_example: Verifying chip id of new image: 13 I (6116) advanced_https_ota_example: Image bytes read: 1024 I (6116) advanced_https_ota_example: Begin to esp_https_ota_perform I (6116) advanced_https_ota_example: Image bytes read: 2048 I (6126) advanced_https_ota_example: Begin to esp_https_ota_perform I (6136) advanced_https_ota_example: Image bytes read: 3072 I (6136) advanced_https_ota_example: Begin to esp_https_ota_perform I (6176) advanced_https_ota_example: Image bytes read: 4096 I (6176) advanced_https_ota_example: Begin to esp_https_ota_perform I (6216) advanced_https_ota_example: Image bytes read: 5120 I (6216) advanced_https_ota_example: Begin to esp_https_ota_perform I (6216) advanced_https_ota_example: Image bytes read: 6144 I (6226) advanced_https_ota_example: Begin to esp_https_ota_perform I (6236) advanced_https_ota_example: Image bytes read: 7168 I (6236) advanced_https_ota_example: Begin to esp_https_ota_perform I (6286) advanced_https_ota_example: Image bytes read: 8192 I (6286) advanced_https_ota_example: Begin to esp_https_ota_perform I (6326) advanced_https_ota_example: Image bytes read: 9216 I (6326) advanced_https_ota_example: Begin to esp_https_ota_perform I (6326) advanced_https_ota_example: Image bytes read: 10240 I (6336) advanced_https_ota_example: Begin to esp_https_ota_perform I (6346) advanced_https_ota_example: Image bytes read: 11264 I (6346) advanced_https_ota_example: Begin to esp_https_ota_perform I (6396) advanced_https_ota_example: Image bytes read: 12288 I (6396) advanced_https_ota_example: Begin to esp_https_ota_perform I (6436) advanced_https_ota_example: Image bytes read: 13312 I (6436) advanced_https_ota_example: Begin to esp_https_ota_perform I (6436) advanced_https_ota_example: Image bytes read: 14336 I (6446) advanced_https_ota_example: Begin to esp_https_ota_perform I (6456) advanced_https_ota_example: Image bytes read: 15360 I (6456) advanced_https_ota_example: Begin to esp_https_ota_perform I (6466) advanced_https_ota_example: Image bytes read: 15953 I (6466) advanced_https_ota_example: Begin to esp_https_ota_perform I (11486) advanced_https_ota_example: Image bytes read: 15953 I (11486) advanced_https_ota_example: Begin to esp_https_ota_perform I (16496) advanced_https_ota_example: Image bytes read: 15953 I (16496) advanced_https_ota_example: Begin to esp_https_ota_perform 提高log输出级别后,发现原因是在调用 data_read = esp_http_client_read()一段时间后,其返回值会变成总是data_read == -ESP_ERR_HTTP_EAGAIN。 D (9223) event: running post ESP_HTTPS_OTA_EVENT:5 with handler 0x42009fce and context 0x4087f454 on loop 0x4087e508 D (9243) advanced_https_ota_example: Writing to flash: 14336 written I (9243) advanced_https_ota_example: Image bytes read: 14336 I (9253) advanced_https_ota_example: Begin to esp_https_ota_perform D (9253) HTTP_CLIENT: is_data_remain=1, is_chunked=1hhd, content_length=-1 D (9263) transport_base: remain data in cache, need to read again D (9273) HTTP_CLIENT: need_read=1024, byte_to_read=512, rlen=512, ridx=0 D (9273) HTTP_CLIENT: http_on_body 512 D (9283) event: no handlers have been registered for event ESP_HTTP_CLIENT_EVENT:4 posted to loop 0x4087e508 D (9293) HTTP_CLIENT: is_data_remain=1, is_chunked=1hhd, content_length=-1 D (9303) transport_base: remain data in cache, need to read again D (9303) HTTP_CLIENT: need_read=512, byte_to_read=512, rlen=512, ridx=512 D (9313) HTTP_CLIENT: http_on_body 512 D (9313) event: no handlers have been registered for event ESP_HTTP_CLIENT_EVENT:4 posted to loop 0x4087e508 D (9333) esp_https_ota: Written image length 15360 D (9333) event: running post ESP_HTTPS_OTA_EVENT:5 with handler 0x42009fce and context 0x4087f454 on loop 0x4087e508 D (9343) advanced_https_ota_example: Writing to flash: 15360 written I (9343) advanced_https_ota_example: Image bytes read: 15360 I (9353) advanced_https_ota_example: Begin to esp_https_ota_perform D (9363) HTTP_CLIENT: is_data_remain=1, is_chunked=1hhd, content_length=-1 D (9363) transport_base: remain data in cache, need to read again D (9373) HTTP_CLIENT: need_read=1024, byte_to_read=512, rlen=512, ridx=0 D (9383) HTTP_CLIENT: http_on_body 512 D (9383) event: no handlers have been registered for event ESP_HTTP_CLIENT_EVENT:4 posted to loop 0x4087e508 D (9393) HTTP_CLIENT: is_data_remain=1, is_chunked=1hhd, content_length=-1 D (9403) transport_base: remain data in cache, need to read again D (9403) HTTP_CLIENT: need_read=512, byte_to_read=512, rlen=81, ridx=512 D (9413) HTTP_CLIENT: http_on_body 81 D (9413) event: no handlers have been registered for event ESP_HTTP_CLIENT_EVENT:4 posted to loop 0x4087e508 D (9423) HTTP_CLIENT: is_data_remain=1, is_chunked=1hhd, content_length=-1 D (9433) HTTP_CLIENT: need_read=431, byte_to_read=431, rlen=-1, ridx=593 D (9443) esp_https_ota: Written image length 15953 D (9443) event: running post ESP_HTTPS_OTA_EVENT:5 with handler 0x42009fce and context 0x4087f454 on loop 0x4087e508 D (9453) advanced_https_ota_example: Writing to flash: 15953 written I (9463) advanced_https_ota_example: Image bytes read: 15953 I (9473) advanced_https_ota_example: Begin to esp_https_ota_perform[0m D (9473) HTTP_CLIENT: is_data_remain=1, is_chunked=1hhd, content_length=-1 V (14493) transport_base: poll_read: select - Timeout before any socket was ready! D (14493) HTTP_CLIENT: need_read=1024, byte_to_read=512, rlen=0, ridx=0 D (14493) HTTP_CLIENT: Connection timed out before data was ready! D (14493) esp_https_ota: ESP_ERR_HTTP_EAGAIN invoked: Call timed out before data was ready I (14503) advanced_https_ota_example: Image bytes read: 15953 I (14513) advanced_https_ota_example: Begin to esp_https_ota_perform D (14523) HTTP_CLIENT: is_data_remain=1, is_chunked=1hhd, content_length=-1 V (19533) transport_base: poll_read: select - Timeout before any socket was ready! D (19533) HTTP_CLIENT: need_read=1024, byte_to_read=512, rlen=0, ridx=0 D (19533) HTTP_CLIENT: Connection timed out before data was ready! D (19533) esp_https_ota: ESP_ERR_HTTP_EAGAIN invoked: Call timed out before data was ready I (19543) advanced_https_ota_example: Image bytes read: 15953 I (19553) advanced_https_ota_example: Begin to esp_https_ota_perform D (19563) HTTP_CLIENT: is_data_remain=1, is_chunked=1hhd, content_length=-1 V (24573) transport_base: poll_read: select - Timeout before any socket was ready! D (24573) HTTP_CLIENT: need_read=1024, byte_to_read=512, rlen=0, ridx=0 D (24573) HTTP_CLIENT: Connection timed out before data was ready! D (24573) esp_https_ota: ESP_ERR_HTTP_EAGAIN invoked: Call timed out before data was ready I (24583) advanced_https_ota_example: Image bytes read: 15953 I (24593) advanced_https_ota_example: Begin to esp_https_ota_perform D (24603) HTTP_CLIENT: is_data_remain=1, is_chunked=1hhd, content_length=-1 V (29613) transport_base: poll_read: select - Timeout before any socket was ready! D (29613) HTTP_CLIENT: need_read=1024, byte_to_read=512, rlen=0, ridx=0 D (29613) HTTP_CLIENT: Connection timed out before data was ready! D (29613) esp_https_ota: ESP_ERR_HTTP_EAGAIN invoked: Call timed out before data was ready I (29623) advanced_https_ota_example: Image bytes read: 15953 I (29633) advanced_https_ota_example: Begin to esp_https_ota_perform D (29643) HTTP_CLIENT: is_data_remain=1, is_chunked=1hhd, content_length=-1 V (34653) transport_base: poll_read: select - Timeout before any socket was ready! D (34653) HTTP_CLIENT: need_read=1024, byte_to_read=512, rlen=0, ridx=0 D (34653) HTTP_CLIENT: Connection timed out before data was ready! D (34653) esp_https_ota: ESP_ERR_HTTP_EAGAIN invoked: Call timed out before data was ready I (34663) advanced_https_ota_example: Image bytes read: 15953 I (34673) advanced_https_ota_example: Begin to esp_https_ota_perform |
|
相关推荐
1个回答
|
|
根据您提供的信息,问题可能出在HTTPS OTA更新过程中。以下是一些建议来解决这个问题:
1. 检查HTTPS服务器:确保您的HTTPS服务器正常运行,并且OTA BIN文件的URL是正确的。如果可能的话,尝试使用其他设备访问该URL以确认其有效性。 2. 检查网络连接:确保ESP32-C6设备与您的WiFi网络连接正常。您可以通过以下命令在ESP-IDF中检查网络连接状态: ``` esp_netif_get_ip_info(esp_netif_get_handle("WIFI_STA_DEF"), &ip_info); ``` 3. 检查OTA固件大小:确保您的OTA固件大小适合ESP32-C6设备的闪存容量。如果固件太大,可能会导致下载过程中出现问题。 4. 检查ESP-IDF版本:虽然您使用的是ESP-IDF 5.1.1版本,但建议您检查是否有更新的版本或适用于ESP32-C6的特定版本。更新ESP-IDF可能会解决一些已知的问题。 5. 检查示例代码:检查advanced_https_ota_example示例代码是否有任何错误或需要修改的地方。确保所有配置和参数都是正确的。 6. 调试和日志:在示例代码中添加更多的日志输出,以便更好地了解问题发生的位置。您可以使用`esp_log_level_set()`函数来设置日志级别,以便在调试过程中获得更多信息。 7. 检查ESP32-C6设备:确保您的ESP32-C6设备没有硬件问题。如果可能的话,尝试使用其他ESP32-C6设备进行测试。 |
|
|
|
只有小组成员才能发言,加入小组>>
1138 浏览 1 评论
576浏览 6评论
477浏览 5评论
有没有办法在不使用混杂模式的情况下实现Wifi驱动程序接收缓冲区访问中断呢?
461浏览 5评论
462浏览 4评论
435浏览 4评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 11:20 , Processed in 0.691918 second(s), Total 48, Slave 42 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号