The proprietary %FOTA Unsolicited Result Code (URC)s report the progress and the result of a firmware update started with the %NRFCLOUDFOTA command.v1.5.x
Progress notifications
Notification syntax:
%FOTA: CHECKING
%FOTA: UPDATE_AVAILABLE
%FOTA: NO_UPDATE
%FOTA: ZONE,<zid>,<usable_bytes>
%FOTA: ERASING
%FOTA: DOWNLOADING
%FOTA: DOWNLOADING,<bytes>
%FOTA: DOWNLOAD_DONE,<bytes>
%FOTA: VERIFYING
%FOTA: VERIFIED
%FOTA: UPGRADING
%FOTA: <base64>,<crc16>,<has_more>
The notifications and their meanings are the following:
- CHECKING
- The update check has started.
- UPDATE_AVAILABLE
- An update is available for download.
- NO_UPDATE
- No update is available.
- ZONE,<zid>,<usable_bytes>
- The FOTA Non-volatile Memory (NVM) zone and the number of bytes that can be written to it. Reported before the zone is erased.
- ERASING
- The FOTA delta zone is being erased.
- DOWNLOADING
- The download has started.
- DOWNLOADING,<bytes>
- Download progress. Reported for every 16 blocks and for the last block.
- DOWNLOAD_DONE,<bytes>
- The last block is received.
- VERIFYING
- The delta package is being verified.
- VERIFIED
- The delta package is accepted.
- UPGRADING
- The module is resetting to apply the delta update.
- <base64>,<crc16>,<has_more>
- The requested host Over-the-Air (OTA) chunk. Reported as the last
response line before
OK.
The notification parameters and their defined values are the following:
- <zid>
- Integer, 1. FOTA NVM zone identifier.
- <usable_bytes>
- Integer. Number of bytes that can be written to the zone.
- <bytes>
- Integer. Number of bytes written so far. In the
DOWNLOAD_DONEnotification, the full size of the delta package. - <base64>
- String. Standard Base64 encoding of the host OTA chunk payload.
- <crc16>
- String. CRC-16/CCITT-FALSE of the raw host OTA chunk payload encoded as hexadecimal.
- <has_more>
- Integer, 0–1. Indicates whether more host OTA chunks are available.
Error notifications
Notification syntax:
%FOTA: ERROR,<reason>
The notification parameter and its defined values are the following:
- <reason>
- String. Reason the update failed.
The error detail parameters and their defined values are the following:
- <block>
- Integer. Number of the download block that failed.
- <bytes>
- Integer. Number of bytes received when the failure was detected.
- <state>
- Integer. Delta state reported by the verification.
- <class>
- Integer. Class of the CoAP response code. See CoAP response codes.
- <detail>
- Integer. Detail of the CoAP response code written with two digits. See CoAP response codes.