FOTA notifications %FOTA

nRF93M1 Cellular AT Commands

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.
1 – Delta.
<usable_bytes>
Integer. Number of bytes that can be written to the zone.
<bytes>
Integer. Number of bytes written so far. In the DOWNLOAD_DONE notification, 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.
0 – The final chunk.
1 – Additional 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.
NO_URL – <mode> 1 was issued with no URL cached by an earlier <mode> 0 check.
PDU_ALLOC – The CoAP PDU could not be allocated.
SEND_FAILED – The CoAP send failed. The session is torn down.
TIMEOUT – No response was received within the 15-second window of the request. The session is torn down.
NACK – The CoAP library reported a NACK instead of a response.
DISCONNECTED – The DTLS session left the established state during the download.
BLOCK_TIMEOUT,<block> – A 15-second timeout occurred on a download block.
NACK_BLOCK,<block> – A NACK was received on a download block.
CODE_<class>.<detail> – The update check returned a response code outside class 2.
CODE_<class>.<detail>_BLOCK_<block> – A download block returned a response code outside class 2.
COAP_<class>.<detail> – A host OTA chunk request returned a response code outside class 2.
URL_TOO_LARGE – The URL returned by the server exceeds 2048 bytes.
NO_MEMORY – A heap allocation failed.
DELTA_TOO_LARGE,<bytes> – The delta package does not fit in the zone.
FLASH_WRITE_BLOCK_<block> – Writing the delta package to flash failed on a block.
VERIFY_FAILED,<state> – Verification of the delta package failed.
BASE64_FAILED – Base64 encoding of a host OTA chunk 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.