User Manual

XBee® Wi-Fi RF Modules
© 2012 Digi International, Inc. 50
Accessing General Purpose Flash Memory
The GPM of a target node can be accessed from the XBee serial port or from a non-XBee
network client.
Serial port access is done by sending explicit API frames to the MEMORY_ACCESS cluster
ID (0x23) on the DIGI_DEVICE endpoint (0xE6) of the target node. (Explicit API frames
have frame identifier 0x11 and are described in the API Operation section.)
Access from a non-XBee network client is done by sending UDP frames to the target
node on port 0x0BEE. The payload begins with an application header followed by the
GPM header described below. (Refer to the Network Client section of the XBee
Application Service section to learn how to format the application header.)
The following header is used to generate a GPM command. It should be used whether
using serial port access or network client access. For network client access, an
application header needs to precede the GPM header. To keep things simple, this
section is written from the perspective of serial port access, without the application
header. Do not forget to precede each frame with an application header if using a
network client for GPM access.
Byte Offset in
Payload
Number of
Bytes
Field Name General Field Description
0 1 GPM_CMD_ID Specific GPM commands are described below
1 1 GPM_OPTIONS Command-specific option
2 2* GPM_BLOCK_NUM The block number addressed in the GPM
4
2*
GPM_START_INDEX
The byte index within the addressed GPM block
6
2* GPM_NUM_BYTES
Then number of bytes in the GPM_DATA field,
or in the case of a READ, the number of bytes
requested
8 Varies GPM_DATA
*Multi-byte parameters should be specified with big-endian byte ordering.
When a GPM command is sent to a radio via a unicast the receiving radio will unicast a
response back to the requesting radio's source endpoint specified in the request packet.
No response is sent for broadcast requests. If the source endpoint is set to the
DIGI_DEVICE endpoint (0xE6) or explicit API mode is enabled on the requesting radio
then a GPM response will be output as an explicit API RX indicator frame on the
requesting node (assuming API mode is enabled.) The format of the response is very
similar to the request packet:
Byte Offset in
Payload
Number of
Bytes
Field Name General Field Description
0 1 GPM_CMD_ID This field will be the same as the request field
1
1 GPM_STATUS
Status indicating whether the command was
successful
2 2* GPM_BLOCK_NUM The block number addressed in the GPM
4 2* GPM_START_INDEX The byte index within the addressed GPM block
6
2*
GPM_NUM_BYTES
Then number of bytes in the GPM_DATA field
8 Varies GPM_DATA
*Multi-byte parameters should be specified with big-endian byte ordering.