User's Guide
Table Of Contents
- XBee/XBee-PRO S2C 802.15.4 RF Module User Guide
- Technical specifications
- Hardware
- Configure the XBee/XBee-PRO S2C 802.15.4 RF Module
- Modes
- Operation
- AT commands
- Special commands
- Networking and security commands
- C8 (802.15.4 Compatibility)
- CH (Operating Channel)
- ID (Network ID)
- DH (Destination Address High)
- DL (Destination Address Low)
- MY (Source Address)
- SH (Serial Number High)
- SL (Serial Number Low)
- MM (MAC Mode)
- RR (XBee Retries)
- RN (Random Delay Slots)
- ND (Network Discovery)
- NT (Node Discover Timeout)
- NO (Node Discovery Options)
- DN (Discover Node)
- CE (Coordinator Enable)
- SC (Scan Channels)
- SD (Scan Duration)
- A1 (End Device Association)
- A2 (Coordinator Association)
- AI (Association Indication)
- DA (Force Disassociation)
- FP (Force Poll)
- AS (Active Scan)
- ED (Energy Detect)
- EE (Encryption Enable)
- KY (AES Encryption Key)
- NI (Node Identifier)
- NP (Maximum Packet Payload Bytes)
- RF interfacing commands
- Sleep commands
- Serial interfacing commands
- I/O settings commands
- D0 (DIO0/AD0)
- D1 (DIO1/AD1)
- D2 (DIO2/AD2)
- D3 (DIO3/AD3)
- D4 (DIO4)
- D5 (DIO5/ASSOCIATED_INDICATOR)
- D8 (DIO8/SLEEP_REQUEST)
- P0 (RSSI/PWM0 Configuration)
- P1 (PWM1 Configuration)
- P2 (SPI_MISO)
- M0 (PWM0 Duty Cycle)
- M1 (PWM1 Duty Cycle)
- P5 (SPI_MISO)
- P6 (SPI_MOSI Configuration)
- P7 (SPI_SSEL )
- P8 (SPI_SCLK)
- P9 (SPI_ATTN)
- PR (Pull-up/Down Resistor Enable)
- PD (Pull Up/Down Direction)
- IU (I/O Output Enable)
- IT (Samples before TX)
- IS (Force Sample)
- IO (Digital Output Level)
- IC (DIO Change Detect)
- IR (Sample Rate)
- RP (RSSI PWM Timer)
- I/O line passing commands
- Diagnostic commands
- Command mode options
- Operate in API mode
- API mode overview
- API frame specifications
- Escaped characters in API frames
- Frame descriptions
- TX Request: 64-bit address frame - 0x00
- TX Request: 16-bit address - 0x01
- AT Command frame - 0x08
- AT Command - Queue Parameter Value frame - 0x09
- Remote AT Command Request frame - 0x17
- RX Packet: 64-bit Address frame - 0x80
- Receive Packet: 16-bit address frame - 0x81
- RX (Receive) Packet: 64-bit address IO frame- 0x82
- RX Packet: 16-bit address I/O frame - 0x83
- AT Command Response frame - 0x88
- TX Status frame - 0x89
- Modem Status frame - 0x8A
- Remote Command Response frame - 0x97
- Regulatory information
- Load 802.15.4 firmware on ZB devices
- Migrate from XBee through-hole to surface-mount devices
- PCB design and manufacturing
Operation Serial interface
XBee/XBee-PRO S2C 802.15.4 RF Module User Guide
49
parameter) defines the energy level that it takes to block a transmission attempt. For example, if CCA
is set to the default value of 0x2C (which is interpreted as -44 dBm) then energy detected above the -
44 dBm level (for example -40 dBm) temporarily blocks a transmission attempt. But if the energy level
is less than that (for example -50 dBm), the transmission is not blocked. The intent of this feature is to
prevent simultaneous transmissions on the same channel.
CCA can be set down to 0x50 (or -80 dBm), which approaches the sensitivity level. Setting such a
threshold may not work in a noisy environment.
In the event that the energy level exceeds the threshold, the transmission is blocked some random
number of backoff periods. The number of backoff periods is defined by random(2^n - 1) where the
initial value of n is defined by the RN parameter and it increments after each failure. When RN is set to
its default value of 0, then 2^n -1 is 0, preventing any delay before the first energy detection on a new
frame. However, n increments after each CCA failure, giving a greater range for the number of backoff
periods between each energy detection cycle.
In the event that five energy detection cycles occur and each one detects too much energy, the
application tries again 1 to 48 ms later. After the application retries are exhausted, then the
transmission fails with a CCA error.
Whenever the MAC code reports a CCA failure, meaning that it performed five energy detection cycles
with exponential random back-offs, and each one failed, the EC parameter is incremented. The EC
parameter can be read at any time to find out how noisy the operating channel is. It continues to
increment until it reaches its maximum value of 0xFFFF. To get new statistics, you can always set EC
back to 0.
Serial interface
The XBee/XBee-PRO S2C 802.15.4 RF Module interfaces to a host device through a serial port. The
device can communicate through its serial port with:
n Through logic and voltage compatible universal asynchronous receiver/transmitter (UART).
n Through a level translator to any serial device, for example, through an RS-232 or USB
interface board.
n Through a SPI, as described in SPI signals.
Select a serial port
The device has two serial ports and only one is active at a time. To be active, a port must be enabled
and in use.
The UART is always enabled. The SPI is enabled if it is configured. To be configured, SPI_MISO, SPI_
MOSI, SPI_SSEL , and SPI_CLK must all be configured as peripherals. On the surface-mount device,
these lines are configured as peripherals by setting P5, P6, P7, and P8 to 1. This is also the default
configuration for surface-mount devices.
On the through-hole device, those pins are not available and SPI is disabled by default. Therefore, to
configure the SPI pins on a through-hole device, hold DOUT low during a reset. If the UART is not
hooked up, then DOUT can be treated as an input to force the device into SPI mode. It is best to follow
this special operation by a WR operation so that the SPI port will still be enabled on future resets
without forcing DOUT low.
Once the SPI port is enabled by either means, it is still not active until the external SPI master asserts
SPI_SSEL low. After the SPI port is active, the device continues to use the SPI port until the next reset.