Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

advanced https ota failed oftenly (IDFGH-2249) #4394

Closed
huazhenjiang opened this issue Nov 25, 2019 · 25 comments
Closed

advanced https ota failed oftenly (IDFGH-2249) #4394

huazhenjiang opened this issue Nov 25, 2019 · 25 comments

Comments

@huazhenjiang
Copy link

Environment:

Development Kit: ESP32-DevKitC
Kit version (for WroverKit/PicoKit/DevKitC): v2
Module or chip used: ESP32-WROOM-32
IDF version (run git describe --tags to find it): v4.0-released
Operating System: Windows 10
Power Supply: USB

###Problem Description
I try the advanced https ota example to test ota . And I observer the ota procedure get low success rate. The ota get success sometimes, but worse oftenly. The following show the log :

###Expected Behavior
ota successful oftenly
###Actual Behavior
ota failed oftenly
###Steps to repropduce
Just copy a pem of https server and run the advanced https ota example
###Code to reproduce this issue
none.

###Debug Logs
I (1990) wifi: new:<11,2>, old:<1,0>, ap:<255,255>, sta:<11,2>, prof:1
I (2960) wifi: state: init -> auth (b0)
I (2970) wifi: state: auth -> assoc (0)
I (2970) wifi: state: assoc -> run (10)
I (2980) wifi: connected with test, channel 11, 40D, bssid = 78:44:76:f8:b4:44
I (2990) wifi: pm start, type: 1

I (5110) tcpip_adapter: sta ip: 192.168.200.18, mask: 255.255.255.0, gw: 192.168.200.1
I (5110) example_connect: Connected to test
I (5110) example_connect: IPv4 address: 192.168.200.18
I (5120) example_connect: IPv6 address: fe80:0000:0000:0000:266f:28ff:fed7:a8f4
I (5130) advanced_https_ota_example: Starting Advanced OTA example

I (12030) esp_https_ota: Starting OTA...
I (12030) esp_https_ota: Writing to partition subtype 16 at offset 0x110000
I (15450) advanced_https_ota_example: Running firmware version: 1.1.5-3-gebd9eab-dirty
E (23230) esp-tls: read error :-76:
E (23230) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
E (213020) esp-tls: read error :-76:
E (213020) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
E (259580) esp-tls: read error :-76:
E (259580) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
E (264660) esp-tls: read error :-76:
E (264660) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
E (319000) esp-tls: read error :-76:
E (319000) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
E (336510) esp-tls: read error :-76:
E (336510) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
I (341510) esp_https_ota: Connection closed, all data received
I (341510) esp_image: segment 0: paddr=0x00110020 vaddr=0x3f400020 size=0x2c480 (181376) map
I (341650) esp_image: segment 1: paddr=0x0013c4a8 vaddr=0x3ffb0000 size=0x03540 ( 13632)
I (341660) esp_image: segment 2: paddr=0x0013f9f0 vaddr=0x40080000 size=0x00400 ( 1024)
0x40080000: _WindowOverflow4 at /home/huazhen/Work/mmwave-esp32/esp-idf/components/freertos/xtensa_vectors.S:1778

I (341660) esp_image: segment 3: paddr=0x0013fdf8 vaddr=0x40080400 size=0x00218 ( 536)
I (341670) esp_image: segment 4: paddr=0x00140018 vaddr=0x400d0018 size=0xb96fc (759548) map
0x400d0018: _stext at ??:?

E (342250) esp_image: invalid segment length 0xffffffff
E (342260) advanced_https_ota_example: ESP_HTTPS_OTA upgrade failed...
I (343260) wifi: state: run -> init (0)
I (343260) wifi: pm stop, total sleep time: 299923894 us / 340271911 us

I (343260) wifi: new:<11,0>, old:<11,2>, ap:<255,255>, sta:<11,2>, prof:1
I (343270) example_connect: Wi-Fi disconnected, trying to reconnect...
E (343270) wifi: esp_wifi_connect 1151 wifi not start
ESP_ERROR_CHECK failed: esp_err_t 0x3002 (ESP_ERR_WIFI_NOT_STARTED)I (343280) wifi: flush txq
I (343280) wifi: stop sw txq
I (343290) wifi: lmac stop hw txq
I (12) boot: ESP-IDF 1.1.5-3-gebd9eab-dirty 2nd stage bootloader
I (12) boot: compile time 10:00:50
I (12) boot: Enabling RNG early entropy source...
I (17) boot: SPI Speed : 40MHz
I (21) boot: SPI Mode : DIO
I (25) boot: SPI Flash Size : 4MB
I (29) boot: Partition Table:
I (33) boot: ## Label Usage Type ST Offset Length
I (40) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (47) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (55) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (62) boot: 3 factory factory app 00 00 00010000 00100000
I (70) boot: 4 ota_0 OTA app 00 10 00110000 00100000
I (77) boot: 5 ota_1 OTA app 00 11 00210000 00100000
I (85) boot: End of partition table
I (89) boot: Defaulting to factory image
I (94) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1dafc (121596) map
I (146) esp_image: segment 1: paddr=0x0002db24 vaddr=0x3ffb0000 size=0x024ec ( 9452) load
I (150) esp_image: segment 2: paddr=0x00030018 vaddr=0x400d0018 size=0x8eb04 (584452) map
0x400d0018: _stext at ??:?

I (362) esp_image: segment 3: paddr=0x000beb24 vaddr=0x3ffb24ec size=0x00d60 ( 3424) load
I (363) esp_image: segment 4: paddr=0x000bf88c vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at /home/huazhen/Work/mmwave-esp32/esp-idf/components/freertos/xtensa_vectors.S:1778

I (369) esp_image: segment 5: paddr=0x000bfc94 vaddr=0x40080400 size=0x1036c ( 66412) load
I (415) boot: Loaded app from partition at offset 0x10000
I (416) boot: Disabling RNG early entropy source...

@github-actions github-actions bot changed the title advanced https ota failed oftenly advanced https ota failed oftenly (IDFGH-2249) Nov 25, 2019
@mahavirj
Copy link
Member

@huazhenjiang

  • How often do you see this issue?
  • Can you please share more details on server setup? Is it based on openssl, if not then does it support chunked-encoding?
  • Is it possible to try with IDF master branch and see if it has similar behavior?
  • Can you please share log after enabling debug from logging component config?

@huazhenjiang
Copy link
Author

@mahavirj

I try 101 times and 22 of that failed. The target server is on amazon s3, I do not know that did it support chunked-encoding actually.

The following log show more detail. It looks like the ota procedure read a part of data and after that can not read anymore.

D (66873) esp_https_ota: Written image length 277570
D (66873) advanced_https_ota_example: Image bytes read: 277570
D (66883) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (66883) HTTP_CLIENT: need_read=512, byte_to_read=512, rlen=512, ridx=0
D (66893) HTTP_CLIENT: http_on_body 512
D (66903) esp_https_ota: Written image length 278082
D (66903) advanced_https_ota_example: Image bytes read: 278082
D (66903) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (66913) HTTP_CLIENT: need_read=512, byte_to_read=512, rlen=360, ridx=0
D (66923) HTTP_CLIENT: http_on_body 360
D (66923) HTTP_CLIENT: is_data_remain=1, is_chunked=0
W (81523) mbedtls: ssl_tls.c:5031 mbedtls_ssl_fetch_input() returned -26624 (-0x6800)

W (81523) mbedtls: ssl_tls.c:4350 ssl_get_next_record() returned -26624 (-0x6800)

W (81523) mbedtls: ssl_tls.c:8341 mbedtls_ssl_read_record() returned -26624 (-0x6800)

E (81533) esp-tls: read error :-26624:
E (81543) TRANS_SSL: esp_tls_conn_read error, errno=Success
D (81543) HTTP_CLIENT: need_read=152, byte_to_read=152, rlen=-26624, ridx=360
D (81563) esp_https_ota: Written image length 278442
D (81563) advanced_https_ota_example: Image bytes read: 278442
D (81563) HTTP_CLIENT: is_data_remain=1, is_chunked=0
W (93193) mbedtls: ssl_tls.c:5031 mbedtls_ssl_fetch_input() returned -26624 (-0x6800)

W (93193) mbedtls: ssl_tls.c:4350 ssl_get_next_record() returned -26624 (-0x6800)

W (93193) mbedtls: ssl_tls.c:8341 mbedtls_ssl_read_record() returned -26624 (-0x6800)

E (93203) esp-tls: read error :-26624:
E (93213) TRANS_SSL: esp_tls_conn_read error, errno=Success
D (93213) HTTP_CLIENT: need_read=512, byte_to_read=512, rlen=-26624, ridx=0
I (93233) esp_https_ota: Connection closed, all data received
D (93233) esp_image: reading image header @ 0x110000
D (93233) esp_image: image header: 0xe9 0x06 0x02 0x02 4008138c
V (93243) esp_image: loading segment header 0 at offset 0x110018
V (93243) esp_image: segment data length 0x2c480 data starts 0x110020
V (93253) esp_image: segment 0 map_segment 1 segment_data_offs 0x110020 load_addr 0x3f400020
I (93263) esp_image: segment 0: paddr=0x00110020 vaddr=0x3f400020 size=0x2c480 (181376) map
D (93273) esp_image: free data page_count 0x0000003d
V (93413) esp_image: loading segment header 1 at offset 0x13c4a0
V (93413) esp_image: segment data length 0x3540 data starts 0x13c4a8
V (93413) esp_image: segment 1 map_segment 0 segment_data_offs 0x13c4a8 load_addr 0x3ffb0000
I (93423) esp_image: segment 1: paddr=0x0013c4a8 vaddr=0x3ffb0000 size=0x03540 ( 13632)
D (93433) esp_image: free data page_count 0x0000003d
V (93443) esp_image: loading segment header 2 at offset 0x13f9e8
V (93443) esp_image: segment data length 0x400 data starts 0x13f9f0
V (93453) esp_image: segment 2 map_segment 0 segment_data_offs 0x13f9f0 load_addr 0x40080000
0x40080000: _WindowOverflow4 at /home/peter/Work/ESP32/Bitbucket/mmwave-esp32/esp-idf/components/freertos/xtensa_vectors.S:1778

@enricop
Copy link

enricop commented Nov 27, 2019

which toolchain are you using? tls issues should be solved in 2019r2

@huazhenjiang
Copy link
Author

@enricop

how to check the toolchain version?
I download from here.(https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_2_0-esp32-2019r1-linux-amd64.tar.gz)

@enricop
Copy link

enricop commented Nov 27, 2019

