Device Registration; Api Frame Format; Api Operation (Ap Parameter = 1); Api Operation With Escaped Characters (Ap Parameter = 2) - Digi XBee 3 ZigBee User Manual

Rf module
Table of Contents

Advertisement

API Operation

Device Registration

The following image shows the API frame exchanges that take place at the serial interface when
registering a joining device to a trust center.

API frame format

An API frame consists of the following:
Start delimeter
n
Length
n
Frame data
n
Checksum
n

API operation (AP parameter = 1)

This is the recommended API mode for most applications. The following table shows the data frame
structure when you enable this mode:
Frame fields
Start delimiter
Length
Frame data
Checksum
Any data received prior to the start delimiter is silently discarded. If the frame is not received correctly
or if the checksum fails, the XBee replies with a radio status frame indicating the nature of the failure.

API operation with escaped characters (AP parameter = 2)

Setting API to 2 allows escaped control characters in the API frame. Due to its increased complexity,
we only recommend this API mode in specific circumstances. API 2 may help improve reliability if the
serial interface to the device is unstable or malformed frames are frequently being generated.
When operating in API 2, if an unescaped 0x7E byte is observed, it is treated as the start of a new API
frame and all data received prior to this delimiter is silently discarded. For more information on using
this API mode, see the
Digi XBee® 3 Zigbee® RF Module
Byte
Description
1
0x7E
2 - 3
Most Significant Byte, Least Significant Byte
4 - number (n)
API-specific structure
n + 1
1 byte
Escaped Characters and API Mode 2
API frame format
in the Digi Knowledge base.
237

Advertisement

Table of Contents
loading

Table of Contents