Firmware updates
After the first USB flash, boards update over the network. Settings and the admin password are kept across updates.
Build
There are two images, one for each generation of the ESP32-P4 chip:
idf.py build
idf.py -B build-rev1 -D SDKCONFIG=build-rev1/sdkconfig \
-D SDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.rev1" build
| Image | Boards |
|---|---|
build/etherjax.bin | Waveshare ESP32-P4-WIFI6-POE-ETH, M5Stack Unit PoE-P4X |
build-rev1/etherjax.bin | M5Stack Unit PoE-P4 (U213) |
A board refuses the wrong image before installing anything, with an error
such as image is for chip revision v1.x; this board is v3.2.
Update one board
On the board's page, under Firmware, choose the file and Update. Or from a script:
curl -u admin --data-binary @build/etherjax.bin http://etherjax-XXXX.local/api/ota
Update every board
On the matrix, choose the file under Firmware. The page reads its version and updates every board that isn't on it yet, one at a time, waiting for each to come back before starting the next. The board serving the page goes last.
With both kinds of board on the network, run it once with each image. Boards that need the other image refuse it and show why, and the rest carry on.
Rollback
The new image goes into the board's spare firmware slot, and the board reboots into it on probation. It keeps the new firmware once its health checks (see health and self-healing) have run for 20 seconds without a fault, about 40 seconds after boot.
If the new firmware crashes, hangs or fails a health check before then, the board goes back to the previous firmware.
On the Waveshare board, firmware that brings newer Wi-Fi chip firmware installs it once it is confirmed, and the board restarts once more.
Firmware on the board's page shows the Version, when it was Built, which Slot it is running from, and the Last reset reason.
Boards flashed before network updates
Boards flashed before network updates existed need one more USB flash, to install the two-slot layout that network updates use.