EasyManuals Logo
Home>Digi>Control Unit>XBee

Digi XBee User Manual

Digi XBee
307 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #151 background imageLoading...
Page #151 background image
API Operation API frame format
XBee/XBee-PR S2C ZigBe RF Module
151
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:
n AP = 1: API operation.
n AP = 2: API operation (with escaped characters—only possible on UART).
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 Byte Description
Start delimiter 1 0x7E
Length 2 - 3 Most Significant Byte, Least Significant Byte
Frame data 4 - n API-specific structure
Checksum n + 1 1 byte
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 Byte Description
Start delimiter 1 0x7E
Length 2 - 3 Most Significant Byte, Least Significant Byte Characters escaped if needed
Frame data 4 - n API-specific structure
Checksum n + 1 1 byte
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 XORd with 0x20.

Table of Contents

Other manuals for Digi XBee

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Digi XBee and is the answer not in the manual?

Digi XBee Specifications

General IconGeneral
BrandDigi
ModelXBee
CategoryControl Unit
LanguageEnglish

Related product manuals