@huazhenjiang
Copy link
Author

huazhenjiang commented Nov 28, 2019

@enricop

So is that the root cause which causing the ota failed?(the old toolchain version). Are there no need to modify or upgrade the esp-idf version? (v4.0-released now).
After I switch the toolchain (2019r2) only and keep testing. The ota still work not good.

Here is the log with 'debug' levle:

--- idf_monitor on /dev/ttyUSB0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
00001000
I (�ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6524
load:0x40078000,len:13784
load:0x40080400,len:4260
entry 0x400806e4
I (28) boot: ESP-IDF 1.1.6-2-gc98ff9b-dirty 2nd stage bootloader
I (29) boot: compile time 10:23:29
I (29) boot: Enabling RNG early entropy source...
I (35) boot: SPI Speed : 40MHz
I (39) boot: SPI Mode : DIO
I (43) boot: SPI Flash Size : 4MB
I (47) boot: Partition Table:
I (50) boot: ## Label Usage Type ST Offset Length
I (58) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (65) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (73) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (80) boot: 3 factory factory app 00 00 00010000 00100000
I (87) boot: 4 ota_0 OTA app 00 10 00110000 00100000
I (95) boot: 5 ota_1 OTA app 00 11 00210000 00100000
I (102) boot: End of partition table
I (107) boot: Defaulting to factory image
I (111) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x222b4 (139956) map
I (170) esp_image: segment 1: paddr=0x000322dc vaddr=0x3ffb0000 size=0x0324c ( 12876) load
I (176) esp_image: segment 2: paddr=0x00035530 vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at /home/huazhen/Work/mmwave-esp32/esp-idf/components/freertos/xtensa_vectors.S:1778

I (178) esp_image: segment 3: paddr=0x00035938 vaddr=0x40080400 size=0x0a6d8 ( 42712) load
I (204) esp_image: segment 4: paddr=0x00040018 vaddr=0x400d0018 size=0x91da8 (597416) map
0x400d0018: _stext at ??:?

I (418) esp_image: segment 5: paddr=0x000d1dc8 vaddr=0x4008aad8 size=0x05cd0 ( 23760) load
0x4008aad8: ieee80211_output_process at ??:?

I (439) boot: Loaded app from partition at offset 0x10000
I (439) boot: Disabling RNG early entropy source...
I (439) cpu_start: Pro cpu up.
I (443) cpu_start: Application information:
I (448) cpu_start: Project name: advanced_https_ota
I (453) cpu_start: App version: 1.1.6-2-gc98ff9b-dirty
I (460) cpu_start: Compile time: Nov 28 2019 10:23:53
I (466) cpu_start: ELF file SHA256: 2c2b6aa96111f440...
I (472) cpu_start: ESP-IDF: 1.1.6-2-gc98ff9b-dirty
I (478) cpu_start: Starting app cpu, entry point is 0x4008128c
0x4008128c: call_start_cpu1 at /home/huazhen/Work/mmwave-esp32/esp-idf/components/esp32/cpu_start.c:272

I (0) cpu_start: App cpu up.
D (488) memory_layout: Checking 7 reserved memory ranges:
D (494) memory_layout: Reserved memory range 0x3ffae000 - 0x3ffae6e0
D (500) memory_layout: Reserved memory range 0x3ffb0000 - 0x3ffb9420
D (506) memory_layout: Reserved memory range 0x3ffe0000 - 0x3ffe0440
D (513) memory_layout: Reserved memory range 0x3ffe3f20 - 0x3ffe4350
D (519) memory_layout: Reserved memory range 0x40070000 - 0x40078000
D (526) memory_layout: Reserved memory range 0x40078000 - 0x40080000
0x40080000: _WindowOverflow4 at /home/huazhen/Work/mmwave-esp32/esp-idf/components/freertos/xtensa_vectors.S:1778

D (532) memory_layout: Reserved memory range 0x40080000 - 0x400907a5
0x40080000: _WindowOverflow4 at /home/huazhen/Work/mmwave-esp32/esp-idf/components/freertos/xtensa_vectors.S:1778

D (539) memory_layout: Building list of available memory regions:
D (545) memory_layout: Available memory region 0x3ffae6e0 - 0x3ffb0000
D (551) memory_layout: Available memory region 0x3ffb9420 - 0x3ffc0000
D (558) memory_layout: Available memory region 0x3ffc0000 - 0x3ffc2000
D (564) memory_layout: Available memory region 0x3ffc2000 - 0x3ffc4000
D (571) memory_layout: Available memory region 0x3ffc4000 - 0x3ffc6000
D (578) memory_layout: Available memory region 0x3ffc6000 - 0x3ffc8000
D (584) memory_layout: Available memory region 0x3ffc8000 - 0x3ffca000
D (591) memory_layout: Available memory region 0x3ffca000 - 0x3ffcc000
D (597) memory_layout: Available memory region 0x3ffcc000 - 0x3ffce000
D (604) memory_layout: Available memory region 0x3ffce000 - 0x3ffd0000
D (611) memory_layout: Available memory region 0x3ffd0000 - 0x3ffd2000
D (617) memory_layout: Available memory region 0x3ffd2000 - 0x3ffd4000
D (624) memory_layout: Available memory region 0x3ffd4000 - 0x3ffd6000
D (630) memory_layout: Available memory region 0x3ffd6000 - 0x3ffd8000
D (637) memory_layout: Available memory region 0x3ffd8000 - 0x3ffda000
D (644) memory_layout: Available memory region 0x3ffda000 - 0x3ffdc000
D (650) memory_layout: Available memory region 0x3ffdc000 - 0x3ffde000
D (657) memory_layout: Available memory region 0x3ffde000 - 0x3ffe0000
D (663) memory_layout: Available memory region 0x3ffe0440 - 0x3ffe3f20
D (670) memory_layout: Available memory region 0x3ffe4350 - 0x3ffe8000
D (677) memory_layout: Available memory region 0x3ffe8000 - 0x3fff0000
D (683) memory_layout: Available memory region 0x3fff0000 - 0x3fff8000
D (690) memory_layout: Available memory region 0x3fff8000 - 0x3fffc000
D (696) memory_layout: Available memory region 0x3fffc000 - 0x40000000
D (703) memory_layout: Available memory region 0x400907a8 - 0x40092000
D (710) memory_layout: Available memory region 0x40092000 - 0x40094000
D (716) memory_layout: Available memory region 0x40094000 - 0x40096000
D (723) memory_layout: Available memory region 0x40096000 - 0x40098000
D (729) memory_layout: Available memory region 0x40098000 - 0x4009a000
D (736) memory_layout: Available memory region 0x4009a000 - 0x4009c000
D (743) memory_layout: Available memory region 0x4009c000 - 0x4009e000
D (749) memory_layout: Available memory region 0x4009e000 - 0x400a0000
I (756) heap_init: Initializing. RAM available for dynamic allocation:
D (763) heap_init: New heap initialised at 0x3ffae6e0
I (768) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
D (774) heap_init: New heap initialised at 0x3ffb9420
I (779) heap_init: At 3FFB9420 len 00026BE0 (154 KiB): DRAM
I (786) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (792) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
D (798) heap_init: New heap initialised at 0x400907a8
I (803) heap_init: At 400907A8 len 0000F858 (62 KiB): IRAM
I (810) cpu_start: Pro cpu start user code
D (822) clk: RTC_SLOW_CLK calibration value: 3429325
D (831) intr_alloc: Connected src 46 to int 2 (cpu 0)
D (832) intr_alloc: Connected src 57 to int 3 (cpu 0)
D (833) intr_alloc: Connected src 24 to int 9 (cpu 0)
D (837) FLASH_HAL: extra_dummy: 1
D (840) spi_flash: trying chip: issi
D (844) spi_flash: trying chip: generic
I (848) spi_flash: detected chip: generic
I (853) spi_flash: flash io: dio
D (857) efuse: coding scheme 0
D (860) efuse: In EFUSE_BLK0__DATA3_REG is used 1 bits starting with 15 bit
D (867) efuse: coding scheme 0
D (870) efuse: In EFUSE_BLK0__DATA5_REG is used 1 bits starting with 20 bit
I (877) cpu_start: Chip Revision: 1
W (881) cpu_start: Chip revision is higher than the one configured in menuconfig. Suggest to upgrade it.
I (891) cpu_start: Starting scheduler on PRO CPU.
D (0) intr_alloc: Connected src 25 to int 2 (cpu 1)
I (0) cpu_start: Starting scheduler on APP CPU.
D (907) heap_init: New heap initialised at 0x3ffe0440
D (917) heap_init: New heap initialised at 0x3ffe4350
D (927) intr_alloc: Connected src 16 to int 12 (cpu 0)
D (927) nvs: nvs_flash_init_custom partition=nvs start=9 count=4
D (967) event: running task for loop 0x3ffbe724
D (967) event: created task for loop 0x3ffbe724
D (967) event: created event loop 0x3ffbe724
D (967) nvs: nvs_open_from_partition misc 1
D (967) nvs: nvs_get_str_or_blob log
I (987) wifi: wifi driver task: 3ffc0d94, prio:23, stack:3584, core=0
I (987) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
D (987) efuse: coding scheme 0
D (997) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 8 bit
D (997) efuse: coding scheme 0
D (1007) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 0 bit
D (1007) efuse: coding scheme 0
D (1017) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 24 bit
D (1017) efuse: coding scheme 0
D (1027) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 16 bit
D (1027) efuse: coding scheme 0
D (1037) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 8 bit
D (1047) efuse: coding scheme 0
D (1047) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 0 bit
D (1057) efuse: coding scheme 0
D (1057) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 16 bit
I (1067) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
D (1077) efuse: coding scheme 0
D (1077) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 8 bit
D (1087) efuse: coding scheme 0
D (1087) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 0 bit
D (1097) efuse: coding scheme 0
D (1097) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 24 bit
D (1107) efuse: coding scheme 0
D (1107) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 16 bit
D (1117) efuse: coding scheme 0
D (1117) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 8 bit
D (1127) efuse: coding scheme 0
D (1127) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 0 bit
D (1137) efuse: coding scheme 0
D (1137) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 16 bit
D (1147) nvs: nvs_open_from_partition nvs.net80211 1
D (1147) nvs: nvs_get opmode 1
D (1157) nvs: nvs_get_str_or_blob sta.ssid
D (1157) nvs: nvs_get_str_or_blob sta.mac
D (1157) nvs: nvs_get sta.authmode 1
D (1167) nvs: nvs_get_str_or_blob sta.pswd
D (1167) nvs: nvs_get_str_or_blob sta.pmk
D (1177) nvs: nvs_get sta.chan 1
D (1177) nvs: nvs_get auto.conn 1
D (1177) nvs: nvs_get bssid.set 1
D (1187) nvs: nvs_get_str_or_blob sta.bssid
D (1187) nvs: nvs_get sta.lis_intval 2
D (1187) nvs: nvs_get sta.phym 1
D (1197) nvs: nvs_get sta.phybw 1
D (1197) nvs: nvs_get_str_or_blob sta.apsw
D (1207) nvs: nvs_get_str_or_blob sta.apinfo
D (1207) nvs: nvs_get sta.scan_method 1
D (1207) nvs: nvs_get sta.sort_method 1
D (1217) nvs: nvs_get sta.minrssi 1
D (1217) nvs: nvs_get sta.minauth 1
D (1217) nvs: nvs_get_str_or_blob ap.ssid
D (1227) nvs: nvs_get_str_or_blob ap.mac
D (1227) nvs: nvs_get_str_or_blob ap.passwd
D (1237) nvs: nvs_get_str_or_blob ap.pmk
D (1237) nvs: nvs_get ap.chan 1
D (1237) nvs: nvs_get ap.authmode 1
D (1247) nvs: nvs_get ap.hidden 1
D (1247) nvs: nvs_get ap.max.conn 1
D (1247) nvs: nvs_get bcn.interval 2
D (1257) nvs: nvs_get ap.phym 1
D (1257) nvs: nvs_get ap.phybw 1
D (1257) nvs: nvs_get ap.sndchan 1
D (1267) nvs: nvs_get lorate 1
D (1267) nvs: nvs_set_blob sta.mac 6
D (1267) nvs: nvs_set_blob ap.mac 6
I (1277) wifi: wifi firmware version: 572aaa5
I (1277) wifi: config NVS flash: enabled
I (1287) wifi: config nano formating: disabled
I (1287) wifi: Init dynamic tx buffer num: 32
I (1287) wifi: Init data frame dynamic rx buffer num: 32
I (1297) wifi: Init management frame dynamic rx buffer num: 32
I (1297) wifi: Init management short buffer num: 32
I (1307) wifi: Init static rx buffer size: 1600
I (1307) wifi: Init static rx buffer num: 10
I (1317) wifi: Init dynamic rx buffer num: 32
I (1317) example_connect: Connecting to test...
D (1327) RTC_MODULE: Wi-Fi takes adc2 lock.
D (1327) phy_init: loading PHY init data from application binary
D (1337) nvs: nvs_open_from_partition phy 0
D (1337) nvs: nvs_get cal_version 4
D (1337) nvs: nvs_get_str_or_blob cal_mac
D (1347) efuse: coding scheme 0
D (1347) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 8 bit
D (1357) efuse: coding scheme 0
D (1357) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 0 bit
D (1367) efuse: coding scheme 0
D (1367) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 24 bit
D (1377) efuse: coding scheme 0
D (1377) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 16 bit
D (1387) efuse: coding scheme 0
D (1387) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 8 bit
D (1397) efuse: coding scheme 0
D (1397) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 0 bit
D (1407) efuse: coding scheme 0
D (1407) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 16 bit
D (1417) nvs: nvs_get_str_or_blob cal_data
D (1427) nvs: nvs_close 3
D (1427) efuse: coding scheme 0
D (1427) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 8 bit
D (1437) efuse: coding scheme 0
D (1437) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 0 bit
D (1447) efuse: coding scheme 0
D (1447) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 24 bit
D (1457) efuse: coding scheme 0
D (1457) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 16 bit
D (1467) efuse: coding scheme 0
D (1467) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 8 bit
D (1477) efuse: coding scheme 0
D (1477) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 0 bit
D (1487) efuse: coding scheme 0
D (1487) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 16 bit
I (1587) phy: phy_version: 4102, 2fa7a43, Jul 15 2019, 13:06:06, 0, 0
I (1587) wifi: mode : sta (30:ae:a4:08:93:b8)
D (1587) system_event: SYSTEM_EVENT_STA_START
D (1597) event: running post WIFI_EVENT:2 with handler 0x400ff630 on loop 0x3ffbe724
0x400ff630: handle_sta_start at /home/huazhen/Work/mmwave-esp32/esp-idf/components/tcpip_adapter/event_handlers.c:140

I (2807) wifi: new:<11,2>, old:<1,0>, ap:<255,255>, sta:<11,2>, prof:1
I (3787) wifi: state: init -> auth (b0)
I (3797) wifi: state: auth -> assoc (0)
I (3797) wifi: state: assoc -> run (10)
D (3807) wpa: IEEE 802.1X RX: version=1 type=3 length=117

D (3807) wpa: EAPOL-Key type=2

D (3807) wpa: key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)

