Api Frame Format; Api Operation (Ap Parameter = 1); Api Operation-With Escaped Characters (Ap Parameter = 2) - Digi XBee-PRO S2C Zigbee User Manual

Rf module
Hide thumbs Also See for XBee-PRO S2C Zigbee:
Table of Contents

Advertisement

API Operation

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
Escape characters
When you are sending or receiving a UART data frame, specific data values must be escaped (flagged)
so they do not interfere with the data frame sequencing. To escape an interfering data byte, insert
0x7D and follow it with the byte to be escaped XOR'd with 0x20.
XBee/XBee-PRO® S2C Zigbee® RF Module
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 frame format
Characters escaped if needed
150

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xbee s2c zigbee

Table of Contents