XBee® Wi-Fi RF Modules
© 2013 Digi International, Inc. 70
Remote AT commands
The following image shows the API frame exchanges that take place at the UART or SPI
when sending a remote AT command. A remote command response frame is not sent
out the UART or SPI if the remote module does not receive the remote command.
Supporting the API
Applications that support the API should make provisions to deal with new API frames
that may be introduced in future releases. For example, a section of code on a host
microprocessor that handles received serial API frames (sent out the module's DOUT
pin) might look like this:
void XBee_HandleRxAPIFrame(_apiFrameUnion *papiFrame){
switch(papiFrame->api_id){
case RX_RF_DATA_FRAME:
//process received RF data frame break;
case RX_IO_SAMPLE_FRAME:
//process IO sample frame break;
default:
//Discard any other API frame types that are not being used break;
}
}