AirGradient Forum

Repeatedly failing OTA update

I received and put together my I-9PSL today. It came with firmware 3.1.3 and after getting it connected to my wifi it indicated that it was doing an OTA update. However, it failed at some point. No big deal, I just used the browser-based update to install 3.1.13, and at boot it indicates it is on that version.

However, on every boot it goes into the OTA update process again trying to update to 3.1.13 and fails in the 50s of percent, here’s an example failure log:

firmwareCheckForUpdate:
firmwareCheckForUpdate: Perform
checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:24587c8007c8/generic/os/firmware.bin?current_firmware=3.1.13
Starting OTA update ...
Writing to partition subtype 17 at offset 0x1f0000
File size: 1413472 bytes
OTA message: 
OTA message: 0
OTA message: 1
OTA message: 1
OTA message: 2
OTA message: 2
OTA message: 3
OTA message: 4

OTA message: 54
OTA message: 54
OTA message: 55
OTA message: 56
OTA message: 56
E (75087) TRANSPORT_BASE: poll_read select error 113, errno = Software caused connection abort, fd = 49
OTA message: 56
E (75123) TRANSPORT_BASE: poll_read select error 0, errno = Success, fd = 49
Data read error
OTA message: 
# of bytes written: 803598
E (77820) esp_image: invalid segment length 0xffffffff
Error: esp_ota_end failed! err=0x5379. Image is invalid2
OTA message: 

The percent it fails at does vary a bit, it’s not consistent.

How do I get it out of this state?

Mine does that all of the time. I would expect you to be getting 3.2.0 at this point so it may be trying to install that one. That is what mine is running.

Not sure why it is having trouble though.

You could try manually updating to the absolute latest firmware here

https://www.airgradient.com/documentation/firmwares/