Firmware upgrade on the air (OTA)

Our Platform offers over-the-air (OTA) firmware upgrade support to products manufacturers with minimal coding.

It allows you to distribute your firmware over Wi-Fi or mobile broadband using our API without requiring the user to connect the device to a computer via USB to perform the update, because firmware updates are available for download from our Platform OTA service.

Firmware manager

The firmware manager lets you to manage and publish your firmwares upgrades for your thing model and micro controller unit (MCU) through the panel.

2746

The following features will be available:

  • Create and upload new firmware versions.
  • List all available versions.
  • Delete firmware versions.

API Basics

Get latest firmware version

Query for the latest firmware informations for the model of the thing corresponding to the specified THINGTOKEN.

It will return all the latest firmwares registered for every micro-controller (MCU).

# HTTP API example via cURL
curl -i -H "Accept: application/json" \
  -X GET "https://api.thethings.io/v2/things/{ {THINGTOKEN} }/firmwares/latest" -k
# Subscribe for the response
mosquitto_sub -h "mqtt.thethings.io" -t "v2/things/{ {thingToken} }/firmwares/latest/response" -d

# Publish request
mosquitto_pub -h "mqtt.thethings.io" -t "v2/things/{ {thingToken} }/firmwares/latest/request" -m '{"_requestId":"[randomId]"}' -d
{
  "status": "success",
  "firmwares": [
    { productId: 1234,
      version: '1.0.1',
      notes: 'Wifi firmware changelog',
      _id: '56c5a331665c14fa09612f38',
      createdAt: '2016-02-18T10:55:45.517Z',
      file:
       { id: '56c5a331665c14fa09612f35',
         md5: '0ad066a5d29f3f2a2a1c7c17dd082a79',
         type: 'gfs',
         url: 'https ://api.thethings.io/v2/models/125/firmwares/download/ey...oeZPc1raYnhDe7mLo' },
      targetMCU: 'WiFi'
    },
    { productId: 1234,
      version: '1.0.2',
      notes: 'Main board firmware changelog',
      _id: '56c5a331665c14fa09612f39',
      createdAt: '2016-02-18T10:55:45.519Z',
      file:
       { id: '56c5a331665c14fa09612f34',
         md5: '0ad066a5d29f3f2a2a1c7c17dd082a79',
         type: 'gfs',
         url: 'https ://api.thethings.io/v2/models/125/firmwares/download/ey...ljMAXtn3snvSz0dT1Rw' },
      targetMCU: 'Main'
    } ]
}

Download Firmware

Download the firmware using the FIRMWAREID (from the previous api call) and THINGTOKEN.

# HTTP API example via cURL
curl -i -H "Accept: application/json" \
  -X GET "https://api.thethings.io/v2/things/{ {THINGTOKEN} }/firmwares/download/{ {firmwareId} }" -k
# Subscribe for the response
mosquitto_sub -h "mqtt.thethings.io" -q 0 -t "v2/things/{ {thingToken} }/firmwares/download/{ {firmwareId} }/response" -d

# Publish request
mosquitto_pub -h "mqtt.thethings.io" -q 0 -t "v2/things/{ {thingToken} }/firmwares/download/{ {firmwareId} }/request" -m '{"_requestId":"RAW"}' -d