Operate In Api Mode; Api Mode Overview; Api Frame Format; Api Operation (Ap Parameter = 1) - Digi XBee-PRO S3 User Manual

900hp/xsc rf modules
Hide thumbs Also See for XBee-PRO S3:
Table of Contents

Advertisement

Operate in API mode

API mode overview

As an alternative to Transparent operating mode, you can use API operating mode. API mode provides
a structured interface where data is communicated through the serial interface in organized packets
and in a determined order. This enables you to establish complex communication between devices
without having to define your own protocol. The API specifies how commands, command responses
and device status messages are sent and received from the device using the serial interface or the
SPI interface.
We may add new frame types to future versions of firmware, so build the ability to filter out additional
API frames with unknown frame types into your software interface.

API frame format

The firmware supports two API operating modes: without escaped characters and with escaped
characters. Use the AP command to enable either mode. To configure a device to one of these modes,
set the following AP parameter values:
AP = 1: API operation.
n
AP = 2: API operation (with escaped characters—only possible on UART).
n
The API data frame structure differs depending on what mode you choose.

API operation (AP parameter = 1)

The following table shows the data frame structure when you enable AP = 1:
Frame fields
Start delimiter
Length
Frame data
Checksum
The firmware silently discards any data it receives prior to the start delimiter. If the device does not
receive the frame correctly or if the checksum fails, the device replies with a device status frame
indicating the nature of the failure.

API operation-with escaped characters (AP parameter = 2)

This mode is only available on the UART, not on the SPI serial port. The following table shows the data
frame structure when you enable AP = 2:
Frame fields
Start delimiter 1
Length
Frame data
Checksum
XBee®-PRO 900HP/XSC RF Modules
Byte
Description
1
0x7E
2 - 3
Most Significant Byte, Least Significant Byte
4 - n
API-specific structure
n + 1
1 byte
Byte Description
0x7E
2 - 3
Most Significant Byte, Least Significant Byte
4 - n API-specific structure
n + 1 1 byte
API mode overview
Characters escaped if needed
115

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xbee-pro s3b

Table of Contents