D (3807) wpa: key_length=16 key_data_length=22

D (3817) wpa: WPA: RX EAPOL-Key - hexdump(len=121):

D (3817) wpa: 01
D (3827) wpa: 03
D (3827) wpa: 00
D (3827) wpa: 75
D (3827) wpa: 02
D (3827) wpa: 00
D (3837) wpa: 8a
D (3837) wpa: 00
D (3837) wpa: 10
D (3837) wpa: 00
D (3837) wpa: 00
D (3847) wpa: 00
D (3847) wpa: 00
D (3847) wpa: 00
D (3847) wpa: 00
D (3847) wpa: 00
D (3857) wpa:

D (3857) wpa: 00
D (3857) wpa: 32
D (3857) wpa: d2
D (3857) wpa: 4a
D (3867) wpa: d0
D (3867) wpa: 22
D (3867) wpa: c5
D (3867) wpa: 96
D (3867) wpa: 84
D (3877) wpa: ae
D (3877) wpa: 4f
D (3877) wpa: 55
D (3877) wpa: 7f
D (3877) wpa: 78
D (3887) wpa: d5
D (3887) wpa: 84
D (3887) wpa:

D (3887) wpa: dd
D (3887) wpa: 38
D (3897) wpa: d7
D (3897) wpa: 5d
D (3897) wpa: f8
D (3897) wpa: f3
D (3897) wpa: 4c
D (3907) wpa: 8f
D (3907) wpa: b5
D (3907) wpa: 49
D (3907) wpa: f3
D (3907) wpa: 65
D (3917) wpa: 94
D (3917) wpa: 83
D (3917) wpa: 54
D (3917) wpa: 7e
D (3917) wpa:

D (3927) wpa: 8f
D (3927) wpa: 00
D (3927) wpa: 00
D (3927) wpa: 00
D (3927) wpa: 00
D (3937) wpa: 00
D (3937) wpa: 00
D (3937) wpa: 00
D (3937) wpa: 00
D (3937) wpa: 00
D (3947) wpa: 00
D (3947) wpa: 00
D (3947) wpa: 00
D (3947) wpa: 00
D (3947) wpa: 00
D (3957) wpa: 00
D (3957) wpa:

D (3957) wpa: 00
D (3957) wpa: 00
D (3957) wpa: 00
D (3967) wpa: 00
D (3967) wpa: 00
D (3967) wpa: 00
D (3967) wpa: 00
D (3967) wpa: 00
D (3977) wpa: 00
D (3977) wpa: 00
D (3977) wpa: 00
D (3977) wpa: 00
D (3977) wpa: 00
D (3987) wpa: 00
D (3987) wpa: 00
D (3987) wpa: 00
D (3987) wpa:

D (3987) wpa: 00
D (3997) wpa: 00
D (3997) wpa: 00
D (3997) wpa: 00
D (3997) wpa: 00
D (3997) wpa: 00
D (4007) wpa: 00
D (4007) wpa: 00
D (4007) wpa: 00
D (4007) wpa: 00
D (4007) wpa: 00
D (4017) wpa: 00
D (4017) wpa: 00
D (4017) wpa: 00
D (4017) wpa: 00
D (4017) wpa: 00
D (4027) wpa:

D (4027) wpa: 00
D (4027) wpa: 00
D (4027) wpa: 16
D (4027) wpa: dd
D (4037) wpa: 14
D (4037) wpa: 00
D (4037) wpa: 0f
D (4037) wpa: ac
D (4037) wpa: 04
D (4047) wpa: 00
D (4047) wpa: 00
D (4047) wpa: 00
D (4047) wpa: 00
D (4047) wpa: 00
D (4057) wpa: 00
D (4057) wpa: 00
D (4057) wpa:

D (4057) wpa: 00
D (4057) wpa: 00
D (4067) wpa: 00
D (4067) wpa: 00
D (4067) wpa: 00
D (4067) wpa: 00
D (4067) wpa: 00
D (4077) wpa: 00
D (4077) wpa: 00
D (4077) wpa:

D (4077) wpa: WPA 1/4-Way Handshake

D (4077) wpa: RSN: msg 1/4 key data - hexdump(len=22):

D (4087) wpa: dd
D (4087) wpa: 14
D (4087) wpa: 00
D (4097) wpa: 0f
D (4097) wpa: ac
D (4097) wpa: 04
D (4097) wpa: 00
D (4097) wpa: 00
D (4107) wpa: 00
D (4107) wpa: 00
D (4107) wpa: 00
D (4107) wpa: 00
D (4107) wpa: 00
D (4117) wpa: 00
D (4117) wpa: 00
D (4117) wpa: 00
D (4117) wpa:

D (4117) wpa: 00
D (4127) wpa: 00
D (4127) wpa: 00
D (4127) wpa: 00
D (4127) wpa: 00
D (4127) wpa: 00
D (4137) wpa:

D (4137) wpa: WPA: PTK derivation - A1=30:ae:a4:08:93:b8 A2=78:44:76:f8:b4:44

D (4147) wpa: WPA: PMK - hexdump(len=32):

D (4147) wpa: fe
D (4147) wpa: 72
D (4147) wpa: 7a
D (4157) wpa: a8
D (4157) wpa: b6
D (4157) wpa: 4a
D (4157) wpa: c9
D (4157) wpa: b3
D (4167) wpa: f5
D (4167) wpa: 4c
D (4167) wpa: 72
D (4167) wpa: 43
D (4167) wpa: 2d
D (4177) wpa: a1
D (4177) wpa: 4f
D (4177) wpa: ae
D (4177) wpa:

D (4177) wpa: d9
D (4187) wpa: 33
D (4187) wpa: ea
D (4187) wpa: 51
D (4187) wpa: 1e
D (4187) wpa: ca
D (4197) wpa: b1
D (4197) wpa: 5b
D (4197) wpa: bc
D (4197) wpa: 6c
D (4197) wpa: 52
D (4207) wpa: e7
D (4207) wpa: 52
D (4207) wpa: 2f
D (4207) wpa: 70
D (4207) wpa: 9a
D (4217) wpa:

