Digi XBee S2C Zigbee User Manual

Digi XBee S2C Zigbee User Manual

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

Advertisement

Quick Links

XBee®/XBee-PRO S2C Zigbee®
RF Module
User Guide

Advertisement

Table of Contents
loading

Summary of Contents for Digi XBee S2C Zigbee

  • Page 1 XBee®/XBee-PRO S2C Zigbee® RF Module User Guide...
  • Page 2 Added translated safety instructions. Trademarks and copyright Digi, Digi International, and the Digi logo are trademarks or registered trademarks in the United States and other countries worldwide. All other trademarks mentioned in this document are the property of their respective owners.
  • Page 3 Contact Digi technical support: Digi offers multiple technical support plans and service packages. Contact us at +1 952.912.3444 or visit us at www.digi.com/support. Feedback To provide feedback on this document, email your comments to techcomm@digi.com Include the document title and part number (XBee/XBee-PRO® S2C Zigbee® RF Module User Guide, 90002002 AM) in the subject line of your email.
  • Page 4: Table Of Contents

    Contents XBee/XBee-PRO® S2C Zigbee® RF Module User Guide Note on product naming Applicable firmware and hardware Firmware release notes Safety instructions Safety instructions XBee modules Инструкции за безопасност XBee модули Sigurnosne upute XBee moduli Bezpečnostní instrukce moduly XBee Sikkerhedsinstruktioner XBee moduler Veiligheidsinstructies XBee-modules Ohutusjuhised...
  • Page 5 Instructiuni de siguranta module XBee Bezpečnostné inštrukcie moduly XBee Varnostna navodila XBee moduli Módulos XBee Säkerhets instruktioner XBee-moduler Technical specifications Performance specifications Power requirements General specifications Networking and security specifications Communication interface specifications Regulatory conformity summary Serial communication specifications UART pin assignments SPI pin assignments GPIO specifications Hardware specifications for the programmable variant...
  • Page 6 Serial transmit buffer UART flow control CTS flow control RTS flow control Break control Serial interface protocols Transparent operating mode API operating mode Compare Transparent and API operation Modes Idle mode Transmit mode Receive mode Command mode Sleep mode Zigbee networks The Zigbee specification Definitions Zigbee node types...
  • Page 7 Orphan scans End device joining Parent connectivity Reset the end device Leave a network Example: join a network Zigbee channel scanning Manage multiple Zigbee networks Filter PAN ID Configure security keys Prevent unwanted devices from joining Application messaging framework Transmission, addressing, and routing Addressing 64-bit device addresses 16-bit device addresses...
  • Page 8 Zigbee security Security modes Zigbee security model Network layer security APS layer security Trust center Forming or joining a secure network Implement security on the XBee/XBee-PRO Zigbee RF Module Enabling security Setting the network security key Set the APS trust center link key Enable APS encryption Use a trust center Security examples...
  • Page 9 Transmit RF data Receiving RF data I/O sampling Wake end devices with the Commissioning Pushbutton Parent verification Rejoining Router/Coordinator configuration RF packet buffering timeout Child poll timeout Transmission timeout Short sleep periods Extended sleep periods Sleep examples Example 1: Configure a device to sleep for 20 seconds, but set SN such that the On/sleep line will remain de-asserted for up to 1 minute Example 2: Configure an end device to sleep for 20 seconds, send 4 I/O samples in 2 seconds, and return to sleep...
  • Page 10 Example Frame descriptions Local AT Command Request - 0x08 Description Format Examples Queue Local AT Command Request - 0x09 Description Examples Transmit Request - 0x10 Description Transmit options bit field Examples Explicit Addressing Command Request - 0x11 Description 64-bit addressing 16-bit addressing Zigbee-specific addressing information Reserved endpoints...
  • Page 11 Remote AT Command Response- 0x97 Description Examples Extended Modem Status - 0x98 Description Secure Session status codes Examples Status code descriptions Over-the-Air Firmware Update Status - 0xA0 Route Record Indicator - 0xA1 Description Examples Many-to-One Route Request Indicator - 0xA3 Description Examples AT commands...
  • Page 12 CI (Cluster ID) TO (Transmit Options) RF interfacing commands PL (TX Power Level) PP (Power at PL4) PM (Power Mode) Security commands EE (Encryption Enable) EO (Encryption Options) KY (Link Key) NK (Trust Center Network Key) Serial interfacing commands BD (Interface Data Rate) NB (Parity) SB (Stop Bits) RO (Packetization Timeout)
  • Page 13 RP (RSSI PWM Timer) I/O sampling commands IR (I/O Sample Rate) IC (Digital Change Detection) V+ (Voltage Supply Monitoring) Diagnostic commands VR (Firmware Version) HV (Hardware Version) AI (Association Indication) %V (Voltage Supply Monitoring) DB (Received Signal Strength) TP (Temperature) VL (Version Long) Execution commands AC (Apply Changes)
  • Page 14 CE and UKCA OEM labeling requirements Declarations of conformity Antennas ISED (Innovation, Science and Economic Development Canada) Labeling requirements For XBee ZB surface-mount: For XBee-PRO ZB surface-mount: For XBee-PRO ZB Model PS2C5 surface-mount: For XBee ZB through-hole: For XBee-PRO ZB through-hole: Transmitters for detachable antennas Detachable antenna For XBee S2D SMT:...
  • Page 15: Xbee/Xbee-Pro® S2C Zigbee® Rf Module User Guide

    XBee/XBee-PRO® S2C Zigbee® RF Module User Guide This manual describes the operation of the XBee/XBee-PRO Zigbee RF Module, which consists of Zigbee firmware loaded onto XBee S2C and PRO S2C hardware. The XBee/XBee-PRO Zigbee RF Modules provide wireless connectivity to end-point devices in Zigbee mesh networks.
  • Page 16: Note On Product Naming

    Applicable firmware and hardware This manual supports the following firmware: 401x, 402x, 403x, 404x, 405x (S2C), 406x 705x A06x—contact Digi to view the associated migration guide. It supports the following hardware: XBee S2C Firmware release notes You can view the current release notes in the Firmware Explorer section of XCTU. For instructions on downloading and using XCTU, see digi.com/products/xbee-rf-solutions/xctu-software/xctu.
  • Page 17 Safety instructions Safety instructions Инструкции за безопасност Sigurnosne upute Bezpečnostní instrukce Sikkerhedsinstruktioner Veiligheidsinstructies Ohutusjuhised Turvallisuusohjeet Consignes de sécurité Sicherheitshinweise Οδηγίες ασφ αλείας Biztonsági utasítások Istruzioni di sicurezza Drošības instrukcijas Saugos instrukcijos Sikkerhetsinstruksjoner Instrukcje bezpieczeństwa Instruções de segurança Instructiuni de siguranta Bezpečnostné...
  • Page 18: Safety Instructions

    Safety instructions Safety instructions Safety instructions XBee modules The XBee radio module cannot be guaranteed operation due to the radio link and so should not be used for interlocks in safety critical devices such as machines or automotive applications. The XBee radio module have not been approved for use in (this list is not exhaustive): medical devices nuclear applications explosive or flammable atmospheres...
  • Page 19: Sigurnosne Upute

    Safety instructions Sigurnosne upute Използвайте този продукт с антените, посочени в ръководствата за потребителя на модула XBee. Крайният потребител трябва да бъде казано как да премахне захранването от радиомодула XBee или да разположи антените на 20 см от хора или животни. Sigurnosne upute XBee moduli Radio modulu XBee ne može se jamčiti rad zbog radio veze i stoga se ne smije koristiti za...
  • Page 20: Sikkerhedsinstruktioner

    Safety instructions Sikkerhedsinstruktioner Při manipulaci buďte opatrní, aby nedošlo k elektrickému poškození desky plošných spojů a součástí. Nevystavujte rádiové moduly XBee vodě nebo vlhkosti. Používejte tento produkt s anténami uvedenými v uživatelských příručkách modulu XBee. Koncový uživatel musí být informován, jak odpojit napájení rádiového modulu XBee nebo jak umístit antény 20 cm od lidí...
  • Page 21: Ohutusjuhised

    Safety instructions Ohutusjuhised Er zijn geen door de gebruiker te onderhouden componenten in de XBee-radiomodule. Verwijder het schild niet en wijzig de XBee op geen enkele manier. Modificaties kunnen de module uitsluiten van enige garantie en kunnen ertoe leiden dat de XBee-radio werkt buiten de regelgeving voor een bepaald land, wat kan leiden tot de mogelijke illegale werking van de radio.
  • Page 22: Consignes De Sécurité

    Safety instructions Consignes de sécurité lukitsemiseen. XBee-radiomoduulia ei ole hyväksytty käytettäväksi (tämä luettelo ei ole tyhjentävä): lääketieteelliset laitteet ydinvoimasovellukset räjähdysvaarallisiin tai syttyviin tiloihin XBee-radiomoduulin sisällä ei ole käyttäjän huollettavia osia. Älä poista suojusta tai muokkaa XBeetä millään tavalla. Muutokset voivat sulkea moduulin takuun ulkopuolelle ja aiheuttaa sen, että...
  • Page 23: Sicherheitshinweise

    Safety instructions Sicherheitshinweise Sicherheitshinweise XBee-Module Der Betrieb des XBee-Funkmoduls kann aufgrund der Funkverbindung nicht garantiert werden und sollte daher nicht für Verriegelungen in sicherheitskritischen Geräten wie Maschinen oder Automobilanwendungen verwendet werden. Das XBee-Funkmodul ist nicht zugelassen für den Einsatz in (diese Liste ist nicht vollständig): Medizinprodukte nukleare Anwendungen explosive oder brennbare Atmosphären...
  • Page 24: Biztonsági Utasítások

    Safety instructions Biztonsági utasítások Προσέχετε κατά το χειρισμό για να αποφ ύγετε ηλεκτρική βλάβη στο PCB και στα εξαρτήματα. Μην εκθέτετε τις μονάδες ραδιοφ ώνου XBee σε νερό ή υγρασία. Χ ρησιμοποιήστε αυτό το προϊόν με τις κεραίες που καθορίζονται στους οδηγούς χρήσης της μονάδας...
  • Page 25: Drošības Instrukcijas

    Safety instructions Drošības instrukcijas illegale della radio. Utilizzare la protezione ESD standard del settore durante la manipolazione del modulo XBee. Prestare attenzione durante la manipolazione per evitare danni elettrici al PCB e ai componenti. Non esporre i moduli radio XBee all'acqua o all'umidità. Utilizzare questo prodotto con le antenne specificate nelle guide per l'utente del modulo XBee.
  • Page 26: Sikkerhetsinstruksjoner

    Safety instructions Sikkerhetsinstruksjoner XBee radijo modulio viduje nėra komponentų, kuriuos vartotojas galėtų prižiūrėti. Jokiu būdu nenuimkite skydo ir nekeiskite XBee. Dėl modifikacijų moduliui gali būti netaikoma jokia garantija, o „XBee“ radijas gali veikti ne pagal tam tikros šalies norminius reikalavimus, o tai gali sukelti neteisėtą...
  • Page 27: Instruções De Segurança

    Safety instructions Instruções de segurança wyroby medyczne zastosowania nuklearne atmosferach wybuchowych lub łatwopalnych Wewnątrz modułu radiowego XBee nie ma żadnych elementów, które mogłyby być serwisowane przez użytkownika. Nie zdejmuj osłony ani nie modyfikuj XBee w żaden sposób. Modyfikacje mogą wykluczyć moduł z jakiejkolwiek gwarancji i spowodować, że radio XBee będzie działać...
  • Page 28: Instructiuni De Siguranta

    Safety instructions Instructiuni de siguranta Instructiuni de siguranta module XBee Nu se poate garanta funcționarea modulului radio XBee din cauza conexiunii radio și, prin urmare, nu trebuie utilizat pentru interblocări în dispozitive critice pentru siguranță, cum ar fi mașini sau aplicații auto. Modulul radio XBee nu a fost aprobat pentru utilizare în (această...
  • Page 29: Varnostna Navodila

    Safety instructions Varnostna navodila Tento produkt používajte s anténami špecifikovanými v používateľských príručkách modulu XBee. Koncový používateľ musí byť informovaný o tom, ako odpojiť napájanie rádiového modulu XBee alebo ako umiestniť antény 20 cm od ľudí alebo zvierat. Varnostna navodila XBee moduli Radijskega modula XBee ni mogoče zagotoviti delovanja zaradi radijske povezave in ga zato ne smete uporabljati za zaklepanje v varnostno kritičnih napravah, kot so stroji ali avtomobilske...
  • Page 30: Säkerhets Instruktioner

    Safety instructions Säkerhets instruktioner No exponga los módulos de radio XBee al agua ni a la humedad. Utilice este producto con las antenas especificadas en las guías de usuario del módulo XBee. Se debe indicar al usuario final cómo desconectar la alimentación del módulo de radio XBee o ubicar las antenas a 20 cm de personas o animales.
  • Page 31 Technical specifications Performance specifications Power requirements General specifications Networking and security specifications Communication interface specifications Regulatory conformity summary Serial communication specifications GPIO specifications Hardware specifications for the programmable variant XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 32: Technical Specifications

    Technical specifications Performance specifications Performance specifications The following table describes the performance specifications for the devices. Note Range figure estimates are based on free-air terrain with limited sources of interference. Actual range will vary based on transmitting power, orientation of transmitter and receiver, height of transmitting antenna, height of receiving antenna, weather conditions, interference sources in the area, and terrain between receiver and transmitter, including indoor and outdoor structures such as walls, trees, buildings, hills, and mountains.
  • Page 33: Networking And Security Specifications

    Technical specifications Networking and security specifications XBee Zigbee S2C Specification XBee-PRO Zigbee S2C Form factor through-hole, surface-mount through-hole: 2.438 x 2.761 cm through-hole: 2.438 x 3.294 cm Dimensions (0.960 x 1.087 in) (0.960 x 1.297 in) surface-mount: 2.199 x 3.4 x 0.305 surface-mount: 2.199 x 3.4 x 0.305 cm (0.866 x 1.33 x 0.120 in) cm (0.866 x 1.33 x 0.120 in)
  • Page 34: Regulatory Conformity Summary

    Regulatory conformity summary This table describes the agency approvals for the devices. Note Legacy XBee-PRO SMT (model: PRO S2C; hardware version 21xx) has different FCC and IC IDs. For more information, see Regulatory information. XBee XBee-PRO XBee S2D XBee (surface- (through- (through- (surface-...
  • Page 35 XBee XBee-PRO XBee S2D XBee (surface- (through- (through- (surface- Approval mount) XBee-PRO (surface-mount) hole) hole) mount) 1821-A1 1817 South Korea MSIP-CRM-DIG- MSIP-CRM- XBee-S2C DIG-XBee-S2C- RoHS Compliant...
  • Page 36: Serial Communication Specifications

    Technical specifications Serial communication specifications Serial communication specifications The XBee/XBee-PRO Zigbee RF Module supports both Universal Asynchronous Receiver / Transmitter (UART) and Serial Peripheral Interface (SPI) serial connections. UART pin assignments Specifications Device pin number UART pins XBee (surface-mount) XBee (through-hole) DOUT DIN / CONFIG CTS / DIO7...
  • Page 37: Hardware Specifications For The Programmable Variant

    Technical specifications Hardware specifications for the programmable variant GPIO electrical specification Value Low Schmitt switching threshold 0.42 - 0.5 x VCC High Schmitt switching threshold 0.62 - 0.8 x VCC Input current for logic 0 -0.5 µA Input current for logic 1 0.5 µA Input pull-up resistor value 29 kΩ...
  • Page 38 Technical specifications Hardware specifications for the programmable variant Optional secondary processor Add to RX, TX, and sleep currents specifications specification depending on mode of operation 1.8 VDC to V Range XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 39: Hardware

    Hardware Mechanical drawings Pin signals for the surface-mount module Pin signals for the through-hole module EM357 pin mappings Design notes XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 40: Mechanical Drawings

    Hardware Mechanical drawings Mechanical drawings The following mechanical drawings of the XBee/XBee-PRO Zigbee RF Modules show all dimensions in inches. The first drawing shows the XBee/XBee‐PRO surface-mount model (antenna options not shown). The drawings below show the XBee through-hole model The drawings below show the XBee-PRO through-hole model.
  • Page 41: Pin Signals For The Surface-Mount Module

    Hardware Pin signals for the surface-mount module Pin signals for the surface-mount module The following drawing shows the surface-mount (SMT) pin locations. XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 42 Hardware Pin signals for the surface-mount module The following table shows the pin signals and their descriptions for the surface-mount device. Default Pin# Name Direction state Description Ground. Power supply. DOUT /DIO13 Both Output UART data out /GPIO. DIN / CONFIG /DIO14 Both Input UART data in...
  • Page 43 Hardware Pin signals for the surface-mount module Default Pin# Name Direction state Description [reserved]* Disabled Do not connect. [reserved]* Disabled Do not connect. [reserved]* Disabled Do not connect. [reserved]* Disabled Do not connect. Ground. [reserved] Disabled Do not connect. DIO4 Both Disabled GPIO.
  • Page 44: Pin Signals For The Through-Hole Module

    Hardware Pin signals for the through-hole module Default Pin# Name Direction state Description AD1/DIO1 Both Disabled Analog input/GPIO. AD0 /DIO0 Both Input Analog input / GPIO / Commissioning button. [reserved] Disabled Do not connect. Ground. Both RF I/O for RF pad variant.
  • Page 45: Em357 Pin Mappings

    Hardware EM357 pin mappings Default Name Direction state Description CTS/DIO7 Both Output Clear-to-send flow control/GPIO ON_SLEEP/DIO9 Both Output Device status indicator/GPIO VREF Not connected ASSOCIATE/DIO5 Both Output Associate indicator/GPIO RTS/DIO6 Both Input Request to send flow control/ GPIO AD3/DIO3/SPI_SSEL Both Disabled Analog input/GPIO/SPI slave select AD2 /DIO2/SPI_CLK...
  • Page 46: Design Notes

    Hardware Design notes XBee XBee EM357 (SMT) (TH) pin# EM357 pin name pad# pin # Other usage PB1/SC1TXD Used for UART PB2/SC1RXD Used for UART PC2/JTDO/SWO JTAG (see Writing custom firmware) PC3/JTDI JTAG (see Writing custom firmware) PC4/JTMS/SWDIO JTAG (see Writing custom firmware) PC1/ADC3...
  • Page 47: Antenna Performance

    Hardware Design notes Antenna performance Antenna location is important for optimal performance. The following suggestions help you achieve optimal antenna performance. Point the antenna up vertically (upright). Antennas radiate and receive the best signal perpendicular to the direction they point, so a vertical antenna's omnidirectional radiation pattern is strongest across the horizon.
  • Page 48: Design Notes For Pcb Antenna Devices

    Hardware Design notes Design notes for PCB antenna devices Position PCB antenna devices so there are no ground planes or metal objects above or below the antenna. For best results, do not place the device in a metal enclosure, as this may greatly reduce the range.
  • Page 49: Design Notes For Rf Pad Devices

    Hardware Design notes Through-hole keepout area Notes 1. We recommend non-metal enclosures. For metal enclosures, use an external antenna. 2. Keep metal chassis or mounting structures in the keepout area at least 2.54 cm (1 in) from the antenna. 3. Maximize the distance between the antenna and metal objects that might be mounted in the keepout area.
  • Page 50 Hardware Design notes Following good design practices is essential when implementing the RF trace on a PCB. Consider the following points: Minimize the length of the trace by placing the RPSMA jack close to the device. Connect all of the grounds on the jack and the device to the ground planes directly or through closely placed vias.
  • Page 51 Hardware Design notes Number Description Maintain a distance of at least 2 d between microstrip and ground fill. Device pin 33. RF pad pin. 50 Ω microstrip trace. RF connection of RPSMA jack. The width in this example is approximately 0.025 in for a 50 Ω trace, assuming d = 0.014 in, and that the dielectric has a relative permittivity of 4.4.
  • Page 52: Module Operation For The Programmable Variant

    For the secondary processor to sample with ADCs, the XBee VREF pin (27/SMT, 14/TH) must be connected to a reference voltage. Digi provides a bootloader that can take care of programming the processor over-the-air or through the serial interface. This means that over-the-air updates can be supported through an XMODEM protocol.
  • Page 53: Programmable Xbee Sdk

    Programmable XBee SDK: http://ftp1.digi.com/support/sampleapplications/40003003_D.exe If these revisions change, search for the part number on Digi’s website. For example, search for 40003003. Install the IDE first, and then install the SDK. The documentation for the Programmable XBee SDK is built into the SDK, so the Getting Started guide appears when you open CodeWarrior.
  • Page 54: Programmable Connections

    Programmable connections The following figure shows the programmable connections for the SMT.
  • Page 55 The following illustration shows the programmable connections for the TH Module.
  • Page 56: Operation

    Operation Serial interface UART data flow SPI communications Serial buffers UART flow control Break control Serial interface protocols Modes XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 57: Serial Interface

    (for example, through a RS-232 or USB interface board), or through a SPI, as described in communications. Note Two Wire serial Interface (TWI) is also available, but not supported by Digi. For information on the TWI, see the EM357 pin mappings.
  • Page 58: Spi Communications

    Operation SPI communications SPI communications The XBee/XBee-PRO Zigbee RF Module supports SPI communications in slave mode. Slave mode receives the clock signal and data from the master and returns data to the master. The following table shows the signals that the SPI port uses on the device. Signal Function SPI_MOSI (Master Out, Slave In)
  • Page 59: Serial Port Selection

    Operation Serial buffers If the input buffer is empty, the SPI serializer transmits a busy token (0xFF). Otherwise, all transactions on the SPI port use API operation. See API Operation for more information. The SPI slave controller must guarantee that there is time to move new transmit data from the transmit buffer into the hardware serializer.
  • Page 60: Serial Receive Buffer

    Operation UART flow control Serial receive buffer When serial data enters the XBee/XBee-PRO Zigbee RF Module through the serial port, the device stores the data in the serial receive buffer until it can be processed. Under certain conditions, the device may receive data when the serial receive buffer is already full. In that case, the device discards the data.
  • Page 61: Rts Flow Control

    Operation Break control RTS flow control If you send the D6 command to enable RTS flow control, the device does not send data in the serial transmit buffer out the DOUT pin as long as RTS is de-asserted (set high). Do not de-assert RTS for long periods of time or the serial transmit buffer will fill.
  • Page 62: Compare Transparent And Api Operation

    Operation Serial interface protocols Transmitting data to multiple destinations without entering Command Mode Receive success/failure status of each transmitted RF packet Identify the source address of each received packet Compare Transparent and API operation The following tables compare the advantages of Transparent and API operating modes: Transparent operation Simple The device transmits all received serial data unless it is in Command mode.
  • Page 63: Modes

    Operation Modes Receiving I/O samples from remote devices. Using source routing. If the above conditions do not apply (for example a sensor node, router, or a simple application), then Transparent operating mode might be suitable. It is acceptable to use a mixture of devices running API mode and Transparent mode in a network.
  • Page 64: Idle Mode

    Operation Modes Idle mode When not receiving or transmitting data, the device is in Idle mode. During Idle mode, the device listens for valid data on both the RF and serial ports. The device shifts into the other modes of operation under the following conditions: Transmit mode (serial data in the serial receive buffer is ready to be packetized).
  • Page 65: Receive Mode

    Operation Modes Receive mode This is the default mode for the XBee/XBee-PRO Zigbee RF Module. The device is in Receive mode when it is not transmitting data. If a destination node receives a valid RF packet, the destination node transfers the data to its serial transmit buffer. Command mode Command mode is a state in which the firmware interprets incoming characters as commands.
  • Page 66 Operation Modes Both of these methods temporarily set the device's baud rate to 9600 and return an OK on the UART to indicate that Command mode is active. When Command mode exits, the device returns to normal operation at the baud rate that BD is set to. Send AT commands Once the device enters Command mode, use the syntax in the following figure to send AT commands.
  • Page 67: Sleep Mode

    Operation Modes Exit Command mode 1. Send CN (Exit Command mode) followed by a carriage return. 2. If the device does not receive any valid AT commands within the time specified by CT (Command Mode Timeout), it returns to Transparent or API mode. The default Command mode timeout is 10 seconds.
  • Page 68 Zigbee networks The Zigbee specification Definitions Zigbee stack layers Zigbee networking concepts Zigbee application layers: in depth Zigbee coordinator operation Router operation End device operation Zigbee channel scanning XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 69: Zigbee Networks

    Zigbee networks The Zigbee specification The Zigbee specification Zigbee is an open global standard for low-power, low-cost, low-data-rate, wireless mesh networking based on the IEEE 802.15.4 standard. It represents a network layer above the 802.15.4 layers to support advanced mesh routing capabilities. The Zigbee specification is developed by a consortium of companies that make up the Connectivity Standards Alliance.
  • Page 70: Zigbee Protocol

    Zigbee networks Zigbee stack layers Node Description Can be a data packet source and destination All messages are relayed through a coordinator or router Lower power modes Zigbee protocol Protocol Description Personal Area Network - A data communication network that includes a coordinator and one or more routers/end devices.
  • Page 71 Zigbee networks Zigbee stack layers The Zigbee specification defines the Network (NWK) layer and the framework for the application (APL) layer. The Network layer takes care of the network structure, routing, and security. The application layer framework consists of the Application Support sub-layer (APS), the Zigbee device objects (ZDO) and user-defined applications that give the device its specific functionality.
  • Page 72: Zigbee Networking Concepts

    Zigbee networks Zigbee networking concepts Zigbee networking concepts Device types Zigbee defines three different device types: coordinator, router, and end device. Coordinator Zigbee networks may only have a single coordinator device. This device: Starts the network, selecting the channel and PAN ID (both 64-bit and 16-bit). Buffers wireless data packets for sleeping end device children.
  • Page 73 Zigbee networks Zigbee networking concepts Note Each Zigbee network must be formed by one, and only one, coordinator and at least one other device (router or end device). In Zigbee networks, the coordinator must select a PAN ID (64-bit and 16-bit) and channel to start a network.
  • Page 74: Pan Id

    Zigbee networks Zigbee networking concepts at association time. This may be a useful setting in development environments, but is discouraged for security reasons for product deployment. In general, it is your responsibility to ensure that parameters are set to be compatible with the new device type when changing device types.
  • Page 75: Zigbee Application Layers: In Depth

    Skip these topics if: The XBee/XBee-PRO Zigbee RF Module does not need to interoperate or talk to non-Digi Zigbee devices. The XBee/XBee-PRO Zigbee RF Module simply needs to send data between devices.
  • Page 76: Zigbee Coordinator Operation

    XBee modules implement various clusters in the Digi private profile. You can also use the API to send or receive messages on any cluster ID (and profile ID or endpoint). For more information, see...
  • Page 77: Security Policy

    Zigbee networks Zigbee coordinator operation must have one coordinator. After the coordinator has started a network, it can allow new devices to join the network. It can also route data packets and communicate with other devices on the network. To ensure the coordinator starts on a good channel and unused PAN ID, the coordinator performs a series of scans to discover any RF activity on different channels (energy scan) and to discover any nearby operating PANs (PAN scan).
  • Page 78: Permit Joining

    Zigbee networks Zigbee coordinator operation Command Description Used to determine the 64-bit PAN ID. If set to 0 (default), a random 64-bit PAN ID will be selected. Determines the scan channels bitmask (up to 16 channels) used by the coordinator when forming a network.
  • Page 79: Reset The Coordinator

    Zigbee networks Zigbee coordinator operation Joining temporarily enabled Set NJ < 0xFF, to enable joining for only a number of seconds, based on the NJ parameter. Once the XBee/XBee-PRO Zigbee RF Module joins a network, the timer starts. The coordinator does not re- enable joining if the device is power cycled or reset.
  • Page 80: Replace A Coordinator (Security Disabled Only)

    Zigbee networks Zigbee coordinator operation Note Changes to ID, SC, ZS, and security command values only take effect when changes are applied (AC or CN commands). Replace a coordinator (security disabled only) On rare occasions, it may become necessary to replace an existing coordinator in a network with a new physical device.
  • Page 81: Example: Replace A Coordinator (Security Disabled)

    Zigbee networks Router operation 3. If you change SC or ID from the default, issue the WR command to save the changes. 4. If you change SC or ID from the default, apply changes (make SC and ID changes take effect) either by sending the AC command or by exiting AT command mode.
  • Page 82: Join A Network

    Zigbee networks Router operation The Zigbee Alliance requires that certified solutions not send beacon request messages too frequently. To meet certification requirements, the XBee firmware attempts nine scans per minute for the first five minutes, and three scans per minute thereafter. If a valid PAN is within range of a joining router, it typically discovers the PAN within a few seconds.
  • Page 83: Permit Joining

    Zigbee networks Router operation Command Description setting SC to 0x281 enables scanning on channels 0x0B, 0x12, and 0x14, in that order. Set the scan duration, or time that the router listens for beacons on each channel. Set the stack profile on the device. Enable or disable security in the network.
  • Page 84: Router Network Connectivity

    Zigbee networks Router operation Changing NJ to a different value (and applying changes with the AC or CN commands). Pressing the Commissioning button twice. Issuing the CB command with a parameter of 2. The last two actions enable joining for one minute if NJ is 0x0 or 0xFF. Otherwise, the Commissioning button and the CB2 command enable joining for NJ seconds.
  • Page 85 Zigbee networks Router operation If any of the events listed above occur during the watchdog period then no additional network traffic will be generated. If the watchdog timer does expire (no valid data received for 1 NW time period), the router attempts to initiate communication with the coordinator by sending an IEEE 64-bit address discovery message to the coordinator.
  • Page 86: End Device Operation

    Zigbee networks End device operation Press the commissioning button four times or send the CB command with a parameter of 4. This restores the device to a default configuration state. Send a network leave command. Note Changes to ID, SC, ZS, and security command values only take effect when changes are applied (AC or CN commands).
  • Page 87: Join A Network

    Zigbee networks End device operation Has a valid 64-bit PAN ID (PAN ID matches ID if ID > 0) Has the correct stack profile (ZS command) Allows joining the network Has capacity for additional end devices If the end device does not find a valid PAN, it performs the PAN scan on the next channel in its scan channels list and continues this process until it finds a valid network, or until all channels have been scanned.
  • Page 88: Persistent Data

    Zigbee networks End device operation Note Because routers cannot sleep, there is no equivalent need for routers or coordinators to track joined routers. There is no limit to the number of routers that can join a given router or coordinator device and no “router capacity”...
  • Page 89: Parent Connectivity

    Zigbee networks End device operation Command Description Set the stack profile on the device. Enable or disable security in the network. This must be set to match the EE value (security policy) of the coordinator. Set the trust center link key. If set to 0 (default), the link key is expected to be obtained (unencrypted) during joining.
  • Page 90: Leave A Network

    Zigbee networks Zigbee channel scanning security policy is invalid, the end device will leave the network and attempt to join a new network based on its network joining command values. To prevent the end device from leaving an existing network, the WR command should be issued after all network joining commands have been configured in order to retain these settings through power cycle or reset events.
  • Page 91: Manage Multiple Zigbee Networks

    Zigbee networks Zigbee channel scanning the PAN on that channel. Otherwise, if the device does not find a valid PAN on the channel, it attempts scanning on the next higher channel in the SC bitmask. The device continues to scan each channel (from lowest to highest) in the SC bitmask until it finds a valid PAN or all channels have been scanned.
  • Page 92: Application Messaging Framework

    Zigbee networks Zigbee channel scanning 1. Set NJ (Node Join Time) to a value less than 0xFF on all routers and coordinator devices to restrict joining (recommended). 2. Use the Commissioning pushbutton or CB (Commissioning Pushbutton) to allow joining for a short time;...
  • Page 93 Transmission, addressing, and routing Addressing Data transmission Binding transmissions Multicast transmissions Fragmentation Data transmission examples RF packet routing Encrypted transmissions Maximum RF payload size Throughput Latency timing specifications ZDO transmissions Transmission timeouts XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 94: Transmission, Addressing, And Routing

    IDs, cluster IDs, and endpoints. Application layer addressing is useful if an application must do any of the following: Interoperate with other Zigbee devices outside of the Digi application profile. Use service and network management capabilities of the ZDO.
  • Page 95: Unicast Transmissions

    Transmission, addressing, and routing Data transmission all routers that receive a broadcast transmission retransmits the packet three times. Note When a router or coordinator delivers a broadcast transmission to an end device child, the transmission is only sent once (immediately after the end device wakes and polls the parent for any new data).
  • Page 96: Address Table

    Transmission, addressing, and routing Data transmission is obtained after joining a network. The 16-bit address can also change under certain conditions. When sending a unicast transmission, the Zigbee network layer uses the 16-bit address of the destination and each hop to route the data packet. If you do not know the 16-bit address of the destination, the Zigbee stack includes a discovery provision to automatically discover the destination 16-bit address of the device before routing the data.
  • Page 97: Group Table

    Transmission, addressing, and routing Binding transmissions into the 16-bit address field of the API frame. If it does not find a match, set the 16-bit address to 0xFFFE (unknown) in the API transmit frame. The API provides indication of a remote device's 16-bit address in the following frames: All receive data frames Rx Data (0x90)
  • Page 98: Multicast Transmissions

    Transmission, addressing, and routing Multicast transmissions Multicast transmissions XBee modules use multicast transmissions to broadcast a message to destination devices that have active endpoints associated with a common group ID. The device handles an Explicit Addressing Command Request - 0x11 using the Multicast Tx Option (0x08) as a multicast transmission request.
  • Page 99: Api Mode

    If you use the explicit transmit frame, set the the cluster ID to 0x0011, the profile ID to 0xC105, and the source and destination endpoints to 0xE8. These are the recommended defaults for data transmissions in the Digi profile. You can send the same transmission using the following explicit transmit frame: 7E 00 15 11 01 0000 0000 0000 0000 FFFE E8 E8 0011 C105 00 00 31 18 The 16-bit address is set to 0xFFFE.
  • Page 100: Api Frame

    Transmission, addressing, and routing RF packet routing Example 2: Send a broadcast transmission In this example, a '\r' refers to a carriage return character. Perform the following steps to configure a broadcast transmission: 1. Enter command mode ('+++') 2. After receiving an OK\r, issue the following commands: ATDH0\r ATDLffff\r ATCN\r...
  • Page 101: Link Status Transmission

    Transmission, addressing, and routing RF packet routing Routing approach Description When to use Ad hoc On- Routing paths are created between source and Use in networks that will demand destination, possibly traversing multiple nodes not scale beyond about Distance Vector (“hops”).
  • Page 102: Aodv Mesh Routing

    Transmission, addressing, and routing RF packet routing This mechanism enables devices A and B to recognize that the link is not reliable in both directions and select a different neighbor when establishing routes. Such links are called asymmetric links, meaning the link quality is not similar in both directions. When a router or coordinator device powers on, it sends link status messages every couple seconds to attempt to discover link qualities with its neighbors quickly.
  • Page 103 Transmission, addressing, and routing RF packet routing AODV routing algorithm Routing under the AODV protocol uses tables in each node that store the next hop (intermediary node between source and destination nodes) for a destination node. If a next hop is unknown, route discovery takes place to find a path.
  • Page 104 Transmission, addressing, and routing RF packet routing When the destination node receives a route request, it compares the ‘path cost’ field against previously received route request commands. If the path cost stored in the route request is better than any previously received, the destination node transmits a route reply packet to the node that originated the route request.
  • Page 105: Many-To-One Routing

    Transmission, addressing, and routing RF packet routing receive this Ack, it retransmits the data, up to 2 times until it receives an Ack. This Ack is called the Zigbee APS layer acknowledgment. Note Refer to the Zigbee specification for more details. Many-to-One routing In networks where many devices must send data to a central collector or gateway device, AODV mesh routing requires significant overhead.
  • Page 106 Transmission, addressing, and routing RF packet routing route record transmission is unicast along the many-to-one route until it reaches the data collector. As the route record traverses the many-to-one route, it appends the 16-bit address of each device in the route into the RF payload.
  • Page 107 Transmission, addressing, and routing RF packet routing After obtaining a source route, the data collector sends a source routed transmission to the remote device. Acquiring source routes Acquiring source routes requires the remote devices to send a unicast to a data collector (device that sends many-to-one route request broadcasts).
  • Page 108 Transmission, addressing, and routing RF packet routing Note If a Create Source Route API frame does not precede the data frames, you may encounter data loss. The XBee/XBee-PRO Zigbee RF Module can buffer one source route that includes up to 11 hops— excluding source and destination.
  • Page 109 Transmission, addressing, and routing RF packet routing 0x00 Route options (set to 0) 0x02 Number of intermediate devices in the source route 0xCCDD Address of furthest device (1-hop from target) 0xAABB Address of next-closer device 0x5C Checksum (0xFF - SUM (all bytes after length)) Repair source routes It is possible for a network to have an existing source route fail—for example, a device in the route moves or goes down.
  • Page 110: Encrypted Transmissions

    Transmission, addressing, and routing Encrypted transmissions Disable route records If an aggregator collects route records from the nodes of the network and no longer needs route records sent (which consume network throughput) : 1. Set Bit 6 of DO to Enable High RAM Concentrator mode. High RAM mode means the aggregator has sufficient memory to hold route records for its potential destinations.
  • Page 111 Transmission, addressing, and routing Maximum RF payload size For Smart Energy firmware revision 5x32 and earlier, NP==0x80. As of 5x56, NP==0xFF. The maximum payload is calculated to estimate for aggregator source-routing. To reduce the maximum payload, when an aggregator sends a source-routed message it embeds the route into the message as overhead, or into each fragment of the message, if fragmentation is necessary.
  • Page 112: Throughput

    Transmission, addressing, and routing Throughput Hops Maximum encrypted payload Maximum unencrypted payload Throughput Throughput in a Zigbee network can differ by a number of variables, including: Number of hops Encryption enabled/disabled Sleeping end devices Failures/route discoveries. Our empirical testing showed the following throughput performance in a robust operating environment (low interference).
  • Page 113: Latency Timing Specifications

    Transmission, addressing, and routing Latency timing specifications Note We set the serial interface rate to 115200 b/s for data throughput measurements, and measured the time to send 100,000 bytes from source to destination. During the test, no route discoveries or failures occurred.
  • Page 114: Receiving Zdo Command And Responses

    Transmission, addressing, and routing ZDO transmissions 1. Set the source and destination endpoints and profile ID to 0. 2. Set the cluster ID to match the cluster ID of the appropriate service. For example, to send an active endpoints request, set the cluster ID to 0x0005. 3.
  • Page 115 Transmission, addressing, and routing ZDO transmissions 0x00 Broadcast radius 0x00 Tx Options 0x76 Transaction sequence number 0x00 Required payload for LQI request command 0xCE Checksum (0xFF - SUM (all bytes after length)) Description This API frame sends a ZDO LQI request (neighbor table request) to a remote device to obtain data from its neighbor table.
  • Page 116: Transmission Timeouts

    Transmission, addressing, and routing Transmission timeouts 0x34124040 00A21300 Required payload for Network Address Request command 00 00 0x33 Checksum (0xFF - SUM (all bytes after length)) Description This API frame sends a broadcast ZDO Network Address Request to obtain the 16-bit address of a device with a 64-bit address of 0x0013A200 40401234.
  • Page 117: Extended Timeout

    Transmission, addressing, and routing Transmission timeouts 4800 ms 4.8 seconds Extended timeout The worst-case transmission timeout when you are sending data to an end device is a larger issue than when transmitting to a router or coordinator. As described in Parent operation, RF data packets are sent to the parent of the end device, which buffers the packet until the end device wakes to...
  • Page 118 Transmission, addressing, and routing Transmission timeouts 0xFFFE Required 16-bit address if sending data to 64-bit address of 0 0x00 Broadcast radius (0 = max hops) 0x00 Tx options 0x54 78 44 61 74 61 ASCII representation of “TxData” string 0xAB Checksum (0xFF - SUM (all bytes after length)) Description This transmission sends the string “TxData”...
  • Page 119 Transmission, addressing, and routing Transmission timeouts API frame 7E 0005 08 01 414F 01 65 Field composition 0x0005 length 0x08 API ID (AT command) 0x01 Frame ID (set to a non-zero value to enable AT command response frames) 0x414F ASCII representation of 'A','O' (the command being issued) 0x01 Parameter value 0x65...
  • Page 120 Zigbee security Security modes Zigbee security model Implement security on the XBee/XBee-PRO Zigbee RF Module XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 121: Zigbee Security

    Zigbee security Security modes Zigbee supports various levels of security that you can configure depending on the needs of the application. Security provisions include: 128-bit AES encryption Two security keys that can be preconfigured or obtained during joining Support for a trust center Provisions to ensure message integrity, confidentiality, and authentication This section describes various security features defined in the Zigbee specification and illustrates how you can configure theXBee/XBee-PRO Zigbee RF Modules to support these features.
  • Page 122 Zigbee security Zigbee security model Frame counter The network header of encrypted packets includes a 32-bit frame counter. Each device in the network maintains a 32-bit frame counter that increments for every transmission. In addition, devices track the last known 32-bit frame counter for each of its neighbors. If a device receives a packet from a neighbor with a smaller frame counter than previously seen, it discards the packet.
  • Page 123: Aps Layer Security

    Zigbee security Zigbee security model include a 32-bit frame counter, an 8-byte source address, 4-byte MIC, and 2 other bytes. This reduces the number of payload bytes that can be sent in a data packet. Network key updates Zigbee supports a mechanism for changing the network key in a network. When the network key is changed, the frame counters in all devices reset to 0.
  • Page 124: Trust Center

    Zigbee security Implement security on the XBee/XBee-PRO Zigbee RF Module Network and APS layer encryption Network and APS layer encryption can both be applied to data. The following figure demonstrates the authentication and encryption performed on the final Zigbee packet when both are applied. Trust center Zigbee defines a trust center device that is responsible for authenticating devices that join the network.
  • Page 125: Enabling Security

    Zigbee security Implement security on the XBee/XBee-PRO Zigbee RF Module Enabling security To enable security on a device, the Encryption Enable (EE) parameter must be set to 1. When the parameter value changes, the XBee module leaves the network (PAN ID and channel) it was operating on and attempt to form or join a new network.
  • Page 126: Use A Trust Center

    Zigbee security Implement security on the XBee/XBee-PRO Zigbee RF Module only decrypted by the destination device. The XBee/XBee-PRO Zigbee RF Module must be configured with security enabled—EE set to 1—to use APS encryption. APS encryption can be enabled in API firmware on a per-packet basis. To enable APS encryption for a given transmission, set the "enable APS encryption"...
  • Page 127 Zigbee security Implement security on the XBee/XBee-PRO Zigbee RF Module 2. Configure one or more routers or end devices with the following settings: a. ID = 2234 b. EE = 1 c. KY = 4455 d. WR (save networking parameters to preserve them through power cycle) 3.
  • Page 128: Network Commissioning And Diagnostics

    Network commissioning and diagnostics We call the process of discovering and configuring devices in a network for operation, "network commissioning." Devices include several device discovery and configuration features. In addition to configuring devices, you must develop a strategy to place devices to ensure reliable routes. To accommodate these requirements, modules include features to aid in placing devices, configuring devices, and network diagnostics.
  • Page 129: Rssi Indicators

    The Zigbee device profile includes provisions to discover devices in a network that are supported on all Zigbee devices (including non-Digi products). These include the LQI Request (cluster ID 0x0031) and the Network Update Request (cluster ID 0x0038). You can use the LQI Request to read the devices in the neighbor table of a remote device, and the Network Update Request for a remote device to complete an active scan to discover all nearby Zigbee devices.
  • Page 130: Joining Announce

    Network commissioning and diagnostics Commissioning pushbutton and associate LED Joining Announce All Zigbee devices send a ZDO Device Announce broadcast transmission when they join a Zigbee network (ZDO cluster ID 0x0013). These frames are sent out the device's serial port as an Explicit Rx Indicator API frame (0x91) if AO is set to 1.
  • Page 131: Associate Led

    Network commissioning and diagnostics Commissioning pushbutton and associate LED Button presses Description Start Joining. Wakes a sleeping end device for 30 seconds, regardless of the ST/SN setting. It also sends node identification broadcast if joined to a network. A Zigbee device blinks a numeric error code on the Associate pin indicating the cause of join failure for (AI - 32) times.
  • Page 132: Binding

    All devices that receive this transmission blink their associate pin rapidly for one second if the associate LED functionality is enabled (D5 = 1). Binding The Digi XBee firmware supports three binding request messages: End Device Bind Bind...
  • Page 133 C sends responses to the original End_Device_Bind_req messages. R1-<C End_Device_Bind_rsp R2-<C End_Device_Bind_rsp End Device binding sequence (removal) This example shows a correctly formatted End_Device_Bind_req (ZDO cluster 0x0020) using a Digi 0x11 Explicit API Frame: The frame as a bytelist: XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 134 Network commissioning and diagnostics Binding 7e002811010000000000000000fffe000000200000000001f2995cb5474000a21300e605c101010001020046 Same frame broken into labeled fields. Note Multibyte fields are represented in big-endian format. Frame Delimiter 0028 Frame Length API Frame Type (Explicit Frame) Frame Identifier (for response matching) 0000000000000000 Coordinator address fffe Code for unknown network address Source Endpoint (need not be 0x00) Destination Endpoint (ZDO endpoint) 0020...
  • Page 135: Example Of A End_Device_Bind_Req

    Unlike the Binding Table that is managed with ZDO commands, a Zigbee group table is managed by the Zigbee cluster library Groups Cluster (0x0006) with ZCL commands. The Digi Zigbee XBee firmware is intended to work with an external processor where a Public Application Profile with endpoints and clusters is implemented, including a Groups Cluster. Configure the Zigbee XBee firmware to forward all ZCL commands addressed to this Group Cluster out the UART (see ATAO3).
  • Page 136: View Group

    Network commissioning and diagnostics Group Table API Preamble = “11 01 “+LocalDevice64Addr+”FFFE E6 E7 0006 C105 00 00" The packet is addressed to the local node, using a source endpoint of 0xE6, clusterID of 0x0006, and profileID of 0xC105. The destination endpoint E7 holds the endpoint parameter for the “Add Group” command.
  • Page 137 Network commissioning and diagnostics Group Table API The following example gets the name string associated with the endpoint E7 and groupID 1234. The packet: Preamble = “11 01 “+LocalDevice64Addr+”FFFE E6 E7 0006 C105 00 00" The packet is addressed to the local node, using a source endpoint of 0xE6, clusterID of 0x0006, and profileID of 0xC105.
  • Page 138: Get Group Membership

    Network commissioning and diagnostics Group Table API Zigbee Tx Status API 0x8B FrameID 0x01 16DestAddr 0xFFF Transmit Retries 0x00 Delivery Status 0x00 Discovery Status 0x00 Success Get Group Membership Get Group Membership (1 of 2) The purpose of this first form of the Get Group Membership command is to get all the groupIDs associated with a particular endpoint.
  • Page 139 Network commissioning and diagnostics Group Table API The first field is a frame control field which specifies a Cluster Specific command (0x01) using a Server- >Client direction (0x08). The second field is a transaction sequence number which is used to associate the response with the command request.
  • Page 140: Remove Group

    Network commissioning and diagnostics Group Table API API 0x91 64DestAddr 0x0013A2004047B55C 16DestAddr 0xFFFE SrcEP 0xE7 DestEP 0xE6 ClusterID 0x8006 ProfileID 0xC105 Options 0x00 RF_Data 0x09EE02FF013412 The response in terms of Preamble, ZCL Header, and ZCL Payload: Preamble = “910013a2004047b55cfffee7e68006c10500” The packet has the endpoints reversed from the request, the clusterID is 0x8006 indicating a Group cluster response.
  • Page 141: Remove All Groups

    Network commissioning and diagnostics Group Table API The packet in raw hex byte form: 7e001911010013a2004047b55cfffee6e70006c105000001ee033412d2 The response in raw hex byte form, consisting of two packets: 7e0018910013a2004047b55cfffee7e68006c1050009ee0300341235 7e00078b01fffe00000076 The command response in decoded form: Zigbee Explicit Rx Indicator API 0x91 64DestAddr 0x0013A2004047B55C 16DestAddr 0xFFFE SrcE 0xE DestEP 0xE6 ClusterID 0x8006 ProfileID 0xC105 Options 0x00...
  • Page 142 Network commissioning and diagnostics Group Table API The first field is a frame control field which specifies a Cluster Specific command (0x01) using a Client- >Server direction(0x00). The second field is a transaction sequence number which is used to associate the response with the command request.
  • Page 143: Default Responses

    Network commissioning and diagnostics Group Table API The packet in raw hex byte form: 7e001711010013a2004047b55cfffee6e70006c105000001ee0417 The response in raw hex byte form, consisting of two packets: 7e0016910013a2004047b55cfffee7e68006c1050009ee04007c 7e00078b01fffe00000076 The command response in decoded form: Zigbee Explicit Rx Indicator API 0x91 64DestAddr 0x0013A2004047B55C 16DestAddr 0xFFFE SrcEP 0xE7 DestEP 0xE6...
  • Page 144 Network commissioning and diagnostics Group Table API 0x00 EMBER_ZCL_STATUS_SUCCESS: Command request was successful 0x01 EMBER_ZCL_STATUS_FAILURE: Command request failed - for example, a call to remove an entry from the group table returned an error 0x80 EMBER_ZCL_STATUS_MALFORMED_COMMAND: no RFData in the API frame; ZCL Payload appears truncated from what is expected 0x81 EMBER_ZCL_STATUS_UNSUP_CLUSTER_COMMAND: unexpected direction in the Frame Control Field of the ZCL Header;...
  • Page 145 Manage End Devices Zigbee end devices are intended to be battery-powered devices capable of sleeping for extended periods of time. Since end devices may not be awake to receive RF data at a given time, routers and coordinators are equipped with additional capabilities (including packet buffering and extended transmission timeouts) to ensure reliable data delivery to end devices.
  • Page 146: Manage End Devices

    Manage End Devices End device operation End device operation When an end device joins a Zigbee network, it must find a router or coordinator device that is allowing end devices to join. Once the end device joins a network, it forms a parent-child relationship with the end device and the router or coordinator that allowed it to join.
  • Page 147: End Device Poll Timeouts

    Manage End Devices Parent operation The parent can buffer one broadcast transmission for all of its end device children. When the parent receives and buffers a broadcast transmission, it sets a flag in its child table when each child polls and retrieves the packet.
  • Page 148: Non-Parent Device Operation

    Manage End Devices Non-Parent device operation Non-Parent device operation Devices in the Zigbee network treat data transmissions to end devices differently than transmissions to other routers and coordinators. When a device sends a unicast transmission, if it does not receive a network acknowledgment within a timeout, the device resends the transmission.
  • Page 149: Pin Sleep

    Manage End Devices End Device configuration operation. If the device has not joined a network, it scans all SC channels after waking to try and find a valid network to join. Pin sleep Pin sleep allows the module to sleep and wake according to the state of the SLEEP_RQ pin (TH pin 9/SMT pin 10).
  • Page 150 Manage End Devices End Device configuration Through-hole sleep pins The following figure show the pin sleep waveforms: In the previous figure, t1, t2, t3 and t4 represent the following events: t1 - Time when Sleep_RQ is asserted (high) t2 - Time when the device enters sleep (CTS state change only if hardware flow control is enabled) t3 - Time when Sleep_RQ is de-asserted (low) and the device wakes t4 - Time when the module sends a poll request to its parent...
  • Page 151: Cyclic Sleep

    Manage End Devices End Device configuration When the XBee/XBee-PRO Zigbee RF Module is awake and is joined to a network, it sends a poll request to its parent to see if the parent has any buffered data. The end device continues to send poll requests every 100 ms while it is awake.
  • Page 152 Manage End Devices End Device configuration S2C Through-hole cyclic sleep pins The following figure shows the cyclic sleep waveforms. In the figure above, t1, t2, and t3 represent the following events: t1 - Time when the device wakes from cyclic sleep t2 - Time when the device returns to sleep t3 - Later time when the device wakes from cyclic sleep The wake time and sleep time are configurable with software commands.
  • Page 153 Manage End Devices End Device configuration Sleep period Configure the sleep period based on the SP, SN, and SO commands. The following table lists the behavior of these commands. Command Range Description 0x20 - 0xAF0 (x 10 ms) Configures the sleep period of the device. (320 - 28,000 ms) 1 - 0xFFFF Configures the number of sleep periods multiplier.
  • Page 154 Manage End Devices End Device configuration its parent for data without waking an external device for an extended time (SP * SN time) as shown in the following figure. Note SP controls the packet buffer time on routers and coordinators. Set SP on all router and coordinator devices to match the longest end device SP time.
  • Page 155: Recommended Sleep Current Measurements

    Manage End Devices Recommended sleep current measurements If circuitry external to the XBee drives such input lines low, then the current draw rises above expected deep sleep levels. Each GPIO input line that has no pullup or pull-down resistor (is floating) has an indeterminate voltage which can change over time and temperature in an indeterminate manner.
  • Page 156: Internal Pin Pull-Ups

    Manage End Devices Transmit RF data Internal pin pull-ups Internal pin pull-ups can pull excess current and cause the sleep current readings to be higher than desired if you drive or float the pull-ups. Disable all pull-ups for input lines that have a low driven state during sleep. Enable pull-ups for floating lines or inputs that do not connect to other circuitry.
  • Page 157: I/O Sampling

    Manage End Devices I/O sampling This firmware includes an adaptive polling enhancement where, if an end device receives RF data from its parent, it sends another poll after a very short delay to check for more data. The end device continues to poll at a faster rate as long as it receives data from its parent.
  • Page 158: Router/Coordinator Configuration

    Manage End Devices Router/Coordinator configuration To enable rejoining, set NJ to less than 0xFF on the device joining. If NJ < 0xFF, the device assumes the network is not allowing joining and first tries to join a network using rejoining. If multiple rejoining attempts fail, or if NJ = 0xFF, the device attempts to join using association.
  • Page 159: Transmission Timeout

    Manage End Devices Short sleep periods a faster rate, gradually decreasing its adaptive poll rate until polling resumes at the regular rate as defined by the PO command. Transmission timeout When you are sending RF data to a remote router, because routers are always on, the timeout is based on the number of hops the transmission may traverse.
  • Page 160: Example 2: Configure An End Device To Sleep For 20 Seconds, Send 4 I/O Samples In

    Manage End Devices Sleep examples SM = 4 (cyclic sleep) or 5 (cyclic sleep, pin wake). SP = 0x7D0 (2000 decimal). This causes the end device to sleep for 20 seconds since SP is measured in units of 10 ms. SN = 3.
  • Page 161 Manage End Devices Sleep examples IR = 0x800 (send 1 I/O sample after waking). Enable at least one analog or digital I/O sample enabled for I/O sampling. With these settings, the end device wakes after 4 minutes and sends 1 I/O sample. It then remains awake for 2 seconds before returning to sleep.
  • Page 162: Analog And Digital I/O Lines

    Analog and digital I/O lines XBee Zigbee firmware supports a number of analog and digital I/O pins that are configured through software commands. Analog and digital I/O lines can be set or queried. Configurable I/O pins and configuration commands I/O configuration I/O sampling RSSI PWM PWM1...
  • Page 163: Configurable I/O Pins And Configuration Commands

    Analog and digital I/O lines Configurable I/O pins and configuration commands Configurable I/O pins and configuration commands The following tables list the configurable I/O pins and the corresponding configuration commands. Module Pin Names Module Pin AT Command Command Range DOUT/DIO13 0, 1, 3-5 DIN/ CONFIG /DIO14 0, 1, 3-5...
  • Page 164: I/O Configuration

    Analog and digital I/O lines I/O configuration Module Pin Names Module Pin AT Command Command Range DIO10/PWM RSSI/DAC0 0, 1, 3-5 DIO11/PWM1/DAC1 0, 1, 3-5 DIO8/DTR/SLP_RQ 0, 1, 3-5 DIO4/SPI_MOSI 0, 1, 3-5 DIO7/CTS 0, 1, 3-7 DIO9/On/SLEEP/SWO 0, 1, 3-5 DIO5/ASSOC/JTDI 0, 1, 3-5 DIO6/RTS...
  • Page 165: I/O Sampling

    Analog and digital I/O lines I/O sampling Floating Pulled-up Pulled-down A floating input is appropriate if the pin is attached to an output that always drives the line. In this case, a pull-up or pull-down resistor draws more current. A pulled-up input is useful where there might not always be an external source to drive the pin and it is desirable to have the line read high in the absence of an external driver.
  • Page 166: Queried Sampling

    Analog and digital I/O lines I/O sampling Bytes Name Description bit 13 = DOUT/DIO13 bit 14 = DIN/DIO14 For example, a digital channel mask of 0x002F means DIO0,1,2,3, and 5 are enabled as digital I/O. Analog Channel Mask Indicates which lines have analog inputs enabled for sampling. Each bit in the analog channel mask corresponds to one analog input channel.
  • Page 167: Periodic I/O Sampling

    Analog and digital I/O lines RSSI PWM If you issue the IS command in command mode, the device returns a carriage return-delimited list containing the fields listed in sampling. If you issue the IS command in API mode, an API command response contains the same information.
  • Page 168: I/O Examples

    Analog and digital I/O lines PWM1 When a data packet is received, if you set P0 to enable the RSSI/PWM feature, the RSSI PWM output adjusts based on the RSSI of the last packet. The RSSI/PWM output is enabled for a time based on the RP command.
  • Page 169 API Operation An alternative to Transparent Operation are Application Programming Interface (API) Operations. API operation requires that the device communicate through a structured interface (that is, data is communicated in frames in a defined order). The API specifies how the device sends and receives commands, command responses, and module status messages using a serial port Data Frame.
  • Page 170: Api Operation

    API Operation API frame format 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.
  • Page 171: Data Bytes That Need To Be Escaped

    API Operation Data bytes that need to be escaped: Data bytes that need to be escaped: Byte Description 0x7E Frame Delimiter 0x7D Escape 0x11 0x13 XOFF Example: Raw serial data before escaping interfering bytes: 0x7E 0x00 0x02 0x23 0x11 0xCB 0x11 needs to be escaped which results in the following frame: 0x7E 0x00 0x02 0x23 0x7D 0x31 0xCB Note...
  • Page 172: Calculate And Verify Checksums

    API Operation Data bytes that need to be escaped: API frame names API ID Zigbee Transmit Request 0x10 Explicit Addressing Zigbee Command Frame 0x11 Remote Command Request 0x17 Create Source Route 0x21 AT Command Response 0x88 Modem Status 0x8A Zigbee Transmit Status 0x8B Zigbee Receive Packet (AO=0) 0x90...
  • Page 173: Api Examples

    API Operation Data bytes that need to be escaped: Byte(s) Description 00 08 Length bytes API identifier API frame ID 4E 49 AT Command 58 42 45 45 Parameter value Checksum To calculate the check sum you add all bytes of the packet, excluding the frame delimiter 7E and the length (the second and third bytes): 7E 00 08 08 01 4E 49 58 42 45 45 3B Add these hex bytes:...
  • Page 174: Api Serial Exchanges

    API Operation API serial exchanges 0x0004 = length 0x08 = AT Command API frame type 0x01 = Frame ID (set to non-zero value) 0x4E44 = AT command (ND) 0x64 = Checksum The checksum is calculated as [0xFF - (0x08 + 0x01 + 0x4E + 0x44)] Example: Send a remote command to the coordinator to set AD1/DIO1 as a digital input (D1=3) and apply changes to force the I/O update.
  • Page 175: Transmit And Receive Rf Data

    API Operation API serial exchanges Transmit and Receive RF data The following image shows the API frames exchange that take place at the UART interface when sending RF data to another device. The transmit status frame is always sent at the end of a data transmission unless the frame ID is set to 0 in the TX request.
  • Page 176: Source Routing

    API Operation Send ZDO commands with the API Source routing The following image shows the API frame exchanges that take place at the serial port when sending a source routed transmission. 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.
  • Page 177 API Operation Send ZDO commands with the API ZDO command Cluster ID Network Address Request 0x0000 IEEE Address Request 0x0001 Node Descriptor Request 0x0002 Simple Descriptor Request 0x0004 Active Endpoints Request 0x0005 Match Descriptor Request 0x0006 Mgmt LQI Request 0x0031 Mgmt Routing Request 0x0032 Mgmt Leave Request...
  • Page 178: Example

    API Operation Send ZDO commands with the API Frame data fields Offset Description Destination endpoint Set to 0x00 for ZDO transmissions (endpoint 0 is the ZDO endpoint). Set to the cluster ID that corresponds to the ZDO command being Cluster ID sent.
  • Page 179: Send Zigbee Cluster Library (Zcl) Commands With The Api

    API Operation Send Zigbee cluster library (ZCL) commands with the API Frame data fields Offset Example 64-bit destination address MSB 5 0x00 0x00 0x00 0x00 0x00 0x00 0xFF LSB12 0xFF 16-bit Destination 0xFF MSB 13 Network Address 0xFE LSB 14 Source endpoint 0x00 Destination endpoint...
  • Page 180 API Operation Send Zigbee cluster library (ZCL) commands with the API Cluster (Cluster ID) Attributes (Attribute ID) Cluster ID Hardware Version (0x0003) Model Identifier (0x0005) Identify (0x00) Identify (0x0003) Identify Time (0x0000) Identify Query (0x01) Time (0x0000) Time (0x000A) Time Status (0x0001) Time Zone (0x0002) Local Temperature (0x0000) Thermostat (0x0201)
  • Page 181 API Operation Send Zigbee cluster library (ZCL) commands with the API example uses arbitrary source and destination endpoints. The hardware version attribute (attribute ID 0x0003) is part of the basic cluster (cluster ID 0x0000). The Read Attribute general command ID is 0x00. Description Frame fields Offset...
  • Page 182: Example

    API Operation Send Zigbee cluster library (ZCL) commands with the API Description Frame fields Offset specification. Transaction A sequence number used to correlate a ZCL sequence command with a ZCL response. (The hardware number version response will include this byte as a sequence number in the response.) The value 0x01 was arbitrarily selected.
  • Page 183 API Operation Send Zigbee cluster library (ZCL) commands with the API Frame data fields Offset Example Length MSB 1 0x00 LSB 2 0x19 Frame type 0x11 Frame ID 0x01 64-bit destination MSB 5 0x00 address 0x13 0xA2 0x00 0x40 0x40 0x12 LSB12 0x34...
  • Page 184: Send Public Profile Commands With The Api

    API Operation Send Public Profile Commands with the API Send Public Profile Commands with the API You can use the XBee API using the Explicit Transmit API frame (0x11) to send commands in public profiles such as Smart Energy and Home Automation. Sending public profile commands with the Explicit Transmit API frame requires some formatting of the data payload field.
  • Page 185 API Operation Send Public Profile Commands with the API Description Frame Fields Offset Destination Set to the destination endpoint on the remote endpoint device. (0x42 arbitrarily selected). Cluster ID MSB 17 Set to the cluster ID that corresponds to the ZCL command being sent.
  • Page 186 API Operation Send Public Profile Commands with the API Description Frame Fields Offset Class associated with the Load Control Event. A bit value of 0x0014 enables smart appliances and water heaters. Note The 2-byte bit field value is sent in little endian byte order.
  • Page 187: Example

    API Operation Send Public Profile Commands with the API Description Frame Fields Offset order. Average load Maximum energy usage limit. A value of 0x80 adjustment indicates the field is not used. percentage Duty cycle Defines the maximum “On” duty cycle. A value of 0xFF indicates the duty cycle is not used in this event.
  • Page 188 API Operation Send Public Profile Commands with the API Example Frame fields Offset 64-bit destination MSB 5 0x00 address 0x13 0xA2 0x00 0x40 0x40 0x12 LSB 12 0x34 16-bit destination MSB 13 0x56 network address LSB 14 0x78 Source endpoint 0x41 Destination endpoint 0x42...
  • Page 189 API Operation Send Public Profile Commands with the API Example Frame fields Offset Data payload ZCL frame header Frame control 0x09 Transaction sequence 0x01 number 0x00 ZCL payload - load Issuer event ID 0x78 control event data 0x56 0x34 0x12 Device class 0x14 0x00...
  • Page 190: Frame Descriptions

    Frame descriptions The following sections describe the API frames. Local AT Command Request - 0x08 Queue Local AT Command Request - 0x09 Transmit Request - 0x10 Explicit Addressing Command Request - 0x11 Remote AT Command Request - 0x17 Create Source Route - 0x21 Local AT Command Response - 0x88 Modem Status - 0x8A Extended Transmit Status - 0x8B...
  • Page 191: Local At Command Request - 0X08

    Frame descriptions Local AT Command Request - 0x08 Local AT Command Request - 0x08 Response frame: Local AT Command Response - 0x88 Description This frame type is used to query or set command parameters on the local device. Any parameter that is set with this frame type will apply the change immediately.
  • Page 192 Frame descriptions Local AT Command Request - 0x08 Frame type Frame ID AT command Parameter value 0x08 0xA1 0x4E49 0x456E6420446576696365 Request Matches response "NI" "End Device" Query local command parameter Query the temperature of the module—TP command. The corresponding Local AT Command Response - 0x88 with a matching Frame ID will return the temperature value.
  • Page 193: Queue Local At Command Request - 0X09

    Frame descriptions Queue Local AT Command Request - 0x09 Queue Local AT Command Request - 0x09 Response frame: Local AT Command Response - 0x88 Description This frame type is used to query or set queued command parameters on the local device. In contrast Local AT Command Request - 0x08, this frame queues new parameter values and does not apply them until you either:...
  • Page 194 Frame descriptions Queue Local AT Command Request - 0x09 Queue setting local command parameter Set the UART baud rate to 115200, but do not apply changes immediately. The device will continue to operate at the current baud rate until the change is applied with a subsequent AC command.
  • Page 195: Transmit Request - 0X10

    Frame descriptions Transmit Request - 0x10 Transmit Request - 0x10 Response frame: Extended Transmit Status - 0x8B Description This frame type is used to send payload data as an RF packet to a specific destination. This frame type is typically used for transmitting serial data to one or more remote devices. The endpoints used for these data transmissions are defined by the SE and EP commands and the cluster ID defined by the CI command—excluding 802.15.4.
  • Page 196: Transmit Options Bit Field

    Frame descriptions Transmit Request - 0x10 Offset Size Frame Field Description 8-bit Start Indicates the start of an API frame. Delimiter 16-bit Length Number of bytes between the length and checksum. Frame type Transmit Request - 0x10 8-bit Frame ID Identifies the data frame for the host to correlate with a 8-bit subsequent response frame.
  • Page 197: Examples

    Frame descriptions Transmit Request - 0x10 Meaning Description Secure Session Encryption [ 0x10 ] Encrypt payload for transmission across a Secure Session Reduces maximum payload size by 4 bytes. Enable APS encryption [0x20] APS encrypt the payload using the link key set by KY Reduces maximum payload size by 4 bytes.
  • Page 198 Frame descriptions Transmit Request - 0x10 16-bit unicast Sending a unicast transmission to a device with the 16-bit address of 1234 with the serial data "TxData". Disable retries and acknowledgments to prioritize performance over reliability. The corresponding Transmit Status - 0x89 response with a matching Frame ID can be used to verify that the transmission was sent.
  • Page 199: Explicit Addressing Command Request - 0X11

    Frame descriptions Explicit Addressing Command Request - 0x11 Explicit Addressing Command Request - 0x11 Response frame: Extended Transmit Status - 0x8B Description This frame type is used to send payload data as an RF packet to a specific destination using application-layer addressing fields. The behavior of this frame is similar to Transmit Request - 0x10, but with additional fields available for user-defined endpoints, cluster ID, and profile ID.
  • Page 200: Reserved Endpoints

    Cannot be used on XBee 802.15.4 firmware. Reserved profile IDs The Digi profile ID of 0xC105 should be used when sending serial data between XBee devices. The following profile IDs are handled by the XBee natively, all others—such as Smart Energy and Home Automation—can be passed through to a host:...
  • Page 201: Transmit Options Bit Field

    Frame descriptions Explicit Addressing Command Request - 0x11 Offset Size Frame Field Description destination Broadcast address is 0x000000000000FFFF. Zigbee coordinator address is 0x0000000000000000. address When using 16-bit addressing, set this field to 0xFFFFFFFFFFFFFFFF. 16-bit Set to the 16-bit network address of the destination 16-bit destination device if known.
  • Page 202: Examples

    0x001 0xC10 0x00 0x00 0x547844617 461  12345678 Explici Matche Destinati Unkno Digi Digi Data Digi "TxData" data profile reque respon Loopback Packet Sending a loopback transmission to an device with the 64-bit address of 0013A20012345678 using Cluster ID 0x0012. To better understand the raw performance, retries and acknowledgements are disabled.
  • Page 203 The ZDP request is sent as a broadcast with the destination defined in the ZDO command frame. Each field in the ZDO frame is in little-endian, the rest of the Digi API frame is big-endian. In order to output the response to the ZDO command request, the sender must be configured to emit...
  • Page 204 Frame descriptions Explicit Addressing Command Request - 0x11 Bcas Fram Frame 64-bit 16-bit Sour Profi radi optio Command type dest dest ce EP Cluster data 0x00 Explic Match Reserv Managem Zigbe Seque comman reque respon ds should Leave Devic Request 64-bit broadcas Cluster...
  • Page 205: Remote At Command Request - 0X17

    Frame descriptions Remote AT Command Request - 0x17 Remote AT Command Request - 0x17 Response frame: Remote AT Command Response- 0x97 Description This frame type is used to query or set AT command parameters on a remote device. For parameter changes on the remote device to take effect, you must apply changes, either by setting the Apply Changes options bit, or by sending an AC command to the remote.
  • Page 206: Examples

    Frame descriptions Remote AT Command Request - 0x17 Offset Size Frame Field Description Bit 1: Apply changes on remote [0x02] If not set, changes will not applied until the device receives an AC command or a subsequent command change is received with this bit set Bit 2: Reserved (set to 0) Bit 3: Reserved (set to 0) Bit 4: Send the remote command securely [0x10]...
  • Page 207 Frame descriptions Remote AT Command Request - 0x17 The corresponding Remote AT Command Response- 0x97 with a matching Frame ID will indicate success. 7E 00 11 17 68 00 13 A2 00 12 34 56 78 FF FE 00 49 44 04 51 D8 Frame 16-bit Command...
  • Page 208: Create Source Route - 0X21

    Frame descriptions Create Source Route - 0x21 Create Source Route - 0x21 Description This frame type is used to create an entry in the source route table of a local device. A source route specifies the complete route a packet traverses to get from source to destination. For best results, use source routing with many-to-one routing.
  • Page 209: Examples

    Frame descriptions Create Source Route - 0x21 Offset Size Frame Field Description The 16-bit network address(es) of the devices along the source 17-n 16-bit Address route, excluding the source and destination. variable The addresses should be entered in reverse order (from destination to source) to match the order provided in Route Record Indicator -...
  • Page 210: Local At Command Response - 0X88

    Frame descriptions Local AT Command Response - 0x88 Local AT Command Response - 0x88 Request frames: Local AT Command Request - 0x08 Queue Local AT Command Request - 0x09 Description This frame type is emitted in response to a local AT Command request. Some commands send back multiple response frames;...
  • Page 211 Frame descriptions Local AT Command Response - 0x88 Set local command parameter Host set the NI string of the local device to "End Device" using a 0x08 request frame. The corresponding Local AT Command Response - 0x88 with a matching Frame ID is emitted as a response: 7E 00 05 88 01 4E 49 00 DF Frame...
  • Page 212: Modem Status - 0X8A

    0x0B = Network woke up 0x0C = Network went to sleep 0x0D = Voltage supply limit exceeded 0x0E = Digi Remote Manager connected 0x0F = Digi Remote Manager disconnected 0x11 = Modem configuration changed while join in progress 0x12 = Access fault...
  • Page 213: Examples

    Frame descriptions Modem Status - 0x8A Frame Offset Size Field Description 0x42 = Network Watchdog timeout expired 0x80 through 0xFF = Stack error Refer to the tables below for a filtered list of status codes that are appropriate for specific devices. 8-bit Checksum 0xFF minus the 8-bit sum of bytes from offset 3 to this byte (between length and checksum).
  • Page 214: Extended Transmit Status - 0X8B

    Frame descriptions Extended Transmit Status - 0x8B Extended Transmit Status - 0x8B Request frames: Transmit Request - 0x10 Explicit Addressing Command Request - 0x11 Description This frame type is emitted when a network transmission request completes. The status field of this frame indicates whether the request succeeded or failed and the reason.
  • Page 215: Examples

    Frame descriptions Extended Transmit Status - 0x8B Offset Size Frame Field Description 0x15 = Invalid destination endpoint 0x21 = Network ACK failure 0x22 = Not joined to network 0x23 = Self-addressed 0x24 = Address not found 0x25 = Route not found 0x26 = Broadcast source failed to hear a neighbor relay the message 0x2B = Invalid binding table index...
  • Page 216 Frame descriptions Extended Transmit Status - 0x8B To reduce discovery overhead, the host can retrieve the discovered 16-bit network address from this response frame to use in subsequent transmissions. XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 217: Receive Packet - 0X90

    Frame descriptions Receive Packet - 0x90 Receive Packet - 0x90 Request frames: Transmit Request - 0x10 Explicit Addressing Command Request - 0x11 Description This frame type is emitted when a device configured with standard API output—AO (API Options) = 0— receives an RF data packet.
  • Page 218: Examples

    Frame descriptions Receive Packet - 0x90 Offset Size Frame Field Description b’11 = DigiMesh [0xC0] Note Option values may be combined. 15-n variable Received The RF payload data that the device receives. data 8-bit Checksum 0xFF minus the 8-bit sum of bytes from offset 3 to this byte (between length and checksum).
  • Page 219: Explicit Receive Indicator - 0X91

    The Profile ID that the fame is addressed to. Bit field of options that apply to the received message for 8-bit Receive packets sent using Digi endpoints (0xDC-0xEE): options Bit 0: Packet was Acknowledged [0x01] XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 220: Examples

    Received data 0x0013A200 0x91 0x87BD 0xE8 0xE8 0x0011 0xC105 0x01 0x547844617461  87654321 Explicit Network Digi Digi Data Digi ACK was "TxData" output address data data profile sent ZDO command - ZDP IEEE Address Response A ZDP IEEE address request is issued in order to identify the 64-bit address of a Zigbee device with the 16-bit network address of 0x046D.
  • Page 221 Note Each field in the ZDO frame is in little-endian, the rest of the Digi API frame is big-endian. 7E 00 1E 91 00 13 A2 00 12 34 56 78 04 6D 00 00 80 01 00 00 01 B5 00 78 56 34...
  • Page 222: I/O Sample Indicator - 0X92

    Frame descriptions I/O Sample Indicator - 0x92 I/O Sample Indicator - 0x92 Description This frame type is emitted when a device configured with standard API output—AO (API Options) = 0— receives an I/O sample frame from a remote device. Only devices running in API mode will send I/O samples out the serial port.
  • Page 223: Examples

    Frame descriptions I/O Sample Indicator - 0x92 Frame Offset Size Field Description bit 9: DIO9 bit 10: DIO10 bit 11: DIO11 bit 12: DIO12 bit 13: DIO13 bit 14: DIO14 bit 15: N/A For example, a digital channel mask of 0x002F means DIO 0, 1, 2, 3, and 5 are enabled as digital I/O.
  • Page 224 Frame descriptions I/O Sample Indicator - 0x92 Digital Analog Digital Analog Analog Frame 64-bit 16-bit option sample channe channe sample sample sample type source source l mask l mask 0x0013A20 0x92 0x87AC 0x01 0x01 0x0038 0x06 0x0028 0x0225 0x00F8 12345678 b'00 b'0110 b'00 Sample...
  • Page 225: Xbee Sensor Read Indicator - 0X94

    XBee Sensor Read Indicator - 0x94 XBee Sensor Read Indicator - 0x94 Description When the device receives a sensor sample (from a Digi 1-wire sensor adapter), it is sent out the serial port using this message type (when AO=0). Format The following table provides the contents of the frame.
  • Page 226 Frame descriptions XBee Sensor Read Indicator - 0x94 For convenience, let's label the A/D and temperature readings as AD0, AD1, AD2, AD3, and T. Using the data in this example: AD0 = 0x0002 AD1 = 0x00CE AD2 = 0x00EA AD3 = 0x0052 T = 0x016A To convert these to temperature and humidity values, the following equations should be used.
  • Page 227 Frame descriptions XBee Sensor Read Indicator - 0x94 Frame fields Offset Example 0x03 1-Wire sensors 0x00 A/D Values 0x02 0x00 0xCE 0x00 0xEA 0x00 0x52 Temperature Read 0x01 0x6A Checksum 0x8B XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 228: Node Identification Indicator - 0X95

    Frame descriptions Node Identification Indicator - 0x95 Node Identification Indicator - 0x95 Description This frame type is emitted when a node identification broadcast is received. The node identification indicator contains information about the identifying device, such as address, identifier string (NI), and other relevant data.
  • Page 229 JN (Join Notification). 3 = Frame sent after a power cycle event occurred while associated with a Zigbee network—see (Join Notification). The Digi application Profile ID— 0xC105 . 31+NI 16-bit Digi Profile ID The Digi Manufacturer ID— 0x101E . 33+NI...
  • Page 230: Examples

    123456 Identific Unkn DigiM Unkn "LH75" + Unkn Rout Butt Digi Digi ation null broad pres cast Identify joining device A Zigbee end device has join notification enabled by setting JN to 1. When the joining device successfully associates with a Zigbee network, it will broadcast a node identification message.
  • Page 231 Node Identification Indicator - 0x95 16-bit Prof Frame sourc Opti 16-bit Stri type remote type value A200 A200 0027 876543 123456 Broad Identific Join Digi Digi Zigbee cast ation devi + User- strin defined g set XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 232: Remote At Command Response- 0X97

    Frame descriptions Remote AT Command Response- 0x97 Remote AT Command Response- 0x97 Request frame: Remote AT Command Request - 0x17 Description This frame type is emitted in response to a Remote AT Command Request - 0x17. Some commands send back multiple response frames; for example, the ND command. Refer to individual AT command descriptions for details on API response behavior.
  • Page 233: Examples

    Frame descriptions Remote AT Command Response- 0x97 Offset Size Frame Field Description If the host requested a command parameter change, this field 18-n variable Parameter will be omitted. value If the host queried a command by omitting the parameter (optional) value in the request, this field will return the value currently set on the device.
  • Page 234 Frame descriptions Remote AT Command Response- 0x97 Query remote command parameter Query the temperature of a remote device—TP (Temperature). The corresponding 0x97 Remote AT Command Response with a matching Frame ID is emitted with the temperature value as a response: 7E 00 11 97 27 00 13 A2 00 12 34 56 78 FF FE 54 50 00 00 2F A8 Frame 64-bit...
  • Page 235: Extended Modem Status - 0X98

    Frame descriptions Extended Modem Status - 0x98 Extended Modem Status - 0x98 Description The Extended Modem Status - 0x98 frame is intended to provide additional in-frame diagnostic information over the traditional Modem Status - 0x8A frame. This frame type can be used to troubleshoot Zigbee network association. To enable verbose join information, use DC (Joining Device Controls).
  • Page 236: Examples

    Frame descriptions Extended Modem Status - 0x98 Status Status code Description data Size Description 0x3C A Secure Session Address 64-bit The address of the other node in this session. ended The reason the session was ended: Reason 8-bit 0x00 - Session was terminated by the other node 0x01 - Session Timed out 0x02 - Received a transmission with an...
  • Page 237 Frame descriptions Extended Modem Status - 0x98 Message Description V AI -SearchingforParent:FF ...search has started V Scanning:03FFF800 ...channels 11 through 25 are enabled by the SC setting for the Active Search. ZS = 0x00 V BeaconRsp:0000000000000042A6010B949AC8FF extendedPanId = 00000000000042A6 allowingJoin 0x01 (yes) radiochannel 0x0B panid 0x949A rssi 0xC8...
  • Page 238: Status Code Descriptions

    Status code descriptions The following table describes the various Verbose Join trace messages in Status Code order. The Transparent mode string column shows the string which appears if you run Verbose Join in Command Mode. The Description column gives a more detailed explanation of each particular message. When a message accompanies Status Data, the Status Data column shows how to parse the hexadecimal string into fields.
  • Page 239 Status Transparent code mode string Description Status data Description 0x02 Joining An association request is being made. radioChannel(1) channel number ranging from 11 to 26 (0x0B to 0x1A) radioTxPower(1) low level signed byte value for transmit power, values range from 0xC9 to 0x05 inclusive panid(2) 16 bit 4med' a network, or a Router/End Device has 'joined' a network.
  • Page 240 Status Transparent code mode string Description Status data Description JV/NW with search option (DO80) has 0x08 panID Match panId(2) 16 bit PAN Identifier for network found a matching network. Reject LQIRSSI JV/NW with search option (DO80) 0x09 candidate rejected because this beacon response is weaker than an earlier beacon response.
  • Page 241 Status Transparent code mode string Description Status data Description 0x12 Rejected(cmdL Rejected because it matches the last ast) associated network. 0x13 Rejected(cmdS Rejected because it matches an already ave) saved beacon response. 0x14 Reject strength During first/best phase, response is weaker than an already saved beacon response.
  • Page 242 Status Transparent code mode string Description Status data Description Discovering KE 0x21 Looking for Key Establishment Endpoint Endpoint KE Endpoint 0x22 Found Key Establishment Endpoint Endpoint(1) Endpoint number The following example shows a successful association with Verbose Join enabled in AT Command Mode. Note Comments are included with the trace messages to explain the content and are preceded by an ellipsis “...”.
  • Page 243 V Beacon Rsp:0200000000000002AB010C55D2B2DB ...ZS(2), extendedPanId(00000000000002AB), allowingJoin(1), radiochannel(0x0C), panid(55D2), rssi(B2), lqi(DB) V Reject ZS ...beacon response's ZS does not match this radio's ZS setting of 0x00 V Beacon Rsp:000000000000003151010EE29FDFFF V Beacon Saved:0E05E29F0000000000003151 ...this beacon response is acceptable as a candidate for association V Joining:0E05E29F0000000000003151 ...sending association request V Stack Status: joined, network up 0290...
  • Page 244: Over-The-Air Firmware Update Status - 0Xa0

    Frame descriptions Over-the-Air Firmware Update Status - 0xA0 Over-the-Air Firmware Update Status - 0xA0 Description The Over-the-Air Firmware Update Status frame provides an indication of the status of a firmware update transmission attempt. A query command (0x01 0x51) sent to a target with a 64-bit address of 0x0013A200 40522BAA through an updater with 64-bit address 0x0013A200403E0750 and 16-bit address 0x0000, generates the following expected response.
  • Page 245 Frame descriptions Over-the-Air Firmware Update Status - 0xA0 Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 LSB 2 0x16 Frame type 0xA0 64-bit source (remote) address MSB 4 0x00 0x13 0xA2 0x00 0x40 0x3E 0x07 0x50 16-bit destination address 0x00 0x00...
  • Page 246: Route Record Indicator - 0Xa1

    Frame descriptions Route Record Indicator - 0xA1 Route Record Indicator - 0xA1 Description This frame type contains the routing information for a remote device on the network. This route information should be stored in external memory and used in a Create Source Route - 0x21 frame to provide a return route for subsequent data transmissions;...
  • Page 247: Examples

    Frame descriptions Route Record Indicator - 0xA1 Frame Offset Size Field Description 8-bit Checksum 0xFF minus the 8-bit sum of bytes from offset 3 to this byte (between length and checksum). Examples Each example is written without escapes (AP = 1) and all bytes are represented in hex format. For brevity, the start delimiter, length, and checksum fields have been excluded.
  • Page 248: Many-To-One Route Request Indicator - 0Xa3

    Frame descriptions Many-to-One Route Request Indicator - 0xA3 Many-to-One Route Request Indicator - 0xA3 Description This frame type is emitted on devices that receive a many-to-one route request from a network concentrator. Typically, a device that emits this frame type should send a unicast message to the sender so a route record can be generated.
  • Page 249 Frame descriptions Many-to-One Route Request Indicator - 0xA3 Frame type 64-bit source 16-bit source Reserved MTORR NWK address XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 250: At Commands

    AT commands Network commands Addressing commands Zigbee addressing commands RF interfacing commands Security commands Serial interfacing commands Command mode options Sleep commands I/O settings commands I/O sampling commands Diagnostic commands Execution commands XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 251: Network Commands

    AT commands Network commands Network commands The following commands are network commands. ID (Extended PAN ID) This command applies to the XBee/XBee-PRO Zigbee RF Module. Set or read the 64-bit extended PAN ID. If set to 0, the coordinator selects a random extended PAN ID, and the router/end device joins any extended PAN ID.
  • Page 252: Sd (Scan Duration)

    AT commands Network commands Parameter 0x15 0x16 0x17 0x18 0x19 0x1A Note When you set SC to 0xFFFF on the device, Channel 26 is not allowed to transmit at more than 3 dBm. If Channel 26 is present in the search mask (SC), active search (beaconing) for network formation by a Coordinator is limited to no more than 3 dBm on all channels.
  • Page 253: Zs (Zigbee Stack Profile)

    AT commands Network commands SD setting Time 0.200 s 0.799 s 3.190 s 12.780 s Note SD influences the time the MAC listens for beacons or runs an energy scan on a given channel. The SD time is not a accurate estimate of the router/end device joining time requirements. Zigbee joining adds additional overhead including beacon processing on each channel, and sending a join request that extend the actual joining time.
  • Page 254: Nw (Network Watchdog Timeout)

    This action blinks the Associate LED rapidly on all devices that receive the transmission, and sends an API frame out the serial port of API devices. Digi recommends you disable this feature for large networks to prevent excessive broadcasts. Parameter range...
  • Page 255: Op (Operating Extended Pan Id)

    AT commands Network commands OP (Operating Extended PAN ID) This command applies to the XBee/XBee-PRO Zigbee RF Module. Read the 64-bit extended PAN ID. The OP value reflects the operating extended PAN ID where the device is running. If ID > 0, OP equals ID. Parameter range 0x01 - 0xFFFFFFFFFFFFFFFF Default...
  • Page 256: Ce (Coordinator Enable)

    AT commands Network commands CE (Coordinator Enable) This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets or displays whether the device is a coordinator. Parameter range Parameter Description Not a Coordinator Coordinator (SM must be 0 to set CE to 1) Default DO (Miscellaneous Device Options) This command applies to the XBee/XBee-PRO Zigbee RF Module.
  • Page 257: Initial 16-Bit Pan Id)

    AT commands Network commands Bit field: Bit settings to enable or disable certain behaviors. Description Generate a preconfigured link key using the device’s install code (KY will be ignored). Network Leave Request Not Allowed. Indicates if a router node discards or accepts network leave commands.
  • Page 258: Addressing Commands

    AT commands Addressing commands Parameter range 1 - 0xFF (x1 ms) Default 0x10 (16 ms) Addressing commands The following AT commands are addressing commands. SH (Serial Number High) This command applies to the XBee/XBee-PRO Zigbee RF Module. Displays the upper 32 bits of the unique IEEE 64-bit extended address assigned to the XBee in the factory.
  • Page 259: Mp (16-Bit Parent Network Address)

    AT commands Addressing commands MP (16-bit Parent Network Address) This command applies to the XBee/XBee-PRO Zigbee RF Module. Read the 16-bit network address of the device's parent. Coordinators and Routers will always show 0xFFFE. An End Device will show its parent's address, or 0xFFFE if it has not yet joined a PAN. Parameter range 0 - 0xFFFE [read-only] Default...
  • Page 260: Nh (Maximum Unicast Hops)

    AT commands Addressing commands XCTU prevents you from exceeding the string limit of 20 characters for this command. If you are using another software application to send the string, you can enter longer strings, but the software on the device returns an error. Use the ND (Network Discovery) command with this string as an argument to easily identify devices on the network.
  • Page 261: Dd (Device Type Identifier)

    This command applies to the XBee/XBee-PRO Zigbee RF Module. Stores the Digi device type identifier value. Use this value to differentiate between multiple XBee devices. Digi reserves the range 0 - 0xFFFFFF. For the XBee ZB SMT device, the device type is 0xA0000. Parameter range 0 - 0xFFFFFFFF...
  • Page 262: Np (Maximum Packet Payload Bytes)

    AT commands Zigbee addressing commands Bit field Option Description Append the DD (Digi Device Identifier) value to ND responses and node identification 0x01 frames. Local device sends ND response when the ND is issued. 0x02 Default NP (Maximum Packet Payload Bytes) This command applies to the XBee/XBee-PRO Zigbee RF Module.
  • Page 263: Se (Source Endpoint)

    This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets or displays the application layer source endpoint value. The value is used as the source endpoint for all data transmissions. SE is only used in Transparent mode. The default value (0xE8) is the Digi data endpoint.
  • Page 264: Rf Interfacing Commands

    AT commands RF interfacing commands Unused bits must be set to 0. These bits may be logically ORed together: Parameter Description 0x01 Disable retries and route repair. Enable APS Encryption—if EE = 1. 0x20 Note This decreases the maximum RF payload by 4 bytes below the value reported by NP.
  • Page 265: Pp (Power At Pl4)

    AT commands Security commands Setting Power level 0 dBm (approximate) +12 dBm (approximate) +14 dBm (approximate) +16 dBm (approximate) +18 dBM Default PP (Power at PL4) This command applies to the XBee/XBee-PRO Zigbee RF Module. Reads the dBm output when you select maximum power (PL4). Note Read the maximum allowed power level when device is configured with PL = 4.
  • Page 266: Ee (Encryption Enable)

    AT commands Security commands EE (Encryption Enable) This command applies to the XBee/XBee-PRO Zigbee RF Module. Set or read the encryption enable setting. Parameter range 0 - 1 Parameter Description Encryption Disabled Encryption Enabled Default EO (Encryption Options) This command applies to the XBee/XBee-PRO Zigbee RF Module. Configure options for encryption when EE = 1.
  • Page 267: Nk (Trust Center Network Key)

    AT commands Serial interfacing commands Default NK (Trust Center Network Key) This command applies to the XBee/XBee-PRO Zigbee RF Module. Set the 128-bit AES network encryption key. This command is write-only. If set to 0 (default), the device selects a random network key. When queried, KY will return 0 if no key has been set;...
  • Page 268: Nb (Parity)

    AT commands Serial interfacing commands Default 0x03 (9600 b/s) NB (Parity) This command applies to the XBee/XBee-PRO Zigbee RF Module. Set or read the serial parity settings for UART communications. Parameter range 0x00 - 0x03 Parameter Description 0x00 No parity 0x01 Even parity 0x02...
  • Page 269: D6 (Dio6/Rts)

    AT commands Serial interfacing commands Default D6 (DIO6/RTS) This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets or displays the DIO6/RTS configuration (TH pin 16/SMT pin 29). Parameter range 0, 1, 3 - 5 Parameter Description Unmonitored digital input RTS flow control Digital input Digital output, low...
  • Page 270: Ap (Api Enable)

    AT commands Command mode options AP (API Enable) This command applies to the XBee/XBee-PRO Zigbee RF Module. Enables API Mode. The device ignores this command when using SPI. API mode 1 is always used. Parameter range 0 - 2 Parameter Description API disabled (operate in Transparent mode) API enabled...
  • Page 271: Gt (Guard Times)

    AT commands Sleep commands Sets or displays the Command mode timeout parameter. If a device does not receive any valid commands within this time period, it returns to Idle mode from Command mode. Parameter range 2 - 0x28F Default 0x64 (10 seconds) GT (Guard Times) This command applies to the XBee/XBee-PRO Zigbee RF Module.
  • Page 272: Sp (Sleep Period)

    AT commands Sleep commands SP (Sleep Period) This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets the duration of sleep time for the end device, up to 28 seconds. Use the SN command to extend the sleep time past 28 seconds. On the parent, this value determines how long the parent buffers a message for the sleeping end device.
  • Page 273: St (Time Before Sleep)

    AT commands Sleep commands Default 0 - Router 4 - End device ST (Time before Sleep) This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets or displays the wake time of the device. The timer resets each time the device receives serial or RF data. Once the timer expires, an end device may enter low power operation.
  • Page 274: Po (Polling Rate)

    AT commands Sleep commands Default PO (Polling Rate) This command applies to the XBee/XBee-PRO Zigbee RF Module. Set or read the end device poll rate. Setting this to 0 (default) enables polling at 100 ms (default rate), advancing in 10 ms increments. Adaptive polling may allow the end device to poll more rapidly for a short time when receiving RF data.
  • Page 275: I/O Settings Commands

    AT commands I/O settings commands Parameter range 0 - 0x3E8 Default I/O settings commands The following AT commands are I/O settings commands. D0 (AD0/DIO0 Configuration) This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets or displays the DIO0/AD0 configuration (TH pin 20/SMT pin 33). Parameter range 0 - 5 Parameter...
  • Page 276: D2 (Ad2/Dio2 Configuration)

    AT commands I/O settings commands Parameter Description Digital input Digital output, low Digital output, high Packet trace interface enable. Must be set along with P9= 6 to output traces for OTA sniffing. Default D2 (AD2/DIO2 Configuration) This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets or displays the DIO2/AD2 configuration (TH pin 18/SMT pin 31).
  • Page 277: D4 (Dio4 Configuration)

    AT commands I/O settings commands Parameter Description SPI_SSEL for the through-hole device Analog input, single ended Digital input Digital output, low Digital output, high Default D4 (DIO4 Configuration) This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets or displays the DIO4 configuration (TH pin 11/SMT pin 24). Parameter range 0, 1, 3 - 5 Parameter...
  • Page 278: D8 (Dio8/Dtr/Slp_Rq)

    AT commands I/O settings commands Parameter Description Digital input Digital output, default low Digital output, default high Default D8 (DIO8/DTR/SLP_RQ) This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets or displays the DIO8/DTR/SLP_RQ configuration (TH pin 9/SMT pin 10). Parameter range 0, 1, 3 - 5 0, 1, 3 - 5...
  • Page 279: P0 (Rssi/Pwm0 Configuration)

    AT commands I/O settings commands Parameter Description Digital input Digital output, low Digital output, high Default P0 (RSSI/PWM0 Configuration) This command applies to the XBee/XBee-PRO Zigbee RF Module. Parameter range 0, 1, 3 - 5 Parameter Description Unmonitored digital input RSSI PWM0 Digital input, monitored Digital output, default low...
  • Page 280: P2 (Dio12 Configuration)

    AT commands I/O settings commands Default P2 (DIO12 Configuration) This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets or displays the DIO12 configuration (TH pin 4/SMT pin 5). Parameter range 0, 1, 3 - 5 Parameter Description Unmonitored digital input SPI_MISO 3- Digital input, monitored 4- Digital output, default low...
  • Page 281: P5 (Dio15/Spi_Miso)

    AT commands I/O settings commands Parameter range 0, 1, 3 - 5 Parameter Description Unmonitored digital input Data in for UART Digital input Digital output low Digital output high Default P5 (DIO15/SPI_MISO) This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets or displays the DIO15/SPI_MISO configuration.
  • Page 282 AT commands I/O settings commands Parameter Description SPI_MOSI Digital output, low Digital output, high Default P7 (DIO17/SPI_SSEL ) This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets or displays the DIO17/SPI_SSEL configuration. This only applies to surface-mount devices. Parameter range 0, 1, 4, 5 Parameter Description...
  • Page 283: P9 (Dio19/Spi_Attn/Pti_Data)

    AT commands I/O settings commands Parameter Description Disabled Digital output, low Digital output, high Default P9 (DIO19/SPI_ATTN/PTI_DATA) This command applies to the XBee/XBee-PRO Zigbee RF Module. Sets or displays the DIO19 configuration. This only applies to surface-mount devices. Parameter range 0, 1, 6 Parameter Description...
  • Page 284: Pd (Pull Up/Down Direction)

    AT commands I/O settings commands I/O line Module pin DIO4 24/SMT, 11/TH AD3/DIO3 30/SMT, 17/TH AD2/DIO2 31/SMT, 18/TH AD1/DIO1 32/SMT, 19/TH AD0/DIO0 33/SMT, 20/TH RTS/DIO6 SMT, 16/TH DTR/SLEEP_REQUEST 10/SMT, 9/TH DIN/CONFIG 4/SMT, 3/TH ASSOCIATE/DIO5 28/SMT, 15/TH On/SLEEP/DIO9 26/SMT, 13/TH DIO12 5/SMT, 4/TH PWM0/RSSI/DIO10/ 7/SMT, 6/TH...
  • Page 285: Rp (Rssi Pwm Timer)

    AT commands I/O sampling commands Set or read the Associate LED blink time. If you use the D5 command to enable the Associate LED functionality (DIO5/Associate pin), this value determines the on and off blink times for the LED when the device has joined the network.
  • Page 286: Ic (Digital Change Detection)

    AT commands I/O sampling commands WARNING! If you set IR to 1 or 2, the device will not keep up and many samples will be lost. Parameter range 0, 0x32 - 0xFFFF (ms) Default IC (Digital Change Detection) This command applies to the XBee/XBee-PRO Zigbee RF Module. Set or read the digital I/O pins to monitor for changes in the I/O state.
  • Page 287: Voltage Supply Monitoring)

    AT commands Diagnostic commands V+ (Voltage Supply Monitoring) This command applies to the XBee/XBee-PRO Zigbee RF Module. Set the voltage supply threshold with the V+ command. If the measured supply voltage falls below or equal to this threshold, the supply voltage appends to the I/O sample set, and sets bit 7 of the Analog Channel Mask.
  • Page 288: Voltage Supply Monitoring)

    AT commands Diagnostic commands Status code Meaning 0x00 Successfully formed or joined a network. (Coordinators form a network, routers and end devices join a network). 0x21 Scan found no PANs. 0x22 Scan found no valid PANs based on current SC and ID settings. 0x23 Valid Coordinator or Routers found, but they are not allowing joining (NJ expired).
  • Page 289: Tp (Temperature)

    AT commands Execution commands This command reports the received signal strength of the last received RF data packet or APS acknowledgment. The DB command only indicates the signal strength of the last hop. It does not provide an accurate quality measurement for a multihop link. The DB command value is measured in -dBm.
  • Page 290: As (Active Scan)

    AT commands Execution commands Applies changes to all command registers and applies queued command register values. For example, changing the serial interface rate with the BD command does not change the UART interface rate until changes are applied with the AC command. The CN command and 0x08 API command frame also apply changes.
  • Page 291: Re (Restore Defaults)

    AT commands Execution commands RE (Restore Defaults) This command applies to the XBee/XBee-PRO Zigbee RF Module. This command sets all parameters except ZS and KY to their default values. To change ZS and KY, you must explicitly set them. In order for the default parameters to persist through subsequent resets, send a separate WR command after RE.
  • Page 292: Cb (Commissioning Pushbutton)

    AT commands Execution commands Note This command only has effect in API mode (sleeps immediately whether given as a 0x08 or 0x09 API frame), and no effect in AT command mode. AT command mode is exited only by the CN command or by timeout.
  • Page 293: Dn (Destination Node)

    PROFILE_ID<CR> (2 bytes) MANUFACTURER_ID<CR> (2 bytes) DIGI DEVICE TYPE<CR> (4 bytes. Optionally included based on NO settings.) RSSI OF LAST HOP<CR> (1 byte. Optionally included based on NO settings.) After (NT * 100) milliseconds, the command ends by returning a <CR>. ND also accepts aNI (Node Identifier)as a parameter (optional).
  • Page 294: Dj (Disable Joining)

    AT commands Execution commands 2. If there is no response from a module within (NT* 100) milliseconds or you do not specify a parameter (by leaving it blank), the receiving device returns an ERROR message. In the case of an ERROR, the device does not exit command mode. Set the radius of the DN command using the BH command.
  • Page 295: Module Support

    Module support This section provides customization information for the XBee/XBee-PRO Zigbee RF Module. You can customize default parameters, or write or load custom firmware for the Ember EM357 chip. Configure the device using XCTU Software libraries Customize XBee Zigbee firmware XBee bootloader Serial firmware updates Invoke the XBee bootloader...
  • Page 296: Configure The Device Using Xctu

    Alternatively, we can program custom firmware, including Ember's EZSP UART image, into the devices during manufacturing. Contact Digi to create a custom configuration.
  • Page 297: Serial Firmware Updates

    4, 10, and 29 (DIN, DTR, and RTS respectively) on the SMT, and pins 3, 9, 16 on the TH. XCTU can update firmware serially on the XBee/XBee-PRO Zigbee RF Module. Contact Digi support for details.
  • Page 298: Writing Custom Firmware

    Module support Writing custom firmware Writing custom firmware You can use the XBee module as a hardware development platform for the EM357. You can develop custom firmware images around the EmberZNet 4.2.xx mesh stacks (for the EM357) and uploaded to the XBee.
  • Page 299: Detect Xbee Versus Xbee-Pro

    Module support Writing custom firmware Detect XBee versus XBee-PRO For some applications, you may need to determine if the code is running on an XBee or an XBee-PRO device. 1. Use the PC7 pin on the EM357 to identify the device type. 2.
  • Page 300: Regulatory Information

    Regulatory information United States (FCC) Europe (CE) ISED (Innovation, Science and Economic Development Canada) Australia (RCM) ANATEL (Brazil) South Korea IFETEL (Mexico) XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 301: United States (Fcc)

    Regulatory information United States (FCC) United States (FCC) XBee/XBee-PRO Zigbee RF Modules comply with Part 15 of the FCC rules and regulations. Compliance with the labeling requirements, FCC notices and antenna usage guidelines is required. To fulfill FCC Certification, the OEM must comply with the following regulations: 1.
  • Page 302: Fcc Notices

    Digi does not carry all of these antenna variants. Contact Digi Sales for available antennas. 1. If using the RF module in a portable application (for example, if the module is used in a hand-...
  • Page 303 Regulatory information United States (FCC) to the FCC for approval prior to selling the integrated unit. The required SAR testing measures emissions from the module and how they affect the person. 2. Zigbee firmware will be limited to 32% duty cycle on channel 26. 3.
  • Page 304 The following table shows the antennas approved for use with the XBee Zigbee SMT RF module. All antenna part numbers followed by an asterisk (*) are not available from Digi. Consult with an antenna manufacturer for an equivalent option. Type Gain Min.
  • Page 305 Type Gain Min. Minimum cable loss/power (description) Part number (dBi) Application* separation reduction/attenuation required A24-F12NF Omni-directional (Fiberglass base station) 12.0 Fixed A24-W7NF Omni-directional (Fiberglass base station) Fixed A24-M7NF Omni-directional (Mag-mount base station) Fixed A24-F15NF Omni-directional (Fiberglass base station) 15.0 Fixed Panel antennas A24-P8SF Flat Panel Fixed...
  • Page 306 Type Gain Min. Minimum cable loss/power (description) Part number (dBi) Application* separation reduction/attenuation required A24-Y16NF Yagi (16-element) 13.5 Fixed A24-Y16RM Yagi (16-element, RPSMA connector) 13.5 Fixed A24-Y18NF Yagi (18-element) 15.0 Fixed...
  • Page 307 The following table shows the antennas approved for use with the XBee Zigbee TH RF Module. All antenna part numbers followed by an asterisk (*) are not available from Digi. Consult with an antenna manufacturer for an equivalent option. Required antenna cable loss...
  • Page 308 Required antenna cable loss (dB) Gain Min. Channels 11- Part number Type (description) (dBi) Application* separation Channel 26 A24-F9NF Omni-directional (Fiberglass base station) Fixed A24-F10NF Omni-directional (Fiberglass base station) 10.0 Fixed A24-F12NF Omni-directional (Fiberglass base station) 12.0 Fixed A24-W7NF Omni-directional (Fiberglass base station) Fixed A24-M7NF Omni-directional (Mag-mount base station)
  • Page 309 Required antenna cable loss (dB) Gain Min. Channels 11- Part number Type (description) (dBi) Application* separation Channel 26 A24-Y12NF Yagi (12-element) 12.0 Fixed A24-Y13NF Yagi (13-element) 12.0 Fixed A24-Y15NF Yagi (15-element) 12.5 Fixed A24-Y16NF Yagi (16-element) 13.5 Fixed A24-Y16RM Yagi (16-element, RPSMA connector) 13.5 Fixed A24-Y18NF...
  • Page 310 The following table shows the antennas approved for use with the XBee-PRO Zigbee SMT RF Module. All antenna part numbers followed by an asterisk (*) are not available from Digi. Consult with an antenna manufacturer for an equivalent option. Required antenna cable loss...
  • Page 311 Required antenna cable loss (dB) Gain Channels 11- (dBi) Part number Type (description) Application* separation Channel 26 A24-F9NF Omni-directional (Fiberglass base station) Fixed A24-F10NF Omni-directional (Fiberglass base station) Fixed A24-F12NF Omni-directional (Fiberglass base station) Fixed A24-W7NF Omni-directional (Fiberglass base station) Fixed A24-M7NF Omni-directional (Mag-mount base station) Fixed...
  • Page 312 Required antenna cable loss (dB) Gain Channels 11- (dBi) Part number Type (description) Application* separation Channel 26 A24-Y12NF Yagi (12-element) 12.0 Fixed A24-Y13NF Yagi (13-element) 12.0 Fixed A24-Y15NF Yagi (15-element) 12.5 Fixed A24-Y16NF Yagi (16-element) 13.5 Fixed A24-Y16RM Yagi (16-element, RPSMA connector) 13.5 Fixed A24-Y18NF...
  • Page 313 The following table shows the antennas approved for use with the XBee-PRO Zigbee Model PS2C5 SMT RF module. All antenna part numbers followed by an asterisk (*) are not available from Digi. Consult with an antenna manufacturer for an equivalent option.
  • Page 314 Gain Required antenna cable loss Part number Type (description) (dBi) Application* separation (dB) A24-F2NF Omni-directional (Fiberglass base station) Fixed/Mobile 20 cm A24-F3NF Omni-directional (Fiberglass base station) Fixed/Mobile 20 cm A24-F5NF Omni-directional (Fiberglass base station) Fixed 20 cm A24-F8NF Omni-directional (Fiberglass base station) Fixed A24-F9NF Omni-directional (Fiberglass base station)
  • Page 315 The following table shows the antennas approved for use with the XBee-PRO Zigbee TH RF Module. All antenna part numbers followed by an asterisk (*) are not available from Digi. Consult with an antenna manufacturer for an equivalent option. Required antenna cable loss...
  • Page 316 Required antenna cable loss (dB) Gain Min. Channels 11- Part number Type (description) (dBi) Application* separation Channel 26 A24-F9NF Omni-directional (Fiberglass base station) Fixed A24-F10NF Omni-directional (Fiberglass base station) 10.0 Fixed A24-F12NF Omni-directional (Fiberglass base station) 12.0 Fixed A24-W7NF Omni-directional (base station) Fixed A24-M7NF Omni-directional (Mag-mount base station)
  • Page 317 Required antenna cable loss (dB) Gain Min. Channels 11- Part number Type (description) (dBi) Application* separation Channel 26 A24-Y12NF Yagi (12-element) 12.0 Fixed A24-Y13NF Yagi (13-element) 12.0 Fixed A24-Y15NF Yagi (15-element) 12.5 Fixed A24-Y16NF Yagi (16-element) 13.5 Fixed A24-Y16RM Yagi (16-element, RPSMA connector) 13.5 Fixed A24-Y18NF...
  • Page 318 The following table shows the antennas approved for use with the XBee S2D SMT surface-mount module. See Associated antenna descriptions additional cable loss required beyond the antennas listed below. All antenna part numbers followed by an asterisk (*) are not available from Digi. Consult with an antenna manufacturer for an equivalent option. Required cable-loss Required cable-...
  • Page 319 Required cable-loss Required cable- Required cable-loss or power reduction loss or power or power reduction Gain Min. from +8 dBm reduction from +8 from +1 dBm Part number Type (description) (dBi) separation channels 11 to 24 dBm channel 25 channel 26 Application A24-F3NF Omni-directional...
  • Page 320 Required cable-loss Required cable- Required cable-loss or power reduction loss or power or power reduction Gain Min. from +8 dBm reduction from +8 from +1 dBm Part number Type (description) (dBi) separation channels 11 to 24 dBm channel 25 channel 26 Application Dipole Antennas A24-HASM-450...
  • Page 321: Associated Antenna Descriptions

    Regulatory information United States (FCC) Associated antenna descriptions The following table shows the associated antenna descriptions. Maximum gain Required minimum assembly and cable loss for Antenna type allowed maximum gain of antenna Integral PCB 0.0 dBi 0.0 dB Dipole 2.1 dBi 0.63 dB Omni-directional 15.0 dBi...
  • Page 322: Europe (Ce)

    OEM labeling requirements. 2.9 Information on test modes and additional testing requirements Contact a Digi sales represntative for information on how to configure test modes for XBee/XBee-PRO S2C Zigbee modules. 2.10 Additional testing, Part 15 Subpart B disclaimer All final host products must be tested to be compliant to FCC Part 15 Subpart B standards. While the XBee/XBee-PRO S2C Zigbee modules were tested to be complaint to FCC unintentional radiator standards, FCC Part 15 Subpart B compliance testing is still required for the final host product.
  • Page 323: Ce And Ukca Oem Labeling Requirements

    Regulatory information Europe (CE) Maximum power: 9.82 mW (9.92 dBm) Equivalent Isotropically Radiated Power (EIRP) at normal condition. Frequencies: 5 MHz channel spacing, beginning at 2405 MHz and ending at 2480 MHz. For the S2C surface-mount device: Maximum power: 12.65 mW (11.02 dBm) EIRP. Frequencies: 5 MHz channel spacing, beginning at 2405 MHz and ending at 2480 MHz.
  • Page 324: Declarations Of Conformity

    The following antennas have been tested and approved for use with the XBee/XBee-PRO Zigbee RF Module: All antenna part numbers followed by an asterisk (*) are not available from Digi. Consult with an antenna manufacturer for an equivalent option. XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 325: Ised (Innovation, Science And Economic Development Canada)

    Regulatory information ISED (Innovation, Science and Economic Development Canada) Dipole (2.1 dBi, Omni-directional, Articulated RPSMA, Digi part number A24-HABSM) PCB Antenna (0.0 dBi) Monopole Whip (1.5 dBi) ISED (Innovation, Science and Economic Development Canada) Labeling requirements Labeling requirements for Industry Canada are similar to those of the FCC. A clearly visible label on the outside of the final product enclosure must display the following text.
  • Page 326: Transmitters For Detachable Antennas

    The XBee-Pro S2C surface mount module has additional RF exposure requirements. These requirements must be placed in the User Guide of the integrated (Digi customer) equipment. 1. The XBee-Pro S2C ZigBee surface mount radio module with FCC ID: MCQ-PS2CSM, IC: 1846A-...
  • Page 327: Australia (Rcm)

    Australia or New Zealand. b. have a company/distributor/agent in Australia or New Zealand that will sponsor the importing of the end product. Contact Digi for questions related to locating a contact in Australia and New Zealand. XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 328: Anatel (Brazil)

    The XBee ZB RF devices comply with Brazil ANATEL standards. The following information is required in the user manual for the product containing the radio and on the product containing the radio (in Portuguese): Digi Model: XB24CZ7PIS-004, XB24CZ7PISB003, XB24CZ7RIS-004, XB24CZ7RISB003, XB24CZ7UIS-004 e XB24CZ7UISB003 XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 329 The XBee-Pro ZB RF devices comply with Brazil ANATEL standards. The following information is required in the user manual for the product containing the radio and on the product containing the radio (in Portuguese): Digi Model: XBP24CZ7PIS-004, XBP24CZ7RIS-004, XBP24CZ7UIS-004 XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 330: South Korea

    The low-power XBee S2C TH and XBee S2C devices have received South Korean approvals. To show conformity to the certificate, you must add a label with the South Korean product information to the XBee S2C Zigbee RF Module. For the through-hole device, you can place the label on the reverse side.
  • Page 331 1. 모델명 : XBee S2C TH 2. 인증번호 : MSIP-CRM-DIG-XBee-S2C-TH 3. 인증자상호 : DIGI INTERNATIONAL, INC. 4. 제조자/제조국가 : DIGI INTERNATIONAL, INC. / 미국 If the label size does not accommodate the required content, you can use abbreviated information, as follows:...
  • Page 332 Regulatory information South Korea The KCC logo must be at least 5 mm tall. The text shown on the label is: 인증번호 : MSIP-CRM-DIG-XBee-S2C-TH For the surface-mount version, the label will overlay the existing product label. CAUTION! By placing a label over the existing label, the certifications for Europe (CE), Australia, New Zealand (RCM), and Japan will no longer apply.
  • Page 333 1. 모델명 : XBee S2C 2. 인증번호 : MSIP-CRM-DIG-XBee-S2C 3. 인증자상호 : DIGI INTERNATIONAL, INC. 4. 제조자/제조국가 : DIGI INTERNATIONAL, INC. / 미국 If the label size does not accommodate the required content, you can use the abbreviated information, as follows:...
  • Page 334 Regulatory information South Korea The KCC logo must be at least 5 mm tall. The text shown in the label is: 인증번호 : MSIP-CRM-DIG-XBee-S2C XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 335: Ifetel (Mexico)

    Mexico does not have a “modular” approval for radio products. If XBee/XBee-PRO Zigbee RF Modules are integrated into a product, the manufacturer must ensure compliance of the final product with all the requirements of Mexican regulations. Manufacturer: Digi International Country: USA Brand: Digi The Tariff Code (HS) for all XBee/XBee-PRO S2C radio modules is 8517-62-15.
  • Page 336: Oem Labeling Requirements

    Regulatory information IFETEL (Mexico) XB24CZ7WITB003, XB24CZ7UITB003, XB24CZ7SITB003, XB24CZ7PITB003, XB24CAWIT-001, XB24CAUIT-001, XB24CASIT-001, XB24CAPIT-001, XB24CDMWIT-001, XB24CDMUIT-001, XB24CDMSIT-001, XB24CDMPIT-001 OEM labeling requirements WARNING! The Original Equipment Manufacturer (OEM) must ensure that Mexico IFT labeling requirements are met. The IFETEL number for the XBee product must be listed either on the end product, on the packaging, in the manual, or in the software with the following phrase, substituting the IFT number for the XBee S2C product you are using for the XXXXXXXXX-XXXX: “Este equipo contiene el módulo XBee con Número IFETEL: XXXXXXXXX-XXXX”...
  • Page 337: Migrating From Xbee Through-Hole To Xbee Surface-Mount Devices

    Migrating from XBee through-hole to XBee surface- mount devices The XBee surface-mount and through-hole devices are designed to be compatible and offer the same basic feature set. As mentioned previously, the surface-mount form factor has more I/O pins. This section provides information to help users migrate from the surface-mount to the Through-hole form factor.
  • Page 338 Migrating from XBee through-hole to XBee surface-mount devices Pin mapping Pin mapping Mapping of the surface-mount (SMT) pads to the through-hole (TH) pins is shown in the table below. The pin names are from the S2C SMT device. SMT Pin # Name TH Pin # DOUT / DIO13...
  • Page 339 Migrating from XBee through-hole to XBee surface-mount devices Mounting SMT Pin # Name TH Pin # ASSOCIATE / DIO5 RTS / DIO6 AD3 / DIO3 AD2 / DIO2 AD1 / DIO1 AD0 / DIO0 [reserved] [reserved] Mounting One important difference between the surface-mount and the through-hole devices is how they mount to the PCB.
  • Page 340 Migrating from XBee through-hole to XBee surface-mount devices Mounting The round holes in the diagram are for the through-hole design, and the semi-oval pads are for the surface-mount design. Pin 1 of the through-hole design lines up with pad 1 of the surface-mount design, but the pins are actually offset by one pad—see mapping.
  • Page 341: Manufacturing Information

    Manufacturing information Manufacturing information The XBee/XBee-PRO Zigbee RF Module is designed for surface-mounting on the OEM PCB. It has castellated pads to allow for easy solder attaching and inspection. The pads are all located on the edge of the device so there are no hidden solder joints on these devices. Recommended solder reflow cycle Recommended footprint and keepout Flux and cleaning...
  • Page 342: Recommended Solder Reflow Cycle

    Manufacturing information Recommended solder reflow cycle Recommended solder reflow cycle The following table lists the recommended solder reflow cycle. The chart shows the temperature setting and the time to reach the temperature. Time (seconds) Temperature (°C) The maximum temperature should not exceed 260 °C. The device reflows during this cycle, and must not be reflowed upside down.
  • Page 343 Manufacturing information Recommended footprint and keepout Match the solder footprint to the copper pads, but you may need to adjust it depending on the specific needs of assembly and product standards. We recommend a stencil thickness of 0.15 mm (0.005 in). Place the component last and set the placement speed to the slowest setting. While the underside of the module is mostly coated with solder resist, we recommend that the copper layer directly below the module be left open to avoid unintended contacts.
  • Page 344: Flux And Cleaning

    Flux and cleaning Flux and cleaning Digi recommends that a “no clean” solder paste be used in assembling these devices. This eliminates the clean step and ensures unwanted residual flux is not left under the device where it is difficult to remove.
  • Page 345 Manufacturing information Reworking recognize that some customers choose to rework and void the warranty. The following information serves as a guideline in such cases to increase the chances of success during rework, though the warranty is still voided. The device may be removed from the OEM PCB by the use of a hot air rework station, or hot plate. Be careful not to overheat the device.
  • Page 346: Load Zigbee Firmware On 802.15.4 Devices

    Load Zigbee firmware on 802.15.4 devices Background Load Zigbee firmware XBee/XBee-PRO® S2C Zigbee® RF Module User Guide...
  • Page 347: Background

    Zigbee firmware onto the module, because it is not labeled with the appropriate certification markings. Please check with local laws or your regional Digi International representative for more information. Module name...
  • Page 348: Load Zigbee Firmware

    1. Verify that your device's part number (listed on the label) is included in the list shown in the table above. 2. Install the device in a Digi development board and connect it to your PC. 3. The next steps involve loading firmware using XCTU. To download XCTU and read detailed instructions about it, go to: https://www.digi.com/products/xbee-rf-solutions/xctu-software/xctu...

This manual is also suitable for:

Xbee-pro s2c zigbee

Table of Contents