OTA
OTA package notification
To indicate it's current software/firmware version, the device publishes Firmware and Device Info
message. The server then evaluates whether an update is necessary and, if so, publishes a message on the downlink/ota/json topic:
{
"url": "https://blynk.cloud/static/file.tar.gz?token=jOuWQWu_bOANvBPzz4LllPDMk7sYAAQMa",
"size": 20082,
"type": "TMPLabcd1234",
"ver": "0.5.0",
"build": "Mar 05 2024 18:29:27"
}
The device must verify whether the update is feasible and then download the OTA package using HTTP
/HTTPS
. Additionally, the HTTP Response Headers provide valuable information:
x-sha256
- Base64-encoded SHA256 digest of the OTA packagex-md5
- HEX-encoded MD5 digest of the OTA packagex-fw-type
- The firmware typex-fw-ver
- The firmware version stringx-fw-build
- The firmware build time
After installing the update, the device re-connects to Blynk.Cloud and publishes the updated Firmware and Device Info
message.
mosquitto_sub -h blynk.cloud -p 8883 -u device -P '{DEVICE_TOKEN}' -t 'downlink/ota/json'
Last updated
Was this helpful?