D (4217) wpa:

D (4217) wpa: WPA: PTK - hexdump(len=48):

D (4217) wpa: 0c
D (4227) wpa: 78
D (4227) wpa: e8
D (4227) wpa: 01
D (4227) wpa: 3e
D (4227) wpa: 70
D (4237) wpa: 2e
D (4237) wpa: c4
D (4237) wpa: 86
D (4237) wpa: 5d
D (4237) wpa: 58
D (4247) wpa: 7b
D (4247) wpa: 10
D (4247) wpa: 4c
D (4247) wpa: 83
D (4247) wpa: cb
D (4257) wpa:

D (4257) wpa: 4c
D (4257) wpa: c6
D (4257) wpa: 36
D (4257) wpa: e8
D (4267) wpa: c7
D (4267) wpa: 01
D (4267) wpa: b0
D (4267) wpa: b2
D (4267) wpa: 29
D (4277) wpa: 5e
D (4277) wpa: 5d
D (4277) wpa: e2
D (4277) wpa: 93
D (4277) wpa: 16
D (4287) wpa: 28
D (4287) wpa: c5
D (4287) wpa:

D (4287) wpa: df
D (4287) wpa: 13
D (4287) wpa: c9
D (4297) wpa: 80
D (4297) wpa: 7b
D (4297) wpa: 3f
D (4297) wpa: 14
D (4297) wpa: 56
D (4307) wpa: e6
D (4307) wpa: 47
D (4307) wpa: cd
D (4307) wpa: 95
D (4307) wpa: 8d
D (4317) wpa: a2
D (4317) wpa: a3
D (4317) wpa: a9
D (4317) wpa:

D (4317) wpa:

D (4327) wpa: WPA: WPA IE for msg 2/4

  • hexdump(len=22):

D (4327) wpa: 30
D (4327) wpa: 14
D (4337) wpa: 01
D (4337) wpa: 00
D (4337) wpa: 00
D (4337) wpa: 0f
D (4337) wpa: ac
D (4347) wpa: 04
D (4347) wpa: 01
D (4347) wpa: 00
D (4347) wpa: 00
D (4347) wpa: 0f
D (4357) wpa: ac
D (4357) wpa: 04
D (4357) wpa: 01
D (4357) wpa: 00
D (4357) wpa:

D (4367) wpa: 00
D (4367) wpa: 0f
D (4367) wpa: ac
D (4367) wpa: 02
D (4367) wpa: 00
D (4377) wpa: 00
D (4377) wpa:

D (4377) wpa: WPA Send EAPOL-Key 2/4

D (4377) wpa: WPA: TX EAPOL-Key - hexdump(len=121):

D (4387) wpa: 01
D (4387) wpa: 03
D (4387) wpa: 00
D (4397) wpa: 75
D (4397) wpa: 02
D (4397) wpa: 01
D (4397) wpa: 0a
D (4397) wpa: 00
D (4407) wpa: 00
D (4407) wpa: 00
D (4407) wpa: 00
D (4407) wpa: 00
D (4407) wpa: 00
D (4417) wpa: 00
D (4417) wpa: 00
D (4417) wpa: 00
D (4417) wpa:

D (4417) wpa: 00
D (4427) wpa: bb
D (4427) wpa: 24
D (4427) wpa: bb
D (4427) wpa: be
D (4427) wpa: 67
D (4427) wpa: 86
D (4437) wpa: 12
D (4437) wpa: b0
D (4437) wpa: eb
D (4437) wpa: b2
D (4437) wpa: 14
D (4447) wpa: 3d
D (4447) wpa: 23
D (4447) wpa: 34
D (4447) wpa: 59
D (4447) wpa:

D (4457) wpa: 7b
D (4457) wpa: e1
D (4457) wpa: 5d
D (4457) wpa: 76
D (4457) wpa: 4c
D (4467) wpa: 2d
D (4467) wpa: bf
D (4467) wpa: 1e
D (4467) wpa: f5
D (4467) wpa: 2a
D (4477) wpa: aa
D (4477) wpa: e4
D (4477) wpa: 6c
D (4477) wpa: de
D (4477) wpa: 03
D (4487) wpa: 2d
D (4487) wpa:

D (4487) wpa: e0
D (4487) wpa: 00
D (4487) wpa: 00
D (4497) wpa: 00
D (4497) wpa: 00
D (4497) wpa: 00
D (4497) wpa: 00
D (4497) wpa: 00
D (4507) wpa: 00
D (4507) wpa: 00
D (4507) wpa: 00
D (4507) wpa: 00
D (4507) wpa: 00
D (4517) wpa: 00
D (4517) wpa: 00
D (4517) wpa: 00
D (4517) wpa:

D (4517) wpa: 00
D (4527) wpa: 00
D (4527) wpa: 00
D (4527) wpa: 00
D (4527) wpa: 00
D (4527) wpa: 00
D (4537) wpa: 00
D (4537) wpa: 00
D (4537) wpa: 00
D (4537) wpa: 00
D (4537) wpa: 00
D (4547) wpa: 00
D (4547) wpa: 00
D (4547) wpa: 00
D (4547) wpa: 00
D (4547) wpa: 00
D (4557) wpa:

D (4557) wpa: 00
D (4557) wpa: 11
D (4557) wpa: 6e
D (4557) wpa: 44
D (4567) wpa: 96
D (4567) wpa: 3e
D (4567) wpa: f6
D (4567) wpa: 61
D (4567) wpa: e7
D (4577) wpa: 01
D (4577) wpa: 5d
D (4577) wpa: 50
D (4577) wpa: 4e
D (4577) wpa: 8f
D (4587) wpa: 28
D (4587) wpa: 55
D (4587) wpa:

D (4587) wpa: 6c
D (4587) wpa: 00
D (4597) wpa: 16
D (4597) wpa: 30
D (4597) wpa: 14
D (4597) wpa: 01
D (4597) wpa: 00
D (4607) wpa: 00
D (4607) wpa: 0f
D (4607) wpa: ac
D (4607) wpa: 04
D (4607) wpa: 01
D (4617) wpa: 00
D (4617) wpa: 00
D (4617) wpa: 0f
D (4617) wpa: ac
D (4617) wpa:

D (4627) wpa: 04
D (4627) wpa: 01
D (4627) wpa: 00
D (4627) wpa: 00
D (4627) wpa: 0f
D (4637) wpa: ac
D (4637) wpa: 02
D (4637) wpa: 00
D (4637) wpa: 00
D (4637) wpa:

D (4657) wpa: IEEE 802.1X RX: version=1 type=3 length=151

D (4657) wpa: EAPOL-Key type=2

D (4657) wpa: key_info 0x13ca (ver=2 keyidx=0 rsvd=0 Pairwise Install Ack MIC Secure Encr)

D (4657) wpa: key_length=16 key_data_length=56

D (4667) wpa: WPA: RX EAPOL-Key - hexdump(len=155):

D (4667) wpa: 01
D (4677) wpa: 03
D (4677) wpa: 00
D (4677) wpa: 97
D (4677) wpa: 02
D (4677) wpa: 13
D (4687) wpa: ca
D (4687) wpa: 00
D (4687) wpa: 10
D (4687) wpa: 00
D (4687) wpa: 00
D (4697) wpa: 00
D (4697) wpa: 00
D (4697) wpa: 00
D (4697) wpa: 00
D (4697) wpa: 00
D (4707) wpa:

D (4707) wpa: 01
D (4707) wpa: 32
D (4707) wpa: d2
D (4707) wpa: 4a
D (4717) wpa: d0
D (4717) wpa: 22
D (4717) wpa: c5
D (4717) wpa: 96
D (4717) wpa: 84
D (4727) wpa: ae
D (4727) wpa: 4f
D (4727) wpa: 55
D (4727) wpa: 7f
D (4727) wpa: 78
D (4737) wpa: d5
D (4737) wpa: 84
D (4737) wpa:

D (4737) wpa: dd
D (4737) wpa: 38
D (4747) wpa: d7
D (4747) wpa: 5d
D (4747) wpa: f8
D (4747) wpa: f3
D (4747) wpa: 4c
D (4757) wpa: 8f
D (4757) wpa: b5
D (4757) wpa: 49
D (4757) wpa: f3
D (4757) wpa: 65
D (4767) wpa: 94
D (4767) wpa: 83
D (4767) wpa: 54
D (4767) wpa: 7e
D (4767) wpa:

D (4777) wpa: 8f
D (4777) wpa: 32
D (4777) wpa: d2
D (4777) wpa: 4a
D (4777) wpa: d0
D (4787) wpa: 22
D (4787) wpa: c5
D (4787) wpa: 96
D (4787) wpa: 84
D (4787) wpa: ae
D (4797) wpa: 4f
D (4797) wpa: 55
D (4797) wpa: 7f
D (4797) wpa: 78
D (4797) wpa: d5
D (4807) wpa: 84
D (4807) wpa:

D (4807) wpa: dd
D (4807) wpa: 61
D (4807) wpa: a4
D (4817) wpa: 15
D (4817) wpa: 00
D (4817) wpa: 00
D (4817) wpa: 00
D (4817) wpa: 00
D (4827) wpa: 00
D (4827) wpa: 00
D (4827) wpa: 00
D (4827) wpa: 00
D (4827) wpa: 00
D (4837) wpa: 00
D (4837) wpa: 00
D (4837) wpa: 00
D (4837) wpa:

D (4837) wpa: 00
D (4847) wpa: 47
D (4847) wpa: 51
D (4847) wpa: 9a
D (4847) wpa: c5
D (4847) wpa: 8f
D (4857) wpa: 27
D (4857) wpa: e9
D (4857) wpa: 11
D (4857) wpa: de
D (4857) wpa: de
D (4867) wpa: 19
D (4867) wpa: 40
D (4867) wpa: fe
D (4867) wpa: d6
D (4867) wpa: ec
D (4877) wpa:

D (4877) wpa: bc
D (4877) wpa: 00
D (4877) wpa: 38
D (4877) wpa: 12
D (4877) wpa: c0
D (4887) wpa: 76
D (4887) wpa: 01
D (4887) wpa: 54
D (4887) wpa: 50
D (4887) wpa: d8
D (4897) wpa: 3e
D (4897) wpa: a7
D (4897) wpa: f0
D (4897) wpa: 43
D (4897) wpa: 87
D (4907) wpa: f1
D (4907) wpa:

