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:<ba-add>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[/color][/color][/b]
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
advanced_https_ota_example 仅能收一部分OTA BIN文件
-
- Posts: 16
- Joined: Mon Dec 14, 2020 1:02 pm
Who is online
Users browsing this forum: No registered users and 133 guests