User Manual
XBee® Wi-Fi RF Modules
© 2012 Digi International, Inc. 52
ERASE (0x01):
The ERASE command erases (writes all bits to binary 1) one or all of the GPM flash
blocks. The ERASE command can also be used to erase all blocks of the GPM by setting
the GPM_NUM_BYTES field to 0.
Field Name
Command –Specific Description
GPM_CMD_ID
Should be set to ERASE (0x01).
GPM_OPTIONS
There are currently no options defined for the ERASE command.
Set this field to 0.
GPM_BLOCK_NUM
Set to the index of the GPM block that should be erased. When
erasing all GPM blocks, this field is ignored (set to 0).
GPM_START_INDEX
The ERASE command only works on complete GPM blocks. The
command cannot be used to erase part of a GPM block. For this
reason, GPM_START_INDEX is unused (set to 0).
GPM_NUM_BYTES
Setting GPM_NUM_BYTES to 0 has a special meaning. It indicates
that every flash block in the GPM should be erased (not just the
one specified with GPM_BLOCK_NUM). In all other cases, the
GPM_NUM_BYTES field should be set to the GPM flash block size.
GPM_DATA
No data bytes should be specified for this command.
ERASE_RESPONSE (0x81):
When an ERASE command request has been unicast to a node, that node will send a
response in the following format to the source endpoint specified in the requesting
frame.
Field Name Command –Specific Description
GPM_CMD_ID Should be set to ERASE_RESPONSE (0x81).
GPM_STATUS
A 1 in the least significant bit indicates an error occurred. All
other bits are reserved at this time.
GPM_BLOCK_NUM
Matches the parameter passed in the request frame.
GPM_START_INDEX
GPM_NUM_BYTES
The number of bytes in the GPM_DATA field. For this command,
this field will be set to 0.
GPM_DATA No data bytes should be specified for this command.
Example:
To erase flash block 42 of a target radio with serial number of 0x0013a200407402ac, an
ERASE packet should be formatted as follows (spaces added to delineate fields):
7E 001C 11 01 0013A200407402AC FFFE E6 E6 0023 C105 00 C0 01 00 002A 0000 0200 37
Assuming all transmissions were successful, the following API packets would be output
the source node's serial interface:
7E 0007 8B 01 FFFE 00 00 00 76