Over-the-air firmware/filesystem upgrade process for 802.15.4
Storage
Digi XBee® 3 802.15.4 RF Module User Guide
237
Bytes Field name
Description
0/1
Security Credential
version
If bit 0 of the OTA Header Field Control is set to 1, this indicates the
security credential version type that the client is required to have,
before it will install the image (set to 2).
0/8
Upgrade File
Destination
If bit 1 of the OTA Header Field Control is set to 1, this indicates that
this OTA file contains security credential/certificate 577 data or other
type of information that is specific to a particular device. Currently,
we do not use this feature.
0/2
Hardware/Software
Compatibility
If bit 2 of the OTA Header Field Control is set to 1.
For FOTA images, the file version field contains additional hardware/software compatibility
information. We recommend that if you intend to perform an FOTA update, you use the OTA header
extracted from the file so that you can avoid undesired behavior.
Hardware/software compatibility
The Hardware Software Compatibility number ensures that an incompatible firmware is not flashed
on to the XBee 3 802.15.4 RF Module. To obtain this value, query
on the target device. You can successfully update the device to a firmware if, and only if,
the value of
%C
of the image is greater than or equal to the value returned by the device when you
query
%C
.
Parse the image blocks
To parse the image blocks:
1. Divide the contents of the underlying .gbl file into 48 byte blocks for encrypted networks and 56
byte blocks for unencrypted networks
2. Create Image Block Requests around the image blocks; see
.
Note
The .gbl file is placed at an offset of 75 bytes and so it is important to start parsing the image
from that point in the file.
The Image Block size for 802.15.4 is 64 bytes for both encrypted and non-encrypted networks.
Storage
The FOTA image blocks are received and stored in a separate internal flash slot that is allotted
exclusively for this purpose. Once all the image bytes are written to the slot, the new image must be
validated by the current application before it can be used.
If the new image is deemed invalid, the running 802.15.4 firmware rejects the image and continues
operating with the current, valid application.
ZCL OTA messaging
The following figure provides the messaging sequence between the Server (updater node) and the
Client (target node).