OTA - over the air firmware update

This guide describes how to remotely update firmware with mDash.

  1. If your device is not yet connected to mDash, follow the quick start to connect
  2. Export your firmware file:
    • Arduino: in Arduino IDE menu, select "Sketch" > "Export compiled binary"
    • ESP-IDF: execute make all in the project directory. That will produce build/PROJECT_NAME.bin file
    • Mongoose OS: execute mos build in the project directory. That will produce build/fw.zip file
  3. In mDash device dashboard, click on "OTA update" link. A file selection dialog appears
  4. Navigate to the firmware file and select it
  5. Done! Just wait until the OTA is finished.

The animation below shows an example for the compiled Arduino sketch:

OTA updates using curl

Since OTA updates are using REST API, you can update your devices programmatically. One way to do it is to use a curl utility. Here is the command:

curl -F file=@PATH/TO/FIRMWARE.BIN https://mdash.net/api/v2/devices/DEVICE_ID/ota?access_token=API_TOKEN

The API_TOKEN you can get in the mDash's Keys tab. Example:

curl -F file=@build/fw.bin https://mdash.net/api/v2/devices/device4/ota?access_token=2319oafvm9x23423ds