OTA file system upgrades
OTA file system updates: OEM
Digi XBee® 3 802.15.4 RF Module User Guide
262
3.
Create the OTA file system image
4.
Perform the OTA file system update
Generate a public/private key pair
Generate ECDSA signing keys using secp256r1 curve parameters (also known as prime256v1 or NIST
P-256).
To generate a public/private key pair using OpenSSL, run the following command:
openssl ecparam -name prime256v1 -genkey -outform pem -out keypair.pem
To extract the private key from the key pair generated above:
openssl pkcs8 -topk8 -inform pem -in pair.pem -outform pem -nocrypt -out
private.pem
To extract the public key from the key pair generated above:
openssl ec -in keypair.pem -pubout -out public.pem
Set the public key on the XBee 3 device
The public keys generated by XCTU and OpenSSL are stored in *.pem files. These files need to be
parsed to get the value to use when setting
FK
. To parse a public key file, run:
openssl asn1parse -in public.pem -dump
The command will produce something like the following output:
0:d=0
hl=2 l=
89 cons: SEQUENCE
2:d=1
hl=2 l=
19 cons: SEQUENCE
4:d=2
hl=2 l=
7 prim: OBJECT
:id-ecPublicKey
13:d=2
hl=2 l=
8 prim: OBJECT
:prime256v1
23:d=1
hl=2 l=
66 prim: BIT STRING
0000 - 00 04 95 50 aa 55 b6 f5-5d 99 4d d8 15 d1 71 57
...P.U..].M...qW
0010 - 51 80 d5 14 ec 1f 6a 15-51 a2 c4 b8 0f 77 10 8a
Q.....j.Q....w..
0020 - 33 a3 80 07 47 40 14 8b-5c a7 4c 78 02 fc 4d 82
3...G@..\.Lx..M.
0030 - 90 4b 39 98 62 a1 1d 97-6e 78 fb 54 62 06 d2 41
.K9.b...nx.Tb..A
0040 - c7 3b
The public key should be 65 bytes long - it is the BIT STRING value at the end, with the leading 00
omitted; in this case:
049550aa55b6f55d994dd815d171575180d514ec1f6a1551a2c4b80f77108a33a380074740148b5ca
74c7802fc4d82904b399862a11d976e78fb546206d241c73b
Create the OTA file system image
You can create a file system image outside of XCTU using any utility that can perform ECDSA signing.
These instructions show how to do so using OpenSSL. To create an OTA file system image, use the
following steps.
Create a staged file system
In order to create a usable file system image, first create a 'staged' copy of the file system you want
to send on a local device.