XBee® Wi-Fi RF Modules
© 2013 Digi International, Inc. 60
WRITE _RESPONSE (0x82) and ERASE_THEN_WRITE_RESPONSE(0x83):
When a WRITE or ERASE_THEN_WRITE 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 WRITE_RESPONSE (0x82) or
ERASE_THEN_WRITE_RESPONSE (0x83).
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 write 15 bytes of incrementing data to flash block 22 of a target radio with serial
number of 0x0013a200407402ac, a WRITE packet should be formatted as follows
(spaces added to delineate fields):
7E 002B 11 01 0013A200407402AC FFFE E6 E6 0023 C105 00 C0 02 00 0016 0000 000F
0102030405060708090A0B0C0D0E0F C5
Assuming all transmissions were successful and that flash block 22 was previously
erased, the following API packets would be output the source node's serial interface:
7E 0007 8B 01 FFFE 00 00 00
76 7E 001A 91 0013A200407402AC FFFE E6 E6 0023 C105 C1 82 00 0016 0000 0000 4C
READ (0x04):
The READ command can be used to read the specified number of bytes from the GPM
location specified. Data can be queried from only one GPM block per command.
Field Name Command –Specific Description
GPM_CMD_ID Should be set to READ (0x04).
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 read.
GPM_START_INDEX
Set to the byte index within the GPM block where the given data
should be read.
GPM_NUM_BYTES
Set to the number of data bytes to be read. Only one GPM block
can be operated on per command. For this reason,
GPM_START_INDEX + GPM_NUM_BYTES cannot be greater than
the GPM block size. It is also important to remember that the
number of bytes sent in an explicit API frame (including the GPM
command fields) cannot exceed the maximum payload size of the
radio. The maximum payload size can be queried with the NP AT
command.
GPM_DATA No data bytes should be specified for this command.