D (4907) wpa: 8c
D (4907) wpa: 4e
D (4907) wpa: f5
D (4917) wpa: 1e
D (4917) wpa: 35
D (4917) wpa: 8f
D (4917) wpa: 61
D (4917) wpa: 60
D (4927) wpa: e8
D (4927) wpa: ec
D (4927) wpa: 6f
D (4927) wpa: dc
D (4927) wpa: fd
D (4937) wpa: 2e
D (4937) wpa: 14
D (4937) wpa: 57
D (4937) wpa:

D (4937) wpa: 56
D (4947) wpa: 47
D (4947) wpa: b4
D (4947) wpa: 64
D (4947) wpa: 36
D (4947) wpa: 19
D (4957) wpa: 2f
D (4957) wpa: be
D (4957) wpa: 03
D (4957) wpa: cb
D (4957) wpa: fb
D (4967) wpa: 48
D (4967) wpa: b2
D (4967) wpa: e4
D (4967) wpa: 36
D (4967) wpa: aa
D (4977) wpa:

D (4977) wpa: 69
D (4977) wpa: 01
D (4977) wpa: 06
D (4977) wpa: 26
D (4987) wpa: 49
D (4987) wpa: 61
D (4987) wpa: 7e
D (4987) wpa: c7
D (4987) wpa: c6
D (4997) wpa: 37
D (4997) wpa: 41
D (4997) wpa:

D (4997) wpa: WPA 3/4-Way Handshake

D (5007) wpa: WPA: No WPA/RSN IE for this AP known. Trying to get from scan results

D (5007) wpa: WPA: Found the current AP from updated scan results

D (5017) wpa: tx 4/4 txcb_flags=8192

D (5017) wpa: WPA Send EAPOL-Key 4/4

D (5027) wpa: WPA: TX EAPOL-Key - hexdump(len=99):

D (5027) wpa: 01
D (5027) wpa: 03
D (5037) wpa: 00
D (5037) wpa: 5f
D (5037) wpa: 02
D (5037) wpa: 03
D (5037) wpa: 0a
D (5047) wpa: 00
D (5047) wpa: 00
D (5047) wpa: 00
D (5047) wpa: 00
D (5047) wpa: 00
D (5057) wpa: 00
D (5057) wpa: 00
D (5057) wpa: 00
D (5057) wpa: 00
D (5057) wpa:

D (5067) wpa: 01
D (5067) wpa: 00
D (5067) wpa: 00
D (5067) wpa: 00
D (5067) wpa: 00
D (5077) wpa: 00
D (5077) wpa: 00
D (5077) wpa: 00
D (5077) wpa: 00
D (5077) wpa: 00
D (5087) wpa: 00
D (5087) wpa: 00
D (5087) wpa: 00
D (5087) wpa: 00
D (5087) wpa: 00
D (5097) wpa: 00
D (5097) wpa:

D (5097) wpa: 00
D (5097) wpa: 00
D (5097) wpa: 00
D (5107) wpa: 00
D (5107) wpa: 00
D (5107) wpa: 00
D (5107) wpa: 00
D (5107) wpa: 00
D (5117) wpa: 00
D (5117) wpa: 00
D (5117) wpa: 00
D (5117) wpa: 00
D (5117) wpa: 00
D (5127) wpa: 00
D (5127) wpa: 00
D (5127) wpa: 00
D (5127) wpa:

D (5127) wpa: 00
D (5137) wpa: 00
D (5137) wpa: 00
D (5137) wpa: 00
D (5137) wpa: 00
D (5137) wpa: 00
D (5147) wpa: 00
D (5147) wpa: 00
D (5147) wpa: 00
D (5147) wpa: 00
D (5147) wpa: 00
D (5157) wpa: 00
D (5157) wpa: 00
D (5157) wpa: 00
D (5157) wpa: 00
D (5157) wpa: 00
D (5167) wpa:

D (5167) wpa: 00
D (5167) wpa: 00
D (5167) wpa: 00
D (5167) wpa: 00
D (5177) wpa: 00
D (5177) wpa: 00
D (5177) wpa: 00
D (5177) wpa: 00
D (5177) wpa: 00
D (5187) wpa: 00
D (5187) wpa: 00
D (5187) wpa: 00
D (5187) wpa: 00
D (5187) wpa: 00
D (5197) wpa: 00
D (5197) wpa: 00
D (5197) wpa:

D (5197) wpa: 00
D (5197) wpa: 12
D (5207) wpa: 33
D (5207) wpa: b7
D (5207) wpa: d5
D (5207) wpa: d8
D (5207) wpa: fa
D (5217) wpa: 79
D (5217) wpa: 2b
D (5217) wpa: 76
D (5217) wpa: 73
D (5217) wpa: e1
D (5227) wpa: d9
D (5227) wpa: 95
D (5227) wpa: 99
D (5227) wpa: 4e
D (5227) wpa:

D (5237) wpa: 00
D (5237) wpa: 00
D (5237) wpa: 00
D (5237) wpa:

D (5247) wpa: WPA: Installing PTK to the driver.

D (5247) wpa: WPA: Installing GTK to the driver (keyidx=1 tx=0 len=16).

D (5257) wpa: WPA: Key negotiation completed with 78:44:76:f8:b4:44 [PTK=CCMP GTK=CCMP]

I (5257) wifi: connected with test, channel 11, 40D, bssid = 78:44:76:f8:b4:44
I (5267) wifi: pm start, type: 1

D (5267) system_event: SYSTEM_EVENT_STA_CONNECTED, ssid:test, ssid_len:4, bssid:78:44:76:f8:b4:44, channel:11, authmode:3
D (5287) event: running post WIFI_EVENT:4 with handler 0x400ff540 on loop 0x3ffbe724
0x400ff540: handle_sta_connected at /home/huazhen/Work/mmwave-esp32/esp-idf/components/tcpip_adapter/event_handlers.c:155

D (5287) tcpip_adapter: dhcp client init ip/mask/gw to all-0
D (5297) tcpip_adapter: if0 start ip lost tmr: enter
D (5297) tcpip_adapter: if0 start ip lost tmr: no need start because netif=0x3ffc58f8 interval=120 ip=0
D (5307) tcpip_adapter: dhcp client start successfully
D (5317) event: running post WIFI_EVENT:4 with handler 0x400d6ad4 on loop 0x3ffbe724
0x400d6ad4: on_wifi_connect at /home/huazhen/Work/mmwave-esp32/esp-idf/examples/common_components/protocol_examples_common/connect.c:111

D (6967) system_event: SYSTEM_EVENT_AP_STA_GOT_IP6 address fe80:0000:0000:0000:32ae:a4ff:fe08:93b8
D (6967) event: running post IP_EVENT:3 with handler 0x400d6a84 on loop 0x3ffbe724
0x400d6a84: on_got_ipv6 at /home/huazhen/Work/mmwave-esp32/esp-idf/examples/common_components/protocol_examples_common/connect.c:61

D (7467) tcpip_adapter: if0 dhcpc cb
D (7467) tcpip_adapter: if0 ip changed=1
D (7467) system_event: SYSTEM_EVENT_STA_GOT_IP, ip:192.168.200.9, mask:255.255.255.0, gw:192.168.200.1
D (7467) event: running post IP_EVENT:0 with handler 0x400ff39c on loop 0x3ffbe724
0x400ff39c: handle_sta_got_ip at /home/huazhen/Work/mmwave-esp32/esp-idf/components/tcpip_adapter/event_handlers.c:101

I (7477) tcpip_adapter: sta ip: 192.168.200.9, mask: 255.255.255.0, gw: 192.168.200.1
D (7487) event: running post IP_EVENT:0 with handler 0x400d6aa4 on loop 0x3ffbe724
0x400d6aa4: on_got_ip at /home/huazhen/Work/mmwave-esp32/esp-idf/examples/common_components/protocol_examples_common/connect.c:51

I (7497) example_connect: Connected to test
I (7497) example_connect: IPv4 address: 192.168.200.9
I (7507) example_connect: IPv6 address: fe80:0000:0000:0000:32ae:a4ff:fe08:93b8
I (7517) advanced_https_ota_example: Starting Advanced OTA example
D (7527) HTTP_CLIENT: Begin connect to: https://mmwave.s3.amazonaws.com:443
D (7527) esp-tls: host:mmwave.s3.amazonaws.com: strlen 23
D (8417) esp-tls: handshake in progress...
D (10377) HTTP_CLIENT: Write header[3]: GET /audino/debug/audino_2_1_5a.bin HTTP/1.1
User-Agent: ESP32 HTTP Client/1.0
Host: mmwave.s3.amazonaws.com
Content-Length: 0

D (10877) HTTP_CLIENT: on_message_begin
D (10877) HTTP_CLIENT: HEADER=x-amz-id-2:PiyiI02GArWz7pbzWepdaPX0w9AlYjzylbSaO6W1vfssUIyTAtdWR+3DkR4LGVQKmFJDPUYK64Y=
D (10887) HTTP_CLIENT: HEADER=x-amz-request-id:531AC915BB2F4FCC
D (10887) HTTP_CLIENT: HEADER=Date:Thu, 28 Nov 2019 02:44:12 GMT
D (10897) HTTP_CLIENT: HEADER=Last-Modified:Mon, 25 Nov 2019 05:43:03 GMT
D (10907) HTTP_CLIENT: HEADER=ETag:"df863d2c6ce3e88cb8721b56917bfeea"
D (10907) HTTP_CLIENT: HEADER=Accept-Ranges:bytes
D (10917) HTTP_CLIENT: HEADER=Content-Type:application/octet-stream
D (10917) HTTP_CLIENT: HEADER=Content-Length:1027776
D (10927) HTTP_CLIENT: HEADER=Server:AmazonS3
D (10927) HTTP_CLIENT: http_on_headers_complete, status=200, offset=375, nread=375
D (10937) HTTP_CLIENT: content_length = 1027776
I (10937) esp_https_ota: Starting OTA...
I (10947) esp_https_ota: Writing to partition subtype 16 at offset 0x110000
D (10957) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (12747) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (12747) HTTP_CLIENT: http_on_body 289
I (12747) advanced_https_ota_example: Running firmware version: 1.1.6-2-gc98ff9b-dirty
D (15637) esp_https_ota: Written image length 578
D (15647) advanced_https_ota_example: Image bytes read: 578
D (15647) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15647) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15657) HTTP_CLIENT: http_on_body 289
D (15667) esp_https_ota: Written image length 867
D (15667) advanced_https_ota_example: Image bytes read: 867
D (15667) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15677) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15677) HTTP_CLIENT: http_on_body 289
D (15687) esp_https_ota: Written image length 1156
D (15687) advanced_https_ota_example: Image bytes read: 1156
D (15697) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15697) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15707) HTTP_CLIENT: http_on_body 289
D (15717) esp_https_ota: Written image length 1445
D (15717) advanced_https_ota_example: Image bytes read: 1445
D (15717) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15727) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15737) HTTP_CLIENT: http_on_body 289
D (15737) esp_https_ota: Written image length 1734
D (15737) advanced_https_ota_example: Image bytes read: 1734
D (15747) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15757) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15757) HTTP_CLIENT: http_on_body 289
D (15767) esp_https_ota: Written image length 2023
D (15767) advanced_https_ota_example: Image bytes read: 2023
D (15777) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15777) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15787) HTTP_CLIENT: http_on_body 289
D (15797) esp_https_ota: Written image length 2312
D (15797) advanced_https_ota_example: Image bytes read: 2312
D (15797) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15807) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15807) HTTP_CLIENT: http_on_body 289
D (15817) esp_https_ota: Written image length 2601
D (15827) advanced_https_ota_example: Image bytes read: 2601
D (15827) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15827) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15837) HTTP_CLIENT: http_on_body 289
D (15847) esp_https_ota: Written image length 2890
D (15847) advanced_https_ota_example: Image bytes read: 2890
D (15857) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15857) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15867) HTTP_CLIENT: http_on_body 289
D (15877) esp_https_ota: Written image length 3179
D (15877) advanced_https_ota_example: Image bytes read: 3179
D (15877) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15887) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15887) HTTP_CLIENT: http_on_body 289
D (15897) esp_https_ota: Written image length 3468
D (15897) advanced_https_ota_example: Image bytes read: 3468
D (15907) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15907) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15917) HTTP_CLIENT: http_on_body 289
D (15927) esp_https_ota: Written image length 3757
D (15927) advanced_https_ota_example: Image bytes read: 3757
D (15927) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15937) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15947) HTTP_CLIENT: http_on_body 289
D (15957) esp_https_ota: Written image length 4046
D (15957) advanced_https_ota_example: Image bytes read: 4046
D (15957) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15967) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15967) HTTP_CLIENT: http_on_body 289
D (15977) esp_https_ota: Written image length 4335
D (15977) advanced_https_ota_example: Image bytes read: 4335
D (15987) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (15987) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (15997) HTTP_CLIENT: http_on_body 289
D (16007) esp_https_ota: Written image length 4624
D (16007) advanced_https_ota_example: Image bytes read: 4624
D (16007) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16017) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16027) HTTP_CLIENT: http_on_body 289
D (16037) esp_https_ota: Written image length 4913
D (16037) advanced_https_ota_example: Image bytes read: 4913
D (16037) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16047) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16047) HTTP_CLIENT: http_on_body 289
D (16057) esp_https_ota: Written image length 5202
D (16057) advanced_https_ota_example: Image bytes read: 5202
D (16067) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16067) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16077) HTTP_CLIENT: http_on_body 289
D (16087) esp_https_ota: Written image length 5491
D (16087) advanced_https_ota_example: Image bytes read: 5491
D (16087) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16097) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16097) HTTP_CLIENT: http_on_body 289
D (16107) esp_https_ota: Written image length 5780
D (16107) advanced_https_ota_example: Image bytes read: 5780
D (16117) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16117) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16127) HTTP_CLIENT: http_on_body 289
D (16137) esp_https_ota: Written image length 6069
D (16137) advanced_https_ota_example: Image bytes read: 6069
D (16147) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16147) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16157) HTTP_CLIENT: http_on_body 289
D (16167) esp_https_ota: Written image length 6358
D (16167) advanced_https_ota_example: Image bytes read: 6358
D (16167) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16177) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16177) HTTP_CLIENT: http_on_body 289
D (16187) esp_https_ota: Written image length 6647
D (16187) advanced_https_ota_example: Image bytes read: 6647
D (16197) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16197) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16207) HTTP_CLIENT: http_on_body 289
D (16217) esp_https_ota: Written image length 6936
D (16217) advanced_https_ota_example: Image bytes read: 6936
D (16217) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16227) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16237) HTTP_CLIENT: http_on_body 289
D (16247) esp_https_ota: Written image length 7225
D (16247) advanced_https_ota_example: Image bytes read: 7225
D (16247) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16257) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16257) HTTP_CLIENT: http_on_body 289
D (16267) esp_https_ota: Written image length 7514
D (16267) advanced_https_ota_example: Image bytes read: 7514
D (16277) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16277) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16287) HTTP_CLIENT: http_on_body 289
D (16297) esp_https_ota: Written image length 7803
D (16297) advanced_https_ota_example: Image bytes read: 7803
D (16297) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16307) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16317) HTTP_CLIENT: http_on_body 289
D (16327) esp_https_ota: Written image length 8092
D (16327) advanced_https_ota_example: Image bytes read: 8092
D (16327) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16337) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16337) HTTP_CLIENT: http_on_body 289
D (16347) esp_https_ota: Written image length 8381
D (16347) advanced_https_ota_example: Image bytes read: 8381
D (16357) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16357) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16367) HTTP_CLIENT: http_on_body 289
D (16377) esp_https_ota: Written image length 8670
D (16377) advanced_https_ota_example: Image bytes read: 8670
D (16377) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16387) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16387) HTTP_CLIENT: http_on_body 289
D (16407) esp_https_ota: Written image length 8959
D (16407) advanced_https_ota_example: Image bytes read: 8959
D (16407) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16407) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16417) HTTP_CLIENT: http_on_body 289
D (16427) esp_https_ota: Written image length 9248
D (16427) advanced_https_ota_example: Image bytes read: 9248
D (16437) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16437) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16447) HTTP_CLIENT: http_on_body 289
D (16457) esp_https_ota: Written image length 9537
D (16457) advanced_https_ota_example: Image bytes read: 9537
D (16457) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16467) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16467) HTTP_CLIENT: http_on_body 289
D (16477) esp_https_ota: Written image length 9826
D (16477) advanced_https_ota_example: Image bytes read: 9826
D (16487) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16487) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16497) HTTP_CLIENT: http_on_body 289
D (16507) esp_https_ota: Written image length 10115
D (16507) advanced_https_ota_example: Image bytes read: 10115
D (16517) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16517) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16527) HTTP_CLIENT: http_on_body 289
D (16537) esp_https_ota: Written image length 10404
D (16537) advanced_https_ota_example: Image bytes read: 10404
D (16537) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16547) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16547) HTTP_CLIENT: http_on_body 289
D (16557) esp_https_ota: Written image length 10693
D (16557) advanced_https_ota_example: Image bytes read: 10693
D (16567) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16567) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16577) HTTP_CLIENT: http_on_body 289
D (16587) esp_https_ota: Written image length 10982
D (16587) advanced_https_ota_example: Image bytes read: 10982
D (16597) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16597) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16607) HTTP_CLIENT: http_on_body 289
D (16617) esp_https_ota: Written image length 11271
D (16617) advanced_https_ota_example: Image bytes read: 11271
D (16617) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16627) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16627) HTTP_CLIENT: http_on_body 289
D (16637) esp_https_ota: Written image length 11560
D (16637) advanced_https_ota_example: Image bytes read: 11560
D (16647) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16647) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16657) HTTP_CLIENT: http_on_body 289
D (16667) esp_https_ota: Written image length 11849
D (16667) advanced_https_ota_example: Image bytes read: 11849
D (16667) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16677) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16687) HTTP_CLIENT: http_on_body 289
D (16697) esp_https_ota: Written image length 12138
D (16697) advanced_https_ota_example: Image bytes read: 12138
D (16697) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16707) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16707) HTTP_CLIENT: http_on_body 289
D (16717) esp_https_ota: Written image length 12427
D (16717) advanced_https_ota_example: Image bytes read: 12427
D (16727) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16727) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16737) HTTP_CLIENT: http_on_body 289
D (16747) esp_https_ota: Written image length 12716
D (16747) advanced_https_ota_example: Image bytes read: 12716
D (16747) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16757) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16767) HTTP_CLIENT: http_on_body 289
D (16777) esp_https_ota: Written image length 13005
D (16777) advanced_https_ota_example: Image bytes read: 13005
D (16777) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16787) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16787) HTTP_CLIENT: http_on_body 289
D (16797) esp_https_ota: Written image length 13294
D (16797) advanced_https_ota_example: Image bytes read: 13294
D (16807) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16807) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16817) HTTP_CLIENT: http_on_body 289
D (16827) esp_https_ota: Written image length 13583
D (16827) advanced_https_ota_example: Image bytes read: 13583
D (16827) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16837) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16847) HTTP_CLIENT: http_on_body 289
D (16857) esp_https_ota: Written image length 13872
D (16857) advanced_https_ota_example: Image bytes read: 13872
D (16857) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16867) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16867) HTTP_CLIENT: http_on_body 289
D (16877) esp_https_ota: Written image length 14161
D (16877) advanced_https_ota_example: Image bytes read: 14161
D (16887) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16887) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16897) HTTP_CLIENT: http_on_body 289
D (16907) esp_https_ota: Written image length 14450
D (16907) advanced_https_ota_example: Image bytes read: 14450
D (16907) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16917) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16927) HTTP_CLIENT: http_on_body 289
D (16937) esp_https_ota: Written image length 14739
D (16937) advanced_https_ota_example: Image bytes read: 14739
D (16937) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16947) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16947) HTTP_CLIENT: http_on_body 289
D (16957) esp_https_ota: Written image length 15028
D (16957) advanced_https_ota_example: Image bytes read: 15028
D (16967) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16967) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (16977) HTTP_CLIENT: http_on_body 289
D (16987) esp_https_ota: Written image length 15317
D (16987) advanced_https_ota_example: Image bytes read: 15317
D (16987) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (16997) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (17007) HTTP_CLIENT: http_on_body 289
D (17017) esp_https_ota: Written image length 15606
D (17017) advanced_https_ota_example: Image bytes read: 15606
D (17017) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (17027) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (17027) HTTP_CLIENT: http_on_body 289
D (17037) esp_https_ota: Written image length 15895
D (17037) advanced_https_ota_example: Image bytes read: 15895
D (17047) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (17047) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (17057) HTTP_CLIENT: http_on_body 289
D (17067) esp_https_ota: Written image length 16184
D (17067) advanced_https_ota_example: Image bytes read: 16184
D (17067) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (17077) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (17087) HTTP_CLIENT: http_on_body 289
D (17087) esp_https_ota: Written image length 16473
D (17087) advanced_https_ota_example: Image bytes read: 16473
D (17097) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (17097) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=176, ridx=0
D (17107) HTTP_CLIENT: http_on_body 176
D (17117) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (17117) HTTP_CLIENT: need_read=113, byte_to_read=113, rlen=113, ridx=176
D (17127) HTTP_CLIENT: http_on_body 113
D (17137) esp_https_ota: Written image length 16762
D (17137) advanced_https_ota_example: Image bytes read: 16762
D (17137) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (17147) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (17147) HTTP_CLIENT: http_on_body 289
D (17157) esp_https_ota: Written image length 17051
D (17157) advanced_https_ota_example: Image bytes read: 17051
D (17167) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (17167) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=271, ridx=0
D (17177) HTTP_CLIENT: http_on_body 271
D (17177) HTTP_CLIENT: is_data_remain=1, is_chunked=0
E (22187) esp-tls: read error :-76:
E (22187) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
D (22187) HTTP_CLIENT: need_read=18, byte_to_read=18, rlen=-76, ridx=271
D (22197) esp_https_ota: Written image length 17322
D (22197) advanced_https_ota_example: Image bytes read: 17322
D (22197) HTTP_CLIENT: is_data_remain=1, is_chunked=0
D (27207) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=0, ridx=0
I (27207) esp_https_ota: Connection closed, all data received
D (27207) esp_image: reading image header @ 0x110000
D (27207) esp_image: image header: 0xe9 0x06 0x02 0x02 4008139c
I (27217) esp_image: segment 0: paddr=0x00110020 vaddr=0x3f400020 size=0x2c570 (181616) map
D (27227) esp_image: free data page_count 0x0000003d
E (27367) esp_image: invalid segment length 0xffffffff
E (27377) advanced_https_ota_example: ESP_HTTPS_OTA upgrade failed...

