XBee® Wi-Fi RF Modules
© 2013 Digi International, Inc. 64
The contents of the .ebin file should be sent to the target radio using general purpose
memory WRITE commands. The entire GPM should be erased prior to beginning an
upload of an .ebin file. The contents of the .ebin file should be stored in order in the
appropriate GPM memory blocks. The number of bytes that are sent in an individual
GPM WRITE frame is flexible and can be catered to the user application.
Example:
If the size of the .ebin file is 217,088 bytes, then it could be sent to the module in 1024
byte blocks as follows:
CPT_BLOCK_NUM GPM_START_INDEX GPM_NUM_BYTES .ebin bytes
0 0
1024 0 to 1023
0 1024
1024 1024 to 2047
0 2048
1024 2048 to 3071
0 3072
1024 3071 to 4095
1 0
1024 4096 to 5119
1 1024
1024 5120 to 6143
- -
- -
- -
- -
- -
- -
52 1024
214,016 to
52 2048
215,040 to
216,063
52 3072
217,087
Verifying the New Application
For an uploaded application to function correctly every single byte from the .ebin file
must be properly transferred to the GPM. To guarantee that this is the case GPM VERIFY
functions exist to ensure that all bytes are properly in place. The FIRMWARE_VERIFY
function reports whether or not the uploaded data is valid. The
FIRMWARE_VERIFY_AND_INSTALL command will report if the uploaded data is invalid. If
the data is valid it will begin installing the application. No installation will take place on
invalid data.
Installing the Application
When the entire .ebin file has been uploaded to the GPM of the target node a
FIRMWARE_VERIFY_AND_INSTALL command can be issued. Once the target receives
the command it will verify the .ebin file loaded in the GPM. If it is found to be valid then
the module will install the new firmware. This installation process can take up to 8
seconds. During the installation the module will be unresponsive to both serial and RF
communication. To complete the installation the target module will reset. AT parameter
settings which have not been written to flash (using the WR command) will be lost.