As it keeps displaying upgrade failed and shows often server not available, I upgraded manually through here:
https://www.airgradient.com/documentation/firmwares/
Here is the log after the update, because it was already connected to the MacBook so I copied it right-away.
firmwareCheckForUpdate:
firmwareCheckForUpdate: Perform
checking for new OTA update @ http://hw.airgradient.com/sensors/airgradient:xxxxxxx/generic/os/firmware.bin?current_firmware=3.1.5
Starting OTA update …
Writing to partition subtype 17 at offset 0x1f0000
File size: 1374592 bytes
OTA message:
OTA message: 0
OTA message: 0
OTA message: 0
OTA message: 1
OTA message: 1
OTA message: 1
OTA message: 1
OTA message: 2
OTA message: 2
OTA message: 2
OTA message: 2
OTA message: 3
OTA message: 3
OTA message: 3
OTA message: 3
OTA message: 3
OTA message: 4
OTA message: 4
OTA message: 4
OTA message: 4
OTA message: 5
OTA message: 5
OTA message: 5
OTA message: 6
OTA message: 6
OTA message: 6
OTA message: 7
OTA message: 7
OTA message: 7
OTA message: 7
OTA message: 8
OTA message: 8
OTA message: 8
OTA message: 9
OTA message: 9
OTA message: 9
OTA message: 9
OTA message: 10
OTA message: 10
OTA message: 10
OTA message: 10
OTA message: 11
OTA message: 11
OTA message: 11
OTA message: 12
OTA message: 12
OTA message: 12
OTA message: 13
OTA message: 13
OTA message: 13
OTA message: 14
OTA message: 14
OTA message: 14
OTA message: 14
OTA message: 15
OTA message: 15
OTA message: 15
OTA message: 16
OTA message: 16
OTA message: 16
OTA message: 16
OTA message: 16
OTA message: 16
OTA message: 17
OTA message: 17
OTA message: 17
OTA message: 17
OTA message: 17
OTA message: 18
OTA message: 18
OTA message: 18
OTA message: 19
OTA message: 19
OTA message: 19
OTA message: 19
OTA message: 100
Connection closed, all data received
of bytes written: 266399
E (109285) esp_image: invalid segment length 0xffffffff
Error: esp_ota_end failed! err=0x5379. Image is invalid2
OTA message:
[ApiClient] Info: GET: http://hw.airgradient.com/sensors/airgradient:xxxxxx/one/config
[ApiClient] Info: Return code: -1
Display brightness: 100
[ApiClient] Info: POST: http://hw.airgradient.com/sensors/airgradient:xxxx/measures
[ApiClient] Info: DATA: {“wifi”:-63,“pm02Compensated”:5,“boot”:0,“bootCount”:0}
[ApiClient] Info: Return code: 200
Online mode and isPostToAirGradient = true: watchdog reset
Not allowed multiple replys, so i copy the message below:
It kept also showing server not available. So i decided to upgrade again and wipe the device.
After updating it had to be reconnected to Wifi. So i connected to the hotspot and tried to configure it for Wifi. I did choose to show the password, to be sure that is was correct what i typed… But the device gave errors on the Console:
[ 78305][E][WebServer.cpp:649] _handleRequest(): request handler not found
[ 87220][E][WebServer.cpp:649] _handleRequest(): request handler not found
[ 93127][E][WebServer.cpp:649] _handleRequest(): request handler not found
[ 97119][E][WebServer.cpp:649] _handleRequest(): request handler not found
After a while i decided to upgrade again because connecting to the hotspot after powercycle was not stable. After the upgrade connected again to hotspot and did configure the wifi again but this time not with password visible. And the wifi configuration did succeed.
Still it is the same, Server N/A and the OTA did not succeed.
Sensor is working but purple light is on, at the moment.