@mahavirj
Copy link
Member

@enricop Any specific reason why do you think this could be toolchain version related issue?

@huazhenjiang Error code from earlier log 0x6800 points to timeout, so one thing you could try is to increase timeout and check (can be done by modifying timeout_ms field of esp_http_client_config_t in example code). Other question I have is, if you download same file from any host tool (like curl or wget) do you observe any such issue in multiple iteration run?

@huazhenjiang
Copy link
Author

huazhenjiang commented Nov 28, 2019

@mahavirj

I have been tried to add 10 seconds timeout for testing this issue, but it looks not work.
done by modifying timeout_ms field of esp_http_client_config_t.
Also I try to download by wget with 30 times, it get 100% success rate.

the following log show the ota failed with timeout :

[2019-11-29 14:38:36.120] lwip_recv_tcp: top while sock->lastdata=0x3ffd0d5c
[2019-11-29 14:38:36.120] lwip_recv_tcp: buflen=427 recv_left=5 off=0
[2019-11-29 14:38:36.120] lwip_recv_tcp: lastdata now pbuf=0x3ffd0d5c
[2019-11-29 14:38:36.120] lwip_recvfrom(54): addr=52.216.185.171 port=443 len=5
[2019-11-29 14:38:36.120] lwip_recvfrom(54, 0x3ffd12f9, 16384, 0x0, ..)
[2019-11-29 14:38:36.120] lwip_recv_tcp: top while sock->lastdata=0x3ffd0d5c
[2019-11-29 14:38:36.120] lwip_recv_tcp: buflen=422 recv_left=16384 off=0
[2019-11-29 14:38:36.165] lwip_recv_tcp: deleting pbuf=0x3ffd0d5c
[2019-11-29 14:38:36.165] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:36.165] lwip_recv_tcp: netconn_recv err=0, pbuf=0x3ffd8a40
[2019-11-29 14:38:36.165] lwip_recv_tcp: buflen=1024 recv_left=15962 off=422
[2019-11-29 14:38:36.165] lwip_recv_tcp: deleting pbuf=0x3ffd8a40
[2019-11-29 14:38:36.165] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:36.165] lwip_recv_tcp: netconn_recv err=0, pbuf=0x3ffd8a68
[2019-11-29 14:38:36.165] lwip_recv_tcp: buflen=1024 recv_left=14938 off=1446
[2019-11-29 14:38:36.165] lwip_recv_tcp: deleting pbuf=0x3ffd8a68
[2019-11-29 14:38:36.165] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:36.165] lwip_recv_tcp: netconn_recv err=0, pbuf=0x3ffd8a90
[2019-11-29 14:38:36.194] lwip_recv_tcp: buflen=1024 recv_left=13914 off=2470
[2019-11-29 14:38:36.194] lwip_recv_tcp: deleting pbuf=0x3ffd8a90
[2019-11-29 14:38:36.194] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:36.194] lwip_recv_tcp: netconn_recv err=-7, pbuf=0x0
[2019-11-29 14:38:36.194] lwip_recvfrom(54): addr=52.216.185.171 port=443 len=3494
[2019-11-29 14:38:36.194] lwip_recvfrom(54, 0x3ffd209f, 12890, 0x0, ..)
[2019-11-29 14:38:36.194] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:36.291] lwip_recv_tcp: netconn_recv err=0, pbuf=0x3ffd0d34
[2019-11-29 14:38:36.291] lwip_recv_tcp: buflen=1024 recv_left=12890 off=0
[2019-11-29 14:38:36.291] lwip_recv_tcp: deleting pbuf=0x3ffd0d34
[2019-11-29 14:38:36.291] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:36.291] lwip_recv_tcp: netconn_recv err=0, pbuf=0x3ffd0d5c
[2019-11-29 14:38:36.291] lwip_recv_tcp: buflen=1024 recv_left=11866 off=1024
[2019-11-29 14:38:36.291] lwip_recv_tcp: deleting pbuf=0x3ffd0d5c
[2019-11-29 14:38:36.291] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:36.291] lwip_recv_tcp: netconn_recv err=-7, pbuf=0x0
[2019-11-29 14:38:36.291] lwip_recvfrom(54): addr=52.216.185.171 port=443 len=2048
[2019-11-29 14:38:36.291] lwip_recvfrom(54, 0x3ffd289f, 10842, 0x0, ..)
[2019-11-29 14:38:36.295] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:36.434] lwip_recv_tcp: netconn_recv err=0, pbuf=0x3ffd0d34
[2019-11-29 14:38:36.482] lwip_recv_tcp: buflen=1024 recv_left=10842 off=0
[2019-11-29 14:38:36.482] lwip_recv_tcp: deleting pbuf=0x3ffd0d34
[2019-11-29 14:38:36.482] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:36.482] lwip_recv_tcp: netconn_recv err=0, pbuf=0x3ffd0d5c
[2019-11-29 14:38:36.482] lwip_recv_tcp: buflen=1024 recv_left=9818 off=1024
[2019-11-29 14:38:36.482] lwip_recv_tcp: deleting pbuf=0x3ffd0d5c
[2019-11-29 14:38:36.482] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:36.482] lwip_recv_tcp: netconn_recv err=0, pbuf=0x3ffd8a60
[2019-11-29 14:38:36.482] lwip_recv_tcp: buflen=1024 recv_left=8794 off=2048
[2019-11-29 14:38:36.482] lwip_recv_tcp: deleting pbuf=0x3ffd8a60
[2019-11-29 14:38:36.502] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:36.502] lwip_recv_tcp: netconn_recv err=-7, pbuf=0x0
[2019-11-29 14:38:36.502] lwip_recvfrom(54): addr=52.216.185.171 port=443 len=3072
[2019-11-29 14:38:36.502] lwip_recvfrom(54, 0x3ffd349f, 7770, 0x0, ..)
[2019-11-29 14:38:36.502] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:39.531] I (23827) detect_gpio: [Monitor]Minimum free heap size = 123492, free Heap size = 155984
[2019-11-29 14:38:41.484] lwip_recv_tcp: netconn_recv err=0, pbuf=0x3ffcfbf4
[2019-11-29 14:38:41.484] lwip_recv_tcp: buflen=614 recv_left=7770 off=0
[2019-11-29 14:38:41.484] lwip_recv_tcp: deleting pbuf=0x3ffcfbf4
[2019-11-29 14:38:41.484] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:41.484] lwip_recv_tcp: netconn_recv err=-7, pbuf=0x0
[2019-11-29 14:38:41.484] lwip_recvfrom(54): addr=52.216.185.171 port=443 len=614
[2019-11-29 14:38:41.484] lwip_recvfrom(54, 0x3ffd3705, 7156, 0x0, ..)
[2019-11-29 14:38:41.484] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:49.532] I (33827) detect_gpio: [Monitor]Minimum free heap size = 123492, free Heap size = 154200
[2019-11-29 14:38:51.505] lwip_recv_tcp: netconn_recv err=-3, pbuf=0x0
[2019-11-29 14:38:51.505] lwip_recv_tcp: p == NULL, error is "Timeout."!
[2019-11-29 14:38:51.505] lwip_recvfrom(54): addr=52.216.185.171 port=443 len=-1
[2019-11-29 14:38:51.505] E (35780) esp-tls: read error :-76:
[2019-11-29 14:38:51.505] E (35783) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
[2019-11-29 14:38:51.505] lwip_select(55, 0x3ffcf450, 0x0, 0x3ffcf458, tvsec=10 tvusec=0)
[2019-11-29 14:38:58.598] lwip_selscan: fd=54 ready for reading
[2019-11-29 14:38:58.598] lwip_select: nready=1
[2019-11-29 14:38:58.598] lwip_recvfrom(54, 0x3ffd3705, 7156, 0x0, ..)
[2019-11-29 14:38:58.598] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:58.598] lwip_recv_tcp: netconn_recv err=0, pbuf=0x3ffd0d34
[2019-11-29 14:38:58.598] lwip_recv_tcp: buflen=307 recv_left=7156 off=0
[2019-11-29 14:38:58.598] lwip_recv_tcp: deleting pbuf=0x3ffd0d34
[2019-11-29 14:38:58.598] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:58.598] lwip_recv_tcp: netconn_recv err=-7, pbuf=0x0
[2019-11-29 14:38:58.598] lwip_recvfrom(54): addr=52.216.185.171 port=443 len=307
[2019-11-29 14:38:58.598] lwip_recvfrom(54, 0x3ffd3838, 6849, 0x0, ..)
[2019-11-29 14:38:58.598] lwip_recv_tcp: top while sock->lastdata=0x0
[2019-11-29 14:38:59.531] I (43827) detect_gpio: [Monitor]Minimum free heap size = 123492, free Heap size = 159560
[2019-11-29 14:39:08.629] lwip_recv_tcp: netconn_recv err=-3, pbuf=0x0
[2019-11-29 14:39:08.629] lwip_recv_tcp: p == NULL, error is "Timeout."!
[2019-11-29 14:39:08.629] lwip_recvfrom(54): addr=52.216.185.171 port=443 len=-1
[2019-11-29 14:39:08.629] E (52894) esp-tls: read error :-76:
[2019-11-29 14:39:08.629] E (52898) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
[2019-11-29 14:39:08.629] I (52905) esp_https_ota: Connection closed, all data received
[2019-11-29 14:39:08.629] I (52912) esp_image: segment 0: paddr=0x00110020 vaddr=0x3f400020 size=0x2d6d0 (186064) map
[2019-11-29 14:39:08.765] E (53022) esp_image: invalid segment length 0xffffffff
[2019-11-29 14:39:08.765] lwip_shutdown(54, how=2)
[2019-11-29 14:39:08.765] lwip_close(54)

