OTA Update from S3 bucket failing
Posted: Thu Aug 06, 2020 11:52 am
Hi!
I am having difficulty getting OTA updates working on an ESP32-S1 with an S3 bucket. I have had this working in previous versions of the IDF but since updating recently have had no such luck.
I have tried both HTTP and HTTPS (with a generated certificate) both to no avail and have stepped back to just the example OTA update program to try and solve this issue.
The file in the bucket is public and if I copy the source URL and paste it into a browser I can access it immediately (it starts downloading). I have wifi working too and can successfully complete POST requests to a destination.
I get the following lines immediately before the OTA download starts which look like it is just disconnecting from the wifi, I am not sure what is triggering this though.
I have attached the full log from the session below.
Any help much appreciated!
I am having difficulty getting OTA updates working on an ESP32-S1 with an S3 bucket. I have had this working in previous versions of the IDF but since updating recently have had no such luck.
I have tried both HTTP and HTTPS (with a generated certificate) both to no avail and have stepped back to just the example OTA update program to try and solve this issue.
The file in the bucket is public and if I copy the source URL and paste it into a browser I can access it immediately (it starts downloading). I have wifi working too and can successfully complete POST requests to a destination.
I get the following lines immediately before the OTA download starts which look like it is just disconnecting from the wifi, I am not sure what is triggering this though.
Code: Select all
I (9998) example_connect: Wi-Fi disconnected, trying to reconnect...
E (10068) TRANS_SSL: ssl_poll_read select error 113, errno = Software caused connection abort, fd = 54
E (10068) TRANS_SSL: ssl_poll_read select error 0, errno = Success, fd = 54
E (10078) advanced_https_ota_example: Complete data was not received.
I (10078) esp_image: segment 0: paddr=0x00110020 vaddr=0x3f400020 size=0x29008 (167944) map
Any help much appreciated!
Code: Select all
Bets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (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:0x3fff0030,len:4
load:0x3fff0034,len:7008
ho 0 tail 12 room 4
load:0x40078000,len:13696
load:0x40080400,len:4000
entry 0x40080688
I (31) boot: ESP-IDF v4.2-dev-1995-g636b964c8-dirty 2nd stage bootloader
I (31) boot: compile time 16:11:57
I (32) boot: chip revision: 1
I (36) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (43) boot.esp32: SPI Speed : 40MHz
I (47) boot.esp32: SPI Mode : DIO
I (52) boot.esp32: SPI Flash Size : 4MB
I (56) boot: Enabling RNG early entropy source...
I (62) boot: Partition Table:
I (65) boot: ## Label Usage Type ST Offset Length
I (73) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (80) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (88) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (95) boot: 3 factory factory app 00 00 00010000 00100000
I (103) boot: 4 ota_0 OTA app 00 10 00110000 00100000
I (110) boot: 5 ota_1 OTA app 00 11 00210000 00100000
I (118) boot: End of partition table
I (122) boot: Defaulting to factory image
I (127) boot_comm: chip revision: 1, min. application chip revision: 0
I (134) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1f198 (127384) map
I (191) esp_image: segment 1: paddr=0x0002f1c0 vaddr=0x3ffb0000 size=0x00e58 ( 3672) load
I (193) esp_image: segment 2: paddr=0x00030020 vaddr=0x400d0020 size=0x8eb10 (584464) map
I (420) esp_image: segment 3: paddr=0x000beb38 vaddr=0x3ffb0e58 size=0x02b68 ( 11112) load
I (425) esp_image: segment 4: paddr=0x000c16a8 vaddr=0x40080000 size=0x00404 ( 1028) load
I (428) esp_image: segment 5: paddr=0x000c1ab4 vaddr=0x40080404 size=0x15a1c ( 88604) load
I (486) boot: Loaded app from partition at offset 0x10000
I (486) boot: Disabling RNG early entropy source...
I (487) cpu_start: Pro cpu up.
I (490) cpu_start: Application information:
I (495) cpu_start: Project name: advanced_https_ota
I (501) cpu_start: App version: v4.2-dev-1995-g636b964c8-dirty
I (508) cpu_start: Compile time: Aug 6 2020 17:12:39
I (514) cpu_start: ELF file SHA256: ab87c1526e791518...
I (520) cpu_start: ESP-IDF: v4.2-dev-1995-g636b964c8-dirty
I (527) cpu_start: Starting app cpu, entry point is 0x400818d4
I (0) cpu_start: App cpu up.
I (538) heap_init: Initializing. RAM available for dynamic allocation:
I (545) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (551) heap_init: At 3FFB9440 len 00026BC0 (154 KiB): DRAM
I (557) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (563) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (570) heap_init: At 40095E20 len 0000A1E0 (40 KiB): IRAM
I (576) cpu_start: Pro cpu start user code
I (594) spi_flash: detected chip: generic
I (595) spi_flash: flash io: dio
I (595) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (698) wifi:wifi driver task: 3ffc18e4, prio:23, stack:6656, core=0
I (698) system_api: Base MAC address is not set
I (698) system_api: read default base MAC address from EFUSE
I (718) wifi:wifi firmware version: 10db11f
I (718) wifi:wifi certification version: v7.0
I (718) wifi:config NVS flash: enabled
I (718) wifi:config nano formating: disabled
I (728) wifi:Init data frame dynamic rx buffer num: 32
I (728) wifi:Init management frame dynamic rx buffer num: 32
I (738) wifi:Init management short buffer num: 32
I (738) wifi:Init dynamic tx buffer num: 32
I (748) wifi:Init static rx buffer size: 1600
I (748) wifi:Init static rx buffer num: 10
I (748) wifi:Init dynamic rx buffer num: 32
I (758) example_connect: Connecting to INSPIRED1...
I (858) phy: phy_version: 4182, f1ba940, Jun 4 2020, 19:40:07, 0, 0
I (858) wifi:mode : sta (a4:cf:12:76:bd:18)
I (858) example_connect: Waiting for IP(s)
I (978) wifi:new:<8,2>, old:<1,0>, ap:<255,255>, sta:<8,2>, prof:1
I (1848) wifi:state: init -> auth (b0)
I (1858) wifi:state: auth -> init (cf00)
I (1858) wifi:new:<8,0>, old:<8,2>, ap:<255,255>, sta:<8,2>, prof:1
I (1858) example_connect: Wi-Fi disconnected, trying to reconnect...
I (2708) wifi:new:<6,0>, old:<8,0>, ap:<255,255>, sta:<6,0>, prof:1
I (2708) wifi:state: init -> auth (b0)
I (2718) wifi:state: auth -> assoc (0)
I (2718) wifi:state: assoc -> run (10)
I (2738) wifi:connected with INSPIRED1, aid = 4, channel 6, BW20, bssid = 00:1e:42:26:fd:92
I (2738) wifi:security: WPA2-PSK, phy: bgn, rssi: -59
I (2738) wifi:pm start, type: 1
I (2798) wifi:AP's beacon interval = 102400 us, DTIM period = 2
I (3678) esp_netif_handlers: example_connect: sta ip: 192.168.1.112, mask: 255.255.255.0, gw: 192.168.1.1
I (3678) example_connect: Got IPv4 event: Interface "example_connect: sta" address: 192.168.1.112
I (4678) example_connect: Got IPv6 event: Interface "example_connect: sta" address: fe80:0000:0000:0000:a6cf:12ff:fe76:bd18, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (4678) example_connect: Connected to example_connect: sta
I (4688) example_connect: - IPv4 address: 192.168.1.112
I (4698) example_connect: - IPv6 address: fe80:0000:0000:0000:a6cf:12ff:fe76:bd18, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (4708) wifi:Set ps type: 0
I (4708) advanced_https_ota_example: Starting Advanced OTA example
I (6808) esp_https_ota: Starting OTA...
I (6808) esp_https_ota: Writing to partition subtype 16 at offset 0x110000
I (7558) advanced_https_ota_example: Running firmware version: v4.2-dev-1995-g636b964c8-dirty
I (8008) wifi:state: run -> init (cf00)
I (8008) wifi:pm stop, total sleep time: 1214653 us / 5266035 us
I (8008) wifi:new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1
I (8008) example_connect: Wi-Fi disconnected, trying to reconnect...
I (8158) wifi:state: init -> init (cf00)
I (8158) wifi:new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1
I (8158) wifi:state: init -> auth (b0)
I (8318) wifi:state: auth -> assoc (0)
I (8468) wifi:state: assoc -> run (10)
I (8778) wifi:connected with INSPIRED1, aid = 4, channel 6, BW20, bssid = 00:1e:42:26:fd:92
I (8778) wifi:security: WPA2-PSK, phy: bgn, rssi: -59
I (8778) wifi:pm start, type: 0
I (8778) wifi:AP's beacon interval = 102400 us, DTIM period = 2
I (8938) wifi:state: run -> init (cf00)
I (8938) wifi:pm stop, total sleep time: 0 us / 159106 us
I (8938) wifi:new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1
I (9088) example_connect: Wi-Fi disconnected, trying to reconnect...
I (9238) wifi:state: init -> init (cf00)
I (9238) wifi:new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1
I (9238) wifi:state: init -> auth (b0)
I (9388) wifi:state: auth -> assoc (0)
I (9388) wifi:state: assoc -> run (10)
I (9538) wifi:connected with INSPIRED1, aid = 4, channel 6, BW20, bssid = 00:1e:42:26:fd:92
I (9538) wifi:security: WPA2-PSK, phy: bgn, rssi: -59
I (9548) wifi:pm start, type: 0
I (9698) wifi:AP's beacon interval = 102400 us, DTIM period = 2
I (9838) wifi:state: run -> init (cf00)
I (9848) wifi:pm stop, total sleep time: 0 us / 296137 us
I (9848) wifi:new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1
I (9998) example_connect: Wi-Fi disconnected, trying to reconnect...
E (10068) TRANS_SSL: ssl_poll_read select error 113, errno = Software caused connection abort, fd = 54
E (10068) TRANS_SSL: ssl_poll_read select error 0, errno = Success, fd = 54
E (10078) advanced_https_ota_example: Complete data was not received.
I (10078) esp_image: segment 0: paddr=0x00110020 vaddr=0x3f400020 size=0x29008 (167944) map
I (10118) wifi:new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1
I (10118) wifi:state: init -> auth (b0)
I (10128) wifi:state: auth -> assoc (0)
I (10128) wifi:state: assoc -> run (10)
I (10148) wifi:connected with INSPIRED1, aid = 4, channel 6, BW20, bssid = 00:1e:42:26:fd:92
I (10148) wifi:security: WPA2-PSK, phy: bgn, rssi: -60
I (10148) wifi:pm start, type: 0
E (10168) esp_image: invalid segment length 0xffffffff
E (10168) advanced_https_ota_example: Image validation failed, image is corrupted
E (10168) advanced_https_ota_example: ESP_HTTPS_OTA upgrade failed 5379
I (10168) wifi:AP's beacon interval = 102400 us, DTIM period = 2
I (11178) esp_netif_handlers: example_connect: sta ip: 192.168.1.112, mask: 255.255.255.0, gw: 192.168.1.1
I (11178) example_connect: Got IPv4 event: Interface "example_connect: sta" address: 192.168.1.112
I (11678) example_connect: Got IPv6 event: Interface "example_connect: sta" address: fe80:0000:0000:0000:a6cf:12ff:fe76:bd18, type: ESP_IP6_ADDR_IS_LINK_LOCAL