@mahavirj
Copy link
Member

@huazhenjiang Is it possible to share reference code (this will need your S3 url to be public), I will try to reproduce at my end?

One more suggestion that could be tried out is to modify application code per https://github.com/espressif/esp-idf/blob/master/examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c#L137 (not sure it will help or not but worth trying)

@huazhenjiang
Copy link
Author

huazhenjiang commented Dec 2, 2019

@mahavirj

OK, I could share all of the testing files including the firmware bin, s3 public url, log and the sniffing log with wireshark ... etc.
I packed them with zip, please see the 'readme' file first.

advanced_https_ota_example.zip

@hehao9051
Copy link

@mahavirj I have the same question. IDF version is V3.2 286202c。I not set the timeout_ms(actually if i set timeout_ms=5000, the error still appear) see the log:
lwip_select(57, 0x3ffcc340, 0x0, 0x0, tvsec=5 tvusec=0)
lwip_selscan: fd=56 ready for reading
lwip_select: nready=1
lwip_recvfrom(56, 0x3ffec634, 5, 0x0, ..)
lwip_recvfrom: top while sock->lastdata=0x3ffdec54
lwip_recvfrom: buflen=1200 len=5 off=0 sock->lastoffset=813
lwip_recvfrom(56): addr=58.215.145.137 port=443 len=5
lwip_recvfrom: lastdata now netbuf=0x3ffdec54
lwip_recvfrom(56, 0x3ffec639, 16408, 0x0, ..)
lwip_recvfrom: top while sock->lastdata=0x3ffdec54
lwip_recvfrom: buflen=1200 len=16408 off=0 sock->lastoffset=818
lwip_recvfrom: deleting netbuf=0x3ffdec54
lwip_recvfrom: top while sock->lastdata=0x0
lwip_recvfrom: netconn_recv err=0, netbuf=0x3ffcf07c
lwip_recvfrom: buflen=1200 len=16026 off=382 sock->lastoffset=0
lwip_recvfrom: deleting netbuf=0x3ffcf07c
lwip_recvfrom: top while sock->lastdata=0x0
lwip_recvfrom: netconn_recv err=0, netbuf=0x3ffd0198
lwip_recvfrom: buflen=1200 len=14826 off=1582 sock->lastoffset=0
lwip_recvfrom: deleting netbuf=0x3ffd0198
lwip_recvfrom: top while sock->lastdata=0x0
lwip_recvfrom: netconn_recv err=0, netbuf=0x3ffd01b4
lwip_recvfrom: buflen=1200 len=13626 off=2782 sock->lastoffset=0
lwip_recvfrom: deleting netbuf=0x3ffd01b4
lwip_recvfrom: top while sock->lastdata=0x0
lwip_recvfrom: netconn_recv err=0, netbuf=0x3ffdc54c
lwip_recvfrom: buflen=1200 len=12426 off=3982 sock->lastoffset=0
lwip_recvfrom(56): addr=58.215.145.137 port=443 len=5182
lwip_recvfrom: deleting netbuf=0x3ffdc54c
lwip_recvfrom(56, 0x3ffeda77, 11226, 0x0, ..)
lwip_recvfrom: top while sock->lastdata=0x0
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select(56, 0x0, 0x3ffaf7a4, 0x0, tvsec=0 tvusec=200000)
lwip_selscan: fd=55 ready for writing
lwip_select: nready=1
lwip_sendto(55, data=0x3ffdc730, short_size=363, flags=0x0 to=255.255.255.255 port=5683
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select(56, 0x0, 0x3ffaf7a4, 0x0, tvsec=0 tvusec=200000)
lwip_selscan: fd=55 ready for writing
lwip_select: nready=1
lwip_sendto(55, data=0x3ffdc730, short_size=363, flags=0x0 to=255.255.255.255 port=5683
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select(56, 0x0, 0x3ffaf7a4, 0x0, tvsec=0 tvusec=200000)
lwip_selscan: fd=55 ready for writing
lwip_select: nready=1
lwip_sendto(55, data=0x3ffdc730, short_size=363, flags=0x0 to=255.255.255.255 port=5683
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_select: timeout expired
lwip_select(56, 0x3ffe1b54, 0x0, 0x0, tvsec=0 tvusec=200000)
lwip_recvfrom: netconn_recv err=-3, netbuf=0x0
lwip_recvfrom(56): buf == NULL, error is "Timeout."!
lwip_getsockopt(56, SOL_SOCKET, SO_ERROR) = 11
E (28426) esp-tls: read error :-76:
E (28426) TRANS_SSL: esp_tls_conn_read error, errno=No more processes

@shubhamkulkarni97
Copy link
Contributor

@huazhenjiang I tried updating from the link that you have mentioned in readme.txt, with timeout set to 60000. The example worked fine for around 100 iterations. Can you please try setting timeout to 60000? This is a workaround, however we are trying to dig deeper to check is any bug exists. I have attached a patch for setting the timeout, for your reference.
advanced_https_ota.patch.zip

@hehao9051
Copy link

@shubhamkulkarni97
I have the same question. IDF version is V3.2 286202c。actually even i set timeout_ms=10000, the error still appear

@shubhamkulkarni97
Copy link
Contributor

shubhamkulkarni97 commented Dec 5, 2019

@huazhenjiang @hehao9051 I have attached a patch to fix advanced_https_ota example. It has two changes,

  • Call to fcntl() is not required in function net_would_block(), as it is already handled in other layer. Due to this, net_would_block() used to return 0 for any condition. This change fixes esp-tls: read error :-76 error.

  • Errno check is added in function esp_https_ota_perform() to check whether OTA data is completely received or esp_http_client_read() returned 0 due to an error. This will fix the bug of connection being closed even if the entire file is not received.

Can you please try running the example on release/4.0 branch after applying this patch? Feel free to get-back if you face any errors.
bugfix_advanced_https_ota.patch.zip

@huazhenjiang
Copy link
Author

@shubhamkulkarni97

I have been tried this patch and it works. The success rate of ota is improved to 97 %.
So should I close this topic or not ? until you verified and merged .

@hehao9051
Copy link

@shubhamkulkarni97 thanks your work, but the error is still appear, when data_read == 0 && errno == EAGAIN, the next esp_https_ota_perform will return data_read == 0 && errno != EAGAIN.

@mahavirj
Copy link
Member

mahavirj commented Dec 9, 2019

@huazhenjiang Issue will get closed once fix is officially merged in github repository. Final fix will depend on some additional tests and applicability across different ESP-IDF release (v3.x/v4.x).

@hehao9051 We are trying some additional tests, will keep you posted on this.

@shubhamkulkarni97
Copy link
Contributor

@shubhamkulkarni97 thanks your work, but the error is still appear, when data_read == 0 && errno == EAGAIN, the next esp_https_ota_perform will return data_read == 0 && errno != EAGAIN.

@hehao9051 In which scenario do you observe this problem? Can you please explain in detail?

@shubhamkulkarni97
Copy link
Contributor

shubhamkulkarni97 commented Dec 12, 2019

@huazhenjiang @hehao9051 I have attached a patch, it should fix the issues related to timeout in OTA Update. We have added an option in menuconfig, to set receive timeout, by default it is set to 5000ms.

Can you please try running the example after applying this patch?
bugfix_for_ota.patch.zip

@Arthedian
Copy link

@shubhamkulkarni97

I am trying to apply your patch, but I am not successful. I am on newest commit of release/v.4.0 - 20e6d46. How can i apply it?

git apply ../../Downloads/bugfix_for_ota.patch/bugfix_for_ota.patch
../../Downloads/bugfix_for_ota.patch/bugfix_for_ota.patch:81: trailing whitespace.
*
error: patch failed: components/mbedtls/port/net_sockets.c:198
error: components/mbedtls/port/net_sockets.c: patch does not apply

@shubhamkulkarni97
Copy link
Contributor

@Arthedian
As some changes from internal repository are synced with public GitHub repository, the patch fails to apply.

I have attached another patch, which should be applied successfully.
Please try the patch and let me know if you face any issues.
ota_bugfix.patch.zip

@shubhamkulkarni97
Copy link
Contributor

@huazhenjiang @hehao9051 I have attached a patch, it should fix the issues related to timeout in OTA Update. We have added an option in menuconfig, to set receive timeout, by default it is set to 5000ms.

Can you please try running the example after applying this patch?
bugfix_for_ota.patch.zip
@huazhenjiang @hehao9051 Did the patch work for you?

@Arthedian
Copy link

@shubhamkulkarni97 I tried the patch which you entered 10 days ago and it worked on WiFi for me, so I want to thank you for it.

I am trying to use it with SIM800L but it is taking too long and still saying “HW FIFO Overflow”. I probably know where is the problem, and I already tried to tweak some uart setting but without any luck. Do you know how to fix it?

@shubhamkulkarni97
Copy link
Contributor

@Arthedian OTA Update may take some time depending on data rates. For HW FIFO Overflow issue, can you please provide logs?

@Arthedian
Copy link

@shubhamkulkarni97 I created a new issue for this problem here

espressif-bot pushed a commit that referenced this issue Jan 24, 2020
example_test.py is added to test advanced_https_ota_example and native ota_example.

Closes #4394
espressif-bot pushed a commit that referenced this issue Mar 23, 2020
example_test.py is added to test advanced_https_ota_example and native ota_example.

Closes #4394
jack0c pushed a commit that referenced this issue Jul 29, 2020
example_test.py is added to test advanced_https_ota_example and native ota_example.

Closes #4394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants