Digi XBee User Manual

Digi XBee User Manual

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

Advertisement

Quick Links

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

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Digi XBee

  • Page 1 XBee®/XBee-PRO S2C ZigBee® RF Module User Guide...
  • Page 2 Information in this document is subject to change without notice and does not represent a commitment on the part of Digi International. Digi provides this document “as is,” without warranty of any kind, expressed or implied, including, but not limited to, the implied warranties of fitness or merchantability for a particular purpose.
  • Page 3 Digi Technical Support: Digi offers multiple technical support plans and service packages to help our customers get the most out of their Digi product. For information on Technical Support plans and pricing, contact us at +1 952.912.3444 or visit us at www.digi.com/support.
  • Page 4: Table Of Contents

    Contents XBee/XBee-PRO® S2C ZigBee® RF Module Note on product naming Applicable firmware and hardware Firmware release notes Technical specifications Performance specifications Power requirements General specifications Networking and security specifications Communication interface specifications Regulatory conformity summary Serial communication specifications UART pin assignments...
  • Page 5 Permit joining Reset the coordinator Leave a network Replace a coordinator (security disabled only) Example: start a coordinator Example: replace a coordinator (security disabled) ZigBee router operation Discover ZigBee networks Join a network Persistent data XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 6 AT firmware API firmware API frame RF packet routing Link status transmission AODV mesh routing Many-to-One routing High/Low RAM Concentrator mode Source routing Encrypted transmissions Maximum RF payload size Throughput ZDO transmissions Sending a ZDO command XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 7 ZigBee security model Network layer security APS layer security Trust center Forming or joining a secure network Implementing 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...
  • Page 8 Putting it all together Short sleep periods Extended sleep periods Sleep examples Analog and digital I/O lines Configurable I/O pins and configuration commands XBee ZB through-hole RF module I/O Configuration I/O sampling Queried sampling Periodic I/O sampling Change detection sampling...
  • Page 9 Receive Packet frame - 0x90 Explicit Rx Indicator frame - 0x91 Data Sample Rx Indicator frame - 0x92 XBee Sensor Read Indicator - 0x94 Node Identification Indicator frame - 0x95 Remote Command Response frame - 0x97 Extended Modem Status frame - 0x98...
  • Page 10 LT (Associate LED Blink Time) PR (Pull-up/Down Resistor Enable) PD (Pull Up/Down Direction) RP (RSSI PWM Timer) DC (Device Controls) DO (Device Options) %V (Voltage Supply Monitoring) V+ (Voltage Supply Monitoring) TP (Temperature) Diagnostic commands VR (Firmware Version) XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 11 Enable GPIO 1 and 2 Detect XBee versus XBee-PRO Special instructions for using the JTAG interface Regulatory information United States (FCC) OEM labeling requirements FCC notices FCC-approved antennas (2.4 GHz) Associated antenna descriptions RF exposure Europe (CE) XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 12 Transmitters for detachable antennas Detachable antenna For XBee S2D SMT: RF Exposure Australia (RCM) ANATEL (Brazil) South Korea Migrating from XBee through-hole to XBee surface-mount devices Pin mapping Mounting Manufacturing information Recommended solder reflow cycle Recommended footprint Flux and cleaning Reworking Load ZigBee firmware on 802.15.4 devices...
  • Page 13: Xbee/Xbee-Pro® S2C Zigbee® Rf Module

    Using the ZigBee PRO Feature Set, these modules are inter-operable with other ZigBee devices, including devices from other vendors. With the XBee, users can have their ZigBee network up-and-running in a matter of minutes without configuration or additional development.
  • Page 14: Note On Product Naming

    XBee/XBee-PRO® S2C ZigBee® RF Module Note on product naming Note on product naming Although we refer to the device as an S2C, information for the S2D is also part of the guide. The information for the S2D is part of the S2C guide because the hardware is very similar.
  • Page 15 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...
  • Page 16: Technical Specifications

    -102 dBm, boost mode -101 dBm -100 dBm, normal mode -100 dBm, normal mode sensitivity Power requirements The following table describes the power requirements for the XBee/XBee-PRO ZigBee RF Module. XBee-PRO ZigBee XBee XBee ZigBee S2C Specification ZigBee S2D Adjustable power Supply voltage 2.1 - 3.6 V 2.2 - 3.6 V for programmable...
  • Page 17: Networking And Security Specifications

    RF pad, PCB antenna, or U.FL connector Networking and security specifications The following table describes the networking and security specifications for the devices. XBee ZigBee S2C Specification XBee-PRO ZigBee S2C XBee ZigBee S2D Supported network Point-to-point, point-to-multipoint, peer-to-peer, and DigiMesh topologies Number of channels...
  • Page 18: 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 (surface- XBee (through- XBee-PRO XBee S2D (surface-...
  • Page 19: Serial Communication Specifications

    For more information on SPI operation, see operation. GPIO specifications XBee/XBee-PRO ZigBee RF Modules have 15 General Purpose Input / Output (GPIO) ports available. The exact list depends on the device configuration as some GPIO pads are used for purposes such as serial communication.
  • Page 20: Hardware Specifications For The Programmable Variant

    Runtime current for 32 k running at 20 +14 mA Runtime current for 32 k running at 1 +1 mA +0.5 µA typical Sleep current For additional specifications see NXP MC9S08QE32 Datasheet and Manual XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 21 Hardware specifications for the programmable variant Optional secondary processor Add to RX, TX, and sleep currents specifications specification depending on mode of operation Minimum Reset low pulse time for +26 µS EM357 1.8 VDC to V Range XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 22: 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...
  • Page 23: 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 24: 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...
  • Page 25 SPI_MISO/DIO15 Output Output Serial peripheral interface data out/GPIO [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 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 26: Pin Signals For The Through-Hole Module

    JTAG functions are needed. Pin signals for the through-hole module The following table shows the pin signals and their descriptions for the through-hole module. Default Name Direction state Description Power supply DOUT/DIO13 Both Output UART data out XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 27: Em357 Pin Mappings

    The following table shows how the EM357 pins are used on the device. Note Some lines may not go to the external device pins in the programmable secondary processor version. XBee XBee EM357 (SMT) (TH) pin# EM357 pin name pad# pin # Other usage Programming XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 28: Design Notes

    PB5/ADC0 Temperature sensor on PRO version Design notes The XBee modules do not require any external circuitry or specific connections for proper operation. However, there are some general design guidelines that we recommend to build and troubleshoot a robust design.
  • Page 29: Board Layout

    Tall electrolytic capacitors Use the following additional guidelines for optimal antenna performance: Do not place XBee modules with the chip or integrated PCB antenna inside a metal enclosure. Do not place any ground planes or metal objects above or below the antenna.
  • Page 30: Recommended Pin Connections

    The following drawings illustrate important recommendations when you are designing with PCB antenna devices. For optimal performance, do not mount the device on the RF pad footprint described in the next section, because the footprint requires a ground plane within the PCB antenna keep out area. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 31 3. Maximize the distance between the antenna and metal objects that might be mounted in the keepout area. 4. These keepout area guidelines do not apply for wire whip antennas or external RF connectors. Wire whip antennas radiate best over the center of a ground plane. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 32: Design Notes For Smt Rf Pad Devices

    The controlled impedance for the RF trace is 50 Ω. We recommend using a microstrip trace, although you can also use a coplanar waveguide if you need more isolation. Microstrip generally requires less area on the PCB than coplanar waveguide. We do not XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 33 Implementing these design suggestions helps ensure that the RF pad device performs to its specifications. The following figures show a layout example of a host PCB that connects an RF pad device to a right angle, through-hole RPSMA jack. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 34 Maintain a distance of at least 2 d between microstrip and ground fill. Device pin 36. 50 Ω microstrip trace. RF connection of RPSMA jack. The following illustration shows PCB layer 2 of an example RF layout. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 35: Module Operation For The Programmable Variant

    The modules with the programmable option have a secondary processor with 32k of flash and 2k of RAM. This allows module integrators to put custom code on the XBee module to fit their own unique needs. The secondary processor intercepts the DIN, DOUT, RTS, CTS, and RESET lines to allow it to be in control of the data transmitted and received.
  • Page 36: Programmable Xbee Sdk

    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. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 37: Programmable Connections

    Programmable connections The following figure shows the programmable connections for the SMT.
  • Page 38 The following illustration shows the programmable connections for the TH Module.
  • Page 39 6 ft (2 m) between devices. Transmitting in close proximity of other devices can damage the device's front end. Serial interface UART data flow SPI communications Serial buffers UART flow control Break control Serial interface protocols Modes of operation XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 40: Operation

    Serial interface Serial interface The XBee/XBee-PRO ZigBee RF Module interface to a host device through a serial port. The device can communicate with any logic and voltage compatible UART, through a level translator to any serial device (for example, through a RS-232 or USB interface board), or through a SPI, as described in communications.
  • Page 41: Spi Communications

    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.
  • Page 42: Serial Port Selection

    If you enable only the UART, the XBee device uses only the UART, and ignores the SPI_SSEL. If you enable only the SPI, the XBee device uses only the SPI, and ignores UART communications. If you hold DOUT low during boot, then the XBee device only uses the SPI.
  • Page 43: Serial Transmit Buffer

    If the device receives an RF data packet and the serial transmit buffer does not have enough space for all of the data bytes, it discards the entire RF data packet. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 44: Break Control

    Command mode with default baud settings (9600 baud). If either P3 or P4 are not enabled, this break function is disabled. Serial interface protocols The XBee/XBee-PRO ZigBee RF Module supports both Transparent and Application Programming Interface (API) serial interfaces. Transparent operating mode When operating in Transparent mode, the devices act as a serial line replacement.
  • Page 45: Compare Transparent And Api Operation

    Must support multiple ZigBee endpoints, cluster IDs, and/or profile IDs. Uses the ZigBee Device Profile services. API mode is required when: Using Smart Energy firmware. Using SPI for the serial port. Receiving I/O samples from remote devices. Using source routing. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 46 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. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 47: Modes Of Operation

    Modes of operation Modes of operation The XBee/XBee-PRO ZigBee RF Module is in Receive Mode when it is not transmitting data. 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 48: Idle Mode

    In this case, the source retransmits the data, which can cause the destination to receive the same data packet multiple times. The XBee modules do not filter out duplicate packets. We recommend that the application includes provisions to address this issue.
  • Page 49: Receive Mode

    Modes of operation 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.
  • Page 50: Sleep Mode

    Sleep modes allow the device to enter states of low power consumption when not in use. The XBee/XBee-PRO ZigBee RF Module supports both pin sleep (Sleep mode entered on pin transition) and cyclic sleep (device sleeps for a fixed time).
  • Page 51 ZigBee networks About the ZigBee specification ZigBee stack layers ZigBee networking concepts Zigbee application layers: in depth ZigBee coordinator operation ZigBee router operation End device operation ZigBee channel scanning XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 52: Zigbee Networks

    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. This table describes the ZigBee layers. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 53: Zigbee Networking Concepts

    Can buffer wireless data packets for sleeping end device children. Can allow other routers and end devices to join the network. Cannot sleep; router(s) must be powered on all the time. May have multiple router devices in a network. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 54 By default, the device operates as a router in transparent mode. To select coordinator operation, set CE to 1. To select end device operation, set SM to a non-zero value. To select router operation, both CE and SM must be 0. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 55: Pan Id

    PAN and inherit the PAN ID from the network when it joins. All ZigBee beacons include the 64-bit PAN ID and is used in 16- bit PAN ID conflict resolution. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 56: Operating Channels

    Operating channels ZigBee uses direct-sequence spread spectrum modulation and operates on a fixed channel. The 802.15.4 PHY defines 16 operating channels (channels 11 to 26) in the 2.4 GHz frequency band. XBee modules support all 16 channels. Zigbee application layers: in depth The following topics provide a more in-depth look at the ZigBee application stack layers (APS, ZDO) including a discussion on ZigBee endpoints, clusters, and profiles.
  • Page 57 Digi XBee ZigBee firmware operates on a private profile called the Digi Drop-In Networking profile. However, in many cases the XBee/XBee-PRO ZigBee RF Module can use API mode to talk to devices in public profiles or non-Digi private profiles. For more information, see Operation.
  • Page 58: Zigbee Coordinator Operation

    Profile. See the ZigBee specification for a complete listing of all ZDP services. Each service has an associated cluster ID. The XBee ZB firmware allows applications to easily send ZDO messages to devices in the network using the API. For more information, see transmissions.
  • Page 59: Coordinator Startup

    NJ (Node Join Time) Sets AI = 0 Starts blinking the Associate LED Sends an API modem status frame (“coordinator started”) out the serial port when using API mode These behaviors are configurable using the following commands: XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 60: Permit Joining

    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. The following actions restart the permit-joining timer: Changing NJ to a different value (and applying changes with the AC or CN commands).
  • Page 61: Leave A Network

    On rare occasions, it may become necessary to replace an existing coordinator in a network with a new physical device. If security is not enabled in the network, you can configure a replacement XBee coordinator with the PAN ID (16-bit and 64-bit), channel, and stack profile settings of a running network in order to replace an existing coordinator.
  • Page 62: Example: Start A Coordinator

    Routers must discover and join a valid ZigBee network before they can participate in a ZigBee network. After a router has joined a network, it can allow new devices to join the network. It can also XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 63: Discover Zigbee Networks

    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 64: Zigbee Router Joining

    You can configure these behaviors using the following commands: Command Description Sets the permit-join time on the router, or the time that it allows new devices to join the network, measured in seconds. Set NJ = 0xFF to always enable permit joining. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 65: Permit Joining

    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. The following actions restart the permit-joining timer: Changing NJ to a different value (and applying changes with the AC or CN commands).
  • Page 66 You can set the watchdog timer (NW command) to several days. The default setting for the network watchdog feature is disabled (NW defaults to 0). The following flowchart illustrates network watchdog behavior: XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 67 Issue the NR1 command to send a broadcast transmission, causing all devices in the network to leave and migrate to a different channel. Press the commissioning button 4 times or issue the CB command with a parameter of 4. Issue a network leave command. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 68: End Device Operation

    After an end device joins a network, it can communicate with other devices on the network. Because end devices are battery powered and support low power (sleep) modes, they cannot allow other devices to join or route data packets. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 69: Discover Zigbee Networks

    If scanning all SC channels fails to discover a valid PAN, XBee ZigBee devices attempt to enter a low power state and retries scanning all SC channels after the device wakes from sleeping. If the device cannot enter a low power state, it retries scanning all channels, similar to the router.
  • Page 70: Persistent Data

    SC on the end device should be set to match SC on the coordinator and routers in the desired network. For example, setting SC to 0x281 enables scanning on channels 0x0B, 0x12, and 0x14, in that order. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 71: Parent Connectivity

    Parameters that configure the sleep mode characteristics. Parent connectivity The XBee/XBee-PRO ZigBee RF Module end device sends regular poll transmissions to its parent when it is awake. These poll transmissions query the parent for any new received data packets. The parent always sends a MAC layer acknowledgment back to the end device.
  • Page 72: Leave A Network

    8. The API Modem Status frame (“Associated”) is sent out the serial port when using API mode. 9. The joined end device attempts to enter low power sleep modes based on its sleep configuration commands (SM, SP, SN, ST, SO). XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 73: Zigbee Channel Scanning

    11, 12, 13, 14, and 25 have been scanned (in that order). Once an XBee router or end device joins a network on a given channel, if the XBee device receives a network leave command (see...
  • Page 74: Application Messaging Framework

    If the application does not receive the expected response message after joining, it could force the device to leave and continue scanning; see NR (Network Reset). XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 75 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 ZDO transmissions Transmission timeouts XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 76: Transmission, Addressing, And Routing

    MAC address or extended address and is assigned during the manufacturing process. The first three bytes of the 64-bit address is a Organizationally Unique Identifier (OUI) assigned to the manufacturer by the IEEE. The OUI of XBee devices is 0x0013A2. 16-bit device addresses A device receives a 16-bit address when it joins a ZigBee network.
  • Page 77: Unicast Transmissions

    Large broadcast packets require more buffer space. Users cannot change any buffer spacing; information on buffer space is for general knowledge only. The XBee/XBee-PRO ZigBee RF Module handles buffer spacing automatically. Since each device in the network retransmits broadcast transmissions, use broadcast messages sparingly.
  • Page 78: Address Resolution

    10 devices, the application implements an address table to store the 16-bit and 64-bit addresses for each remote device. Use API mode for any XBee device that sends data to more than 10 remotes. The application can then send both the 16-bit and 64-bit addresses to the XBee device in the API transmit frames which significantly reduces the number of 16-bit address discoveries and greatly improves data throughput.
  • Page 79: Group Table

    Indirect Tx Option (0x04) as a binding transmission request. Address resolution The XBee/XBee-PRO ZigBee RF Module use the source endpoint and cluster ID values of a binding transmission as keys to lookup matching binding table entries. For each matching binding table entry, the type field of the entry indicates whether to send a unicast or a multicast message.
  • Page 80: Binding Table

    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 transmit request frame (0x11) using the Multicast Tx Option (0x08) as a multicast transmission request.
  • Page 81: At Firmware

    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 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 82: Api Frame

    ID 0xC105command ID 0x00, a ZCL Header of 151E10, transaction number EE, and a ZCL payload of 000102030405: 7E 001E 11 01 FFFFFFFFFFFFFFFF 1234 E6 FE 0001 C105 00 08 151E10EE000102030405 BC XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 83: Rf Packet Routing

    Suppose that the output power of device A is +18 dBm, and the output power of device B is +3 dBm (considerably less than the output power of device A). The link status messages might indicate the following: XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 84: Aodv Mesh Routing

    Routers and coordinators can participate in establishing routes between source and destination devices using a process called route discovery. The Route discovery process is based on the Ad-hoc On-demand Distance Vector routing (AODV) protocol. Sample transmission through a mesh network: XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 85 The following graphic is a sample route request (broadcast) transmission where R3 is trying to discover a route to R6: XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 86 This Ack is called the Mac layer acknowledgment. In addition, the device that originated the transmission expects to receive an acknowledgment packet (Ack) from the destination device. This Ack traverses the same path the data traversed, but in the opposite direction. If the originator fails to XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 87: Many-To-One Routing

    To use source routing, a device must use the API mode, and it must send periodic many-to-one route request broadcasts (AR command) to create a many-to-one route to it on all devices. When remote devices send RF data using a many-to-one route, they first send a route record transmission. The XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 88 The data collector sends a many-to-one route request broadcast to create reverse routes on all devices. A remote device sends an RF data packet to the data collector. This is prefaced by a route record transmission to the data collector. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 89 1. If the application on remote devices periodically sends data to the data collector, each transmission force a route record to occur. 2. The data collector can issue a network discovery command (ND command) to force all XBee modules to send a network discovery response. A route record prefaces each network discovery response.
  • Page 90 To send a source-routed packet to R3, the application sends a Create Source Route API frame (0x21) to the XBee, with a destination of R3, and 2 hops (R1 and R2). If the 64- bit address of R3 is 0x0013A200 404a1234 and the 16-bit addresses of R1, R2, and R3 are:...
  • Page 91 This removes the aggregator's status as an aggregator from the network's routing tables so that no more route records will be sent to the aggregator. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 92: Encrypted Transmissions

    3. Use Create Source Route (API frame type 0x21) to load the route record for a destination into the local XBee's source route table. 4. Send a unicast to the destination. The route record embeds in the payload and determines the sequence of routers to use in transmitting the unicast to the destination.
  • Page 93 Coordinators or Routers which have the following: Source routing enabled or AR setting which is not 0xFF The following table shows the aggregator source-routed payload maximums as a function of hops and APS encryption: Hops Maximum encrypted payload Maximum unencrypted payload XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 94: Throughput

    RR = router to router RE = router to end device (non-sleeping) ER = end device (non-sleeping) to router SD = security disabled SE = security enabled 4 hops = 5 nodes total, 3 intermediate router nodes XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 95: Zdo Transmissions

    Receiving ZDO command and responses In XBee ZB firmware, you can easily send ZDO commands using the API. To receive incoming ZDO commands, enable receiver application addressingwith the AO command. See the examples later in this section.
  • Page 96 Example 2: Send a ZDO network Address Request to discover the 16-bit address of a remote Looking at the ZigBee specification, the cluster ID for a network Address Request is 0x0000, and the payload only requires the following: XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 97: Transmission Timeouts

    ZigBee stack uses an extended timeout that includes the unicast timeout (to route data to the end device's parent), and it includes a timeout for the end device to finish sleeping, wake, and poll the parent for data. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 98: Unicast Timeout

    The ZigBee stack uses the unicast timeout unless it knows the destination is an end device. The XBee API includes a transmit options bit that you can set to specify the extended timeout used for a given transmission. If you set this bit, the extended timeout will be used when sending RF data to the specified destination.
  • Page 99: Transmission Examples

    Example 2: Send a broadcast API data transmission that all devices can receive (including sleeping end devices), with payload “TxData” API frame 7E 0014 10 01 00000000 0000FFFF FFFE 00 00 54 78 44 61 74 61 AD XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 100 0x65 Checksum (0xFF - SUM (all bytes after length)) Description Setting AO = 1 is required for the XBee/XBee-PRO ZigBee RF Module to use the Explicit Rx Indicator frame - 0x91 when receiving RF data packets. This is required if the application needs indication of source or destination endpoint, cluster ID, or profile ID values used in received ZigBee data packets.
  • Page 101: Zigbee Security

    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 the XBee/XBee-PRO ZigBee RF Modules to support these features. Security modes ZigBee security model Implementing security on the XBee/XBee-PRO ZigBee RF Module XBee/XBee-PRO®...
  • Page 102: Security Modes

    High security adds entity authentication and a number of other features not widely supported. XBee ZB modules primarily support standard security, although end devices that support residential security can join and interoperate with standard security devices. This section focuses on material that is relevant to standard security.
  • Page 103: Aps Layer Security

    APS link key known by only the source and destination device. APS security cannot be applied to broadcast transmissions. If you enable APS security, the APS header and data payload are authenticated with 128-bit AES as shown in the following image: XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 104 9 bytes when APS encryption is used. 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. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 105: Trust Center

    Implementing security on the XBee/XBee-PRO ZigBee RF Module If you enable security in the XBee ZigBee firmware, devices acquire the network key when they join a network. Data transmissions are always encrypted with the network key, and can optionally be end- to-end encrypted with the APS link key.
  • Page 106: 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 107: Use A Trust Center

    ZigBee security Implementing 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 108 ZigBee security Implementing 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 109: Network Commissioning And Diagnostics

    Place devices For a network installation to be successful, installers must be able to determine where to place individual XBee devices to establish reliable links throughout the network. Test links in a network - loopback cluster For a network installation to be successful, you must determine where to place individual devices in order to establish reliable links throughout a network.
  • Page 110: 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 111: Joining Announce

    LED behaviors. The following features can be supported in hardware: A pushbutton and an LED can be connected to XBee/XBee-PRO ZigBee RF Module pins 33 and 28 (SMT), or pins 20 and 15 (TH) respectively to support the commissioning pushbutton and associate LED functionalities.
  • Page 112: Associate Led

    The LT command defines the blink time of the Associate pin. If it is set to 0, the device uses the default blink time (500 ms for coordinator, 250 ms for routers and end devices). XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 113: 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 114 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...
  • Page 115 (64 bit address of sending device) Source Endpoint on sending device 05c1 ProfileID (0xC105) - used when matching End_Device_Bind_requests Number of input clusters 0100 Input cluster ID list (0x0100) Number of output clusters 0200 Output cluster ID list (0x0200) XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 116: Example Of A End_Device_Bind_Req

    But to implement multicast (group) addressing within the XBee, the external processor must keep the XBee's group table state in sync with its own. For this reason, a Group Table API has been defined where the external processor can manage the state of the ZigBee XBee's group table.
  • Page 117 Transmit Retries 0x00 Delivery Status 0x00 Discovery Status 0x00 Success ZigBee Cluster Library, document 075123r02: Add Group Command, section 3.6.2.3.1. ZigBee Cluster Library, document 075123r02: Add Group Command, section 3.6.2.3.1. ZigBee Cluster Library, document 075123r02: Add Group Response, section 3.6.2.4.1 and Status Enumerations, section 2.5.3. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 118: View Group

    The third field is the command identifier “View Group” (0x01) ZCL_payload = “00 3412 0441424344" ZigBee Cluster Library, document 075123r02: View Group Command, section 3.6.2.3.2. ZigBee Cluster Library, document 075123r02: View Group Response, section 3.6.2.4.2. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 119: Get Group Membership

    The response in raw hex byte form, consisting of two packets: 7e0019910013a2004047b55cfffee7e68006c1050009ee02ff01341235 7e00078b01fffe00000076 The response in decoded form: ZigBee Cluster Library, document 075123r02: View Group Response, section 3.6.2.4.2. and Status Enumerations, section 2.5.3. ZigBee Cluster Library, document 075123r02: Get Group Membership Command, section 3.6.2.3.3. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 120 Membership” (0x02) ZCL_payload = “FF 01 3412" The first byte is the remaining capacity of the group table. 0xFF means unknown. The XBee returns this value because the capacity of the group table is dependent on the remaining capacity of the binding table, thus the capacity of the group table is unknown.
  • Page 121: Remove Group

    Membership” (0x02) ZCL_payload = “FF 01 3412" The first byte is the remaining capacity of the group table. 0xFF means unknown. The XBee returns this value because the capacity of the group table is dependent on the remaining capacity of the binding table, thus the capacity of the group table is unknown.
  • Page 122 The third field is the command identifier “Remove Group” (0x03) ZCL_payload = “00 3412" ZigBee Cluster Library, document 075123r02: Remove Group Command, section 3.6.2.3.4. ZigBee Cluster Library, document 075123r02: Remove Group Response, section 3.6.2.4.4. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 123: Remove All Groups

    Groups” (0x04) ZCL_payload = “” No payload is needed for this command. ZigBee Cluster Library, document 075123r02: Remove Group Response, section 3.6.2.4.4 and Status Enumerations, section 2.5.3. ZigBee Cluster Library, document 075123r02: Remove All Groups Command, section 3.6.2.3.5. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 124: Default Responses

    08010b788b would be decoded as: ZCL_header = “08 01 03" - general command/server-to-client, transseqnum=1, default_response_command(0x03) ZCL_payload = “78 8b” - original cmdID, status code (0x8b) EMBER_ZCL_STATUS_NOT_FOUND ZigBee Cluster Library, document 075123r02: Remove Group Response, section 3.6.2.4.4. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 125: Common Status Codes

    0x8b EMBER_ZCL_STATUS_NOT_FOUND: An attempt at Get Group Membership or Remove Group could not find a matching entry in the group table A full set of status codes appears in the ZigBee Cluster Library, Status Enumerations, section 2.5.3. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 126: Manage End Devices

    Parent operation Non-Parent device operation End Device configuration Recommended sleep current measurements Transmitting RF data Receiving RF data I/O sampling Waking end devices with the Commissioning Pushbutton Parent verification Rejoining Router/Coordinator configuration Putting it all together XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 127: End Device Operation

    The data packet remains buffered until a timeout expires, or until the end device sends a poll request to retrieve the data. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 128: End Device Poll Timeouts

    Applications can reduce the number of required application broadcasts, and consider implementing an external address table or many-to-one and source routing if necessary to improve routing efficiency. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 129: Non-Parent Device Operation

    SLEEP_RQ line. The SM command configures the sleep mode. In both pin and cyclic sleep modes, XBee end devices poll their parent every 100 ms while they are awake to retrieve buffered data. When the end device sends a poll request, it enables the receiver until it receives an acknowledgment from the parent.
  • Page 130: Pin Sleep

    (that is, when scanning for a valid network completes). The device wakes from pin sleep when the SLEEP_RQ pin is de-asserted (low). The following figures show the XBee sleep pins. Surface-mount sleep pins...
  • Page 131: Cyclic Sleep

    6 ms for a PRO device. When the XBee device 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 132 Manage End Devices End Device configuration Surface-mount cyclic sleep pins S2C Through-hole cyclic sleep pins The following figure shows the cyclic sleep waveforms. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 133 SI command as shown in the following image. Sleep period Configure the sleep period based on the SP, SN, and SO commands. The following table lists the behavior of these commands. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 134 SO command must be set to 0x00 (default) or 0x02. In short cyclic sleep mode, the SP command defines the sleep period and you can set it for up to 28 seconds. When the XBee module enters short cyclic sleep, it remains in a low power state until the SP time has expired.
  • Page 135 The following are preconditions for maintaining low current draw during sleep: You must maintain the supply voltage within a valid operating range (2.1 to 3.6 V for the XBee, 3.0 to 3.6 V for the XBee-PRO (S2), 2.7 to 3. V for the XBee-PRO S2B).
  • Page 136: Recommended Sleep Current Measurements

    The sleep current may be less for an S2C than an S2D, because the S2D has more RAM to maintain during sleep (64K versus 12K RAM). XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 137: Internal Pin Pull-Ups

    (ST) is started (serial or RF data is received). If the sleep timer is started, the end device will continue to poll every 100 ms until the sleep timer expires. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 138: I/O Sampling

    Since an end device relies on its parent to maintain connectivity with other devices in the network, XBee end devices include provisions to verify the connection with its parent. End devices monitor the link with their parent when sending poll messages and after a power cycle or reset event as described below.
  • Page 139: Router/Coordinator Configuration

    If multiple rejoining attempts fail, or if NJ=0xFF, the device attempts to join using association. Router/Coordinator configuration XBee routers and coordinators may require some configuration to ensure the following are set correctly. RF Packet buffering timeout...
  • Page 140: 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. Set the timeout using the NH command. For more information, see Transmission, addressing, and routing. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 141: Putting It All Together

    As a general rule, SP and SN should be set the same on all devices in almost all cases. Sleep examples This section covers some sample XBee configurations to support different sleep modes. Several AT commands are listed with suggested parameter values.
  • Page 142 This ensures the parent does not timeout the end device from its child table too quickly. The SI command can optionally be sent to the end device to cause it to sleep before the sleep timer expires. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 143: Analog And Digital I/O Lines

    Analog and digital I/O lines XBee ZB 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...
  • Page 144: Configurable I/O Pins And Configuration Commands

    0, 1, 3-5 RTS/DIO6 0, 1, 3-5 AD3/DIO3 0, 2-5 AD2/DIO2 0, 2-5 AD1/DIO1 0, 2-6 AD0/DIO0 XBee ZB through-hole RF module Module Pin Names Module Pin AT Command Command Range DIO13/DOUT 0, 1, 3-5 DIO14/DIN/CONFIG 0, 1, 3-5 DIO12/PWM2/SWDIO/SPI_MISO...
  • Page 145: I/O Configuration

    DIO0/AD0/CommBtn I/O Configuration To enable an analog or digital I/O function on one or more XBee/XBee-PRO ZigBee RF Module pin, you must issue the appropriate configuration command with the correct parameter. After issuing the configuration command, you must apply changes on the device for the I/O settings to take effect.
  • Page 146: I/O Sampling

    PD to enable an internal pull-up resistor; clear it to enable an internal pull-down resistor. I/O sampling The XBee/XBee-PRO ZigBee RF Modules have the ability to monitor and sample the analog and digital I/O lines. I/O samples can be read locally or transmitted to a remote device to provide an indication of the current I/O line states.
  • Page 147: Queried Sampling

    If you issue the IS command in API mode, an API command response contains the same information. The following table shows an example of the fields in an IS response. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 148: Periodic I/O Sampling

    RSSI PWM The XBee module features an RSSI/PWM pin (pin 7/SMT, pin 6/TH) that, if enabled, adjusts the PWM output to indicate the signal strength of the last received packet. Use the P0 (P-zero) command to enable the RSSI pulse width modulation (PWM) output on the pin.
  • Page 149: I/O Examples

    PWM counts using the following equation: PWM counts = (41 * RSSI_Unsigned) - 5928 I/O examples Example 1: Configure the following I/O settings on the XBee Configure AD1/DIO1 as a digital input with pullup resistor enabled Configure AD2/DIO2 as an analog input Configure DIO4 as a digital output, driving high.
  • Page 150: Api Operation

    API frame format Data bytes that need to be escaped: API serial exchanges Frame descriptions Send ZDO commands with the API Send ZigBee Cluster Library (ZCL) commands with the API Send Public Profile Commands with the API XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 151: Api Frame Format

    When you are sending or receiving a UART data frame, specific data values must be escaped (flagged) so they do not interfere with the data frame sequencing. To escape an interfering data byte, insert 0x7D and follow it with the byte to be escaped XOR’d with 0x20. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 152: Data Bytes That Need To Be Escaped

    The cmdID frame (API-identifier) indicates which API messages contains the cmdData frame (Identifier-specific data). The device sends multi-byte values big endian format. The XBee/XBee-PRO ZigBee RF Module supports the following API frames: API frame names API ID AT Command...
  • Page 153: Calculate And Verify Checksums

    ZigBee Transmit Status 0x8B ZigBee Receive Packet (AO=0) 0x90 ZigBee Explicit Rx Indicator (AO=1) 0x91 ZigBee I/O Data Sample Rx Indicator 0x92 XBee Sensor Read Indicator (AO=0) 0x94 Node Identification Indicator (AO=0) 0x95 Remote Command Response 0x97 Extended Modem Status 0x98...
  • Page 154: Api Examples

    Subtract 0x47 from 0xFF and you get 0xB8 (0xFF - 0x47 = 0xB8). 0xB8 is the checksum for this data packet. If an API data packet is composed with an incorrect checksum, the XBee/XBee-PRO ZigBee RF Module will consider the packet invalid and will ignore the data.
  • Page 155: Api Serial Exchanges

    The following image shows the API frame exchange that takes place at the serial interface when sending an AT command request to read or set a device parameter. You can disable the response by setting the frame ID to 0 in the request. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 156: Transmit And Receive Rf Data

    The following image shows the API frame exchanges that take place at the serial interface when sending a remote AT command. The device does not send out a remote command response frame through the serial interface if the remote device does not receive the remote command. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 157: Source Routing

    API Operation API serial exchanges Source routing The following image shows the API frame exchanges that take place at the serial port when sending a source routed transmission. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 158: Frame Descriptions

    The following example illustrates an AT Command frame when you modify the device's NJ parameter value. Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 LSB 2 0x04 Frame type 0x08 Frame ID 0x52 (R) AT command 0x4E (N) 0x4A (J) XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 159 API Operation Frame descriptions Frame data fields Offset Example Parameter value (optional) Checksum 0x0D XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 160: At Command - Queue Parameter Value Frame - 0X09

    Note In this example, you could send the parameter as a zero-padded 2-byte or 4-byte value. Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 LSB 2 0x05 Frame type 0x09 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 161 API Operation Frame descriptions Frame data fields Offset Example Frame ID 0x01 AT command 0x42 (B) 0x44 (D) Parameter value (BD7 = 115200 baud) 0x07 Checksum 0x68 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 162: Transmit Request Frame - 0X10

    0xFFFE. network address Broadcast Sets the maximum number of hops a broadcast transmission can occur. If radius set to 0, the broadcast radius is set to the maximum hops value. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 163 Frame type 0x10 Frame ID 0x01 64-bit destination MSB 5 0x00 address 0x13 0xA2 0x00 0x40 0x0A 0x01 LSB 12 0x27 16-bit destination 0xFF MSB 13 network address 0xFE LSB 14 Broadcast radius 0x00 Options 0x00 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 164 0x00 LSB 2 0x16 Frame type 0x10 Frame ID 0x01 64-bit destination MSB 5 0x00 address 0x13 0xA2 0x00 0x40 0x0A 0x01 LSB 12 0x27 16-bit destination 0xFF MSB 13 network address 0xFE LSB 14 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 165 API Operation Frame descriptions Frame data fields Offset Example Broadcast radius 0x00 Options 0x00 Data payload (Tx2Coord) 0x54 0x78 0x32 0x43 0x6F 0x6F 0x72 0x64 Checksum 0xFC XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 166: Explicit Addressing Command Frame - 0X11

    Reserved 64-bit address for the coordinator = 0x0000000000000000 destination Broadcast = 0x000000000000FFFF Address 16-bit Set to the 16-bit address of the destination device, if known. Set to 0xFFFE if the address is unknown, or if sending a broadcast. destination Network Address XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 167 64-bit address: 0x00 Source endpoint: 0xA0 Destination endpoint: 0xA1 Cluster ID: 0x1554 Profile ID: 0xC105 Payload: TxData Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 LSB 2 0x1A Frame type 0x11 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 168 Network Address 0xFE LSB 14 Source endpoint 0xA0 Destination endpoint 0xA1 Cluster ID 0x15 0x54 Profile ID 0xC1 0x05 Broadcast radius 0x00 Transmit options 0x00 Data payload 0x54 0x78 0x44 0x61 0x74 0x61 Checksum 0x3A XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 169: Remote At Command Request Frame - 0X17

    Example The following example sends a remote command to: In this example, the 64-bit address of the remote device is 0x0013A200 40401122. The destination 16- bit address is unknown. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 170 64-bit destination address MSB 5 0x00 0x13 0xA2 0x00 0x40 0x40 0x11 LSB 12 0x22 Reserved 0xFF 0xFE Remote command options 0x02 (apply changes) AT command 0x42 (B) 0x48 (H) Command parameter 0x01 Checksum 0xF5 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 171: Create Source Route - 0X21

    (40), the device silently discards this API frame. However, the device discards a frame with more than 11 intermediate hops. Address 1 Neighbor of destination Address 2 Address of intermediate hop (closer hop) XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 172 Frame ID 64-bit destination address MSB 5 0x00 0x13 0xA2 0x00 0x40 0x40 0x11 LSB 12 0x22 16-bit destination MSB 13 0x33 network address 0x44 LSB 14 Remote command options 15 0x00 Number of addresses 0x03 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 173 API Operation Frame descriptions Frame data fields Offset Example Address 1 0xEE 0xFF Address 2 (closer hop) 0xCC 0xDD Address 3 0xAA 0xBB Checksum 0x01 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 174: At Command Response Frame - 0X88

    Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 LSB 2 0x05 Frame type 0x88 Frame ID 0x01 AT command 0x42 (B) 0x44 (D) Command status 0x00 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 175 API Operation Frame descriptions Frame data fields Offset Example Command data Checksum 0xF0 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 176: Modem Status Frame - 0X8A

    When a device powers up, it returns the following API frame. Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 LSB 2 LSB 2 0x02 Frame type 0x8A Status 0x06 Checksum 0x6F XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 177: Transmit Status Frame - 0X8B

    0x40 = Extended Timeout Discovery Example In the following example, the destination device reports that a unicast data transmission was successful with a 16-bit address of 0x7D84. The transmission could have been sent with the 16-bit XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 178 Offset Example Start delimiter 0x7E Length MSB 1 0x00 LSB 2 0x07 Frame type 0x8B Frame ID 0x01 16-bit destination address 0x7D 0x84 Transmit retry count 0x00 Delivery status 0x00 Discovery status 0x01 Checksum 0x71 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 179: Receive Packet Frame - 0X90

    RxData. If AO=0 on the receiving device, it sends the following frame out its serial interface. Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 LSB 2 0x11 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 180 MSB 4 0x00 0x13 0xA2 0x00 0x40 0x52 0x2B LSB 11 0xAA 16-bit source network address 0x7D MSB 12 0x84 LSB 13 Receive options 0x01 Received data 0x52 0x78 0x44 0x61 0x74 0x61 Checksum 0x0D XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 181: Explicit Rx Indicator Frame - 0X91

    If a device sends the transmission: With source and destination endpoints of 0xE0 Cluster ID = 0x2211 Profile ID = 0xC105 If AO = 1 on the receiving device, it sends the following frame out its serial interface. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 182 16-bit Source Network Address 0x7D MSB 12 0x84 LSB 13 Source endpoint 0xE0 Destination endpoint 0xE0 Cluster ID 0x22 0x11 Profile ID 0xC1 0x05 Receive options 0x02 Received data 0x52 0x78 0x44 0x61 0x74 0x61 Checksum 0x52 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 183: Data Sample Rx Indicator Frame - 0X92

    Digital channel mask field. N/A N/A N/A CD/DIC12 PWM/DI011 RSSI/DIO10 N/A N/A CTS/DI07 RTS/DI06 ASSOC/DI05 DI04 AD3/DI03 AD2/DI02 AD1/DIO1 AD0/DIO0 Supply Voltage N/A N/A N/A AD3 AD2 AD1 AD0 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 184 0x13 0xA2 0x00 0x40 0x52 0x2B LSB 11 0xAA 16-bit source network address MSB 12 0x7D LSB 13 0x84 Receive options 0x01 Number of samples 0x01 Digital channel mask 0x00 0x1C Analog channel mask 0x02 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 185 API Operation Frame descriptions Frame fields Offset Example Digital samples (if included) 0x00 0x14 Analog sample 0x02 0x25 Checksum 0xF5 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 186: Xbee Sensor Read Indicator - 0X94

    Frame descriptions 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. For details on frame structure, see API frame format.
  • Page 187 0x17 Frame type 0x94 64-bit source address MSB 4 0x00 0x13 0xA2 0x00 0x40 0x52 0x2B LSB 11 0xAA 16-bit source network address MSB 12 0xDD LSB 13 0x6C Receive options 0x01 0x03 1-Wire sensors XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 188 API Operation Frame descriptions Frame fields Offset Example 0x00 A/D Values 0x02 0x00 0xCE 0x00 0xEA 0x00 0x52 Temperature Read 0x01 0x6A Checksum 0x8B XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 189: Node Identification Indicator Frame - 0X95

    2 = Frame sent after joining event occurred (see JN (Join Notification)). 3 = Frame sent after power cycle event occurred (see JN (Join Notification)). Digi Profile ID 31-32 Set to Digi’s application profile ID. Digi 33-34 Set to Digi’s Manufacturer ID. Manufacturer XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 190 Frame type 0x95 64-bit source address MSB 4 0x00 0x13 0xA2 0x00 0x40 0x52 0x2B LSB 11 0xAA 16-bit source 0x7D MSB 12 network address 0x84 LSB 13 Receive options 0x02 Source 16-bit address 0x7D 0x84 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 191 0x00 0x13 0xA2 0x00 0x40 0x52 0x2B 0xAA NI string 0x20 0x00 Parent 16-bit address 0xFF 0xFE Device type 0x01 Source event 0x01 Digi Profile ID 0xC1 0x05 Digi Manufacturer ID 0x10 0x1E Checksum 0x1B XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 192: Remote Command Response Frame - 0X97

    SL command, and if the frame ID = 0x55, the response would look like the following example. Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 LSB 2 0x13 Frame type 0x97 Frame ID 0x55 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 193 0x00 0x13 0xA2 0x00 0x40 0x52 0x2B LSB 12 0xAA 16-bit source (remote) address MSB 13 0x7D LSB 14 0x84 AT commands 0x53 0x4C Command status 0x00 Command data 0x40 0x52 0x2B 0xAA Checksum 0xF4 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 194: Extended Modem Status Frame - 0X98

    See the following table for status code descriptions. Status data The length of this field varies with the Status Code. Example Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 LSB 2 0x03 Checksum 0x5C XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 195 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 196 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 197 Status Transparent code mode string Description Status data Description JV / NW with search option (DO80) has found 0x08 panID Match panId(2) 16 bit PAN Identifier for network a matching network Reject JV/NW with search option (DO80) candidate 0x09 LQIRSSI rejected because this beacon response is weaker than an earlier beacon response.
  • Page 198 Status Transparent code mode string Description Status data Description 0x12 Rejected Rejected because it matches the last (cmdL ast) associated network. 0x13 Rejected Rejected because it matches an already (cmdS ave) saved beacon response. 0x14 Reject During first/best phase, response is weaker strength than an already saved beacon response.
  • Page 199 Status Transparent code mode string Description Status data Description Discovering 0x21 Looking for Key Establishment Endpoint KE 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 200 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 201: Over-The-Air Firmware Update Status - 0Xa0

    If a query returns a 0x51 (QUERY) status, then the target's bootloader is not active and will not respond to query messages. Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 202 0x13 0xA2 0x00 0x40 0x3E 0x07 0x50 16-bit destination address 0x00 0x00 Receive options 0x01 Bootloader message type 0x52 Block number 0x00 64-bit target address 0x00 0x13 0xA2 0x00 0x40 0x52 0x2B 0xAA Checksum 0x66 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 203: Route Record Indicator - 0Xa1

    C, and D have the following 16-bit addresses: B = 0xAABB C = 0xCCDD D = 0xEEFF The data collector sends the above API frame out its serial port. Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 204 0x40 0x11 0x22 Source (updater) 16-bit address 0x33 0x44 Receive options 0x01 Number of Addresses 0x03 Address 1 0xEE 0xFF Address 2 (closer hop) 0xCC 0xDD Address n (neighbor of source) 0xAA 0xBB Checksum 0x80 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 205: Many-To-One Route Request Indicator - 0Xa3

    All remote routers operating in API mode that receive the many-to-one broadcast send the following example API frame out their serial port. Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 LSB 2 0x0C Frame type 0xA3 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 206: 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 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 207 64-bit addresses, must be sent in little endian byte order for the command to be executed correctly on a remote device. For an API XBee to receive ZDO responses, set AO (API Options) to 1 to enable the explicit receive API frame.
  • Page 208: Example

    0x01 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 0x00 Cluster ID 0x00 0x05 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 209: Send Zigbee Cluster Library (Zcl) Commands With The Api

    Used to read one or more attributes on a remote device. Read Attributes Response Generated in response to a read attributes command. (0x01) Write Attributes (0x02) Used to change one or more attributes on a remote device. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 210 Frame type Frame ID Identifies the serial port data frame for the host to correlate with a subsequent transmit status. If set to 0, no transmit status frame will be sent out the serial port. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 211 All bits must be set to 0. options Data Frame Bitfield that defines the command type and other payload frame control relevant information in the ZCL command. For more header information, see the ZCL specification. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 212: Example

    Response Reserved Set to 0. For more information, see the ZigBee Cluster Library specification. Frame data fields Offset Example Start delimiter 0x7E Length MSB 1 0x00 LSB 2 0x19 Frame type 0x11 Frame ID 0x01 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 213 MSB 19 0xD1 LSB 20 0x23 Broadcast radius 0x00 Transmit options 0x00 Data payload 0x00 ZCL frame header Frame control Transaction sequence number 24 0x01 Command ID 0x00 ZCL payload Attribute ID 0x03 0x00 Checksum 0xFA XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 214: Send Public Profile Commands With The Api

    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 215 Smart Energy specification. The 4-byte unique identifier. Issuer event payload Note The 4-byte ID is sent in little endian byte order - load (0x78563412). control event The event ID in this example (0x12345678) is data arbitrarily selected. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 216 Requested cooling set point in 0.01 degrees Celsius. Cooling A value of 0x8000 means the set point field is not temperature used in this event. set point Note The 0x80000 is sent in little endian byte order. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 217: Example

    0 - Default response not disabled Response Reserved Set to 0. For more information, see the ZigBee Cluster Library specification. Offset Example Frame fields Start delimiter 0x7E Length MSB 1 0x00 LSB 2 0x19 Frame type 0x11 Frame ID 0x01 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 218 MSB 5 0x00 address 0x13 0xA2 0x00 0x40 0x40 0x12 0x34 16-bit destination 0x56 network address 0x78 Source endpoint 0x41 Destination endpoint 0x42 Cluster ID 0x07 0x01 Profile ID 0x01 0x09 Broadcast radius 0x00 Transmit options 0x00 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 219 0x04 Cooling temperature 0xFF Heating temperature 0xFF offset Cooling temperature set 0x00 point 0x80 Heating temperature set 0x00 point 0x80 Average load adjustment 0x80 percentage Duty cycle 0xFF Duty cycle event control 0x00 Checksum 0x5B XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 220: At Commands

    AT commands Addressing commands Network commands Security commands RF interfacing commands Serial interfacing commands I/O settings commands Diagnostic commands Command mode options Sleep commands Execution commands XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 221: Addressing Commands

    Reads the 16-bit network address of the device. A value of 0xFFFE means the device has not joined a ZigBee network. Parameter range 0 - 0xFFFF [read-only] Default 0 - 0xFFFE MP (16-bit Parent Network Address) Parameter range 0 - 0xFFFE [read-only] Default 0xFFFE XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 222: Nc (Number Of Remaining Children)

    Set in the factory SL (Serial Number Low) Displays the lower 32 bits of the unique IEEE 64-bit RF extended address assigned to the XBee in the factory. The 64-bit source address is always enabled. This value is read-only and it never changes.
  • Page 223: Se (Source Endpoint)

    SE (Source Endpoint) 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 224: Np (Maximum Packet Payload Bytes)

    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 [read-only]...
  • Page 225: Network Commands

    A value of 0 means the device has not joined a PAN and is not operating on any channel. Parameter range 0, 0x0B - 0x1A (XBee) 0, 0x0B - 0x19 (XBee-PRO, Channels 11-25) Default [read-only] CE (Coordinator Enable) Sets or reads whether the device is a coordinator.
  • Page 226: Op (Operating Extended Pan Id)

    ND (Node Discover) command. When you issue the ND command, the transmission includes the NT value to provide all remote devices with a response timeout. Remote devices wait a random time, less than NT, before sending their response. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 227: No (Network Discovery Options)

    Indicator (0x95) frame. Parameter range 0 - 0x03 (bit field) Bit field Option Description Append the DD (Digi Device Identifier) value to ND responses or API node identification 0x01 frames. Local device sends ND response frame when the ND is issued. 0x02...
  • Page 228: Sd (Scan Duration)

    ([# of channels to scan] * (2 ^SD) * 15.36 ms) + (38 ms * [# of channels to scan]) + 20 ms Use the SC (Scan Channels) command to set the number of channels to scan. The XBee can scan up to 16 channels (SC = 0xFFFF).
  • Page 229: Zs (Zigbee Stack Profile)

    Effective with release 4x5E, changing ZS to a different value causes all current parameters to be written to persistent storage. While the stack profile is changing, CTS is de-asserted to prevent serial input. We recommend CTS flow control. Parameter range 0 - 2 Default XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 230: Nj (Node Join Time)

    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. We recommend you disable this feature for large networks to prevent excessive broadcasts. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 231: Ar (Aggregate Routing Notification)

    (ZigBee) Send the network key in the clear (unencrypted) over- the-air during a join 0x02 (Smart Energy) Enable as a trust center (Coordinator only) 0x08 (Smart Energy) Authenticate during joining (End Device and Router only) XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 232: Nk (Network Encryption Key)

    3.3 V. If the input voltage is too high, the device resets. For XBee, PL = 4, PM = 1 is tested at the time of manufacturing. Other power levels are approximate. On channel 26, transmitter power will not exceed +3 dBm output.
  • Page 233: Pm (Power Mode)

    Set or read the power mode of the device. Enabling boost mode improves the receive sensitivity by 2dB and increase the transmit power by 3dB. This command is disabled on the XBee-PRO and is forced on by the software to provide extra sensitivity. Boost mode imposes a slight increase in current draw.
  • Page 234: Pp (Peak Power)

    -dBm. For example, if DB returns 0x50, then the RSSI of the last packet received was -80 dBm. Parameter range 0 - 0xFF Observed ranges: XBee-PRO - 0x1A - 0x58 XBee- 0x 1A - 0x5C Default PP (Peak Power) Reads the dBm output when you select maximum power (PL4).
  • Page 235: Bd (Interface Data Rate)

    Parameter range Value Description 2,400 b/s 4,800 b/s 9,600 b/s 19,200 b/s 38,400 b/s 57,600 b/s 115,200 b/s 230,400 b/s 460,800 b/s 921,600 b/s 0 - 0x0A Parameter Description 1200 b/s 2400 b/s 4800 b/s XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 236: Nb (Parity)

    Mark parity Default 0x00 SB (Stop Bits) Sets or reads the number of stop bits for UART communications. Parameter range 0x00 - 0x01 Parameter Configuration 0x00 One stop bit 0x01 Two stop bits Default 0x00 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 237: Ro (Packetization Timeout)

    RS-485 Tx enable high, high Tx Default D6 (DIO6/RTS) Sets or displays the DIO6/RTS pin configuration (TH pin 16/SMT pin 29). Parameter range 0, 1, 3 - 5 Parameter Description Unmonitored digital input RTS flow control Digital input XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 238: I/O Settings Commands

    I/O, you can use the IC command to force an immediate I/O sample transmission when the DIO state changes. IC is a bitmask that you can use to enable or disable edge detection on individual channels. Set unused bits to 0. I/O line DIO0 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 239: P0 (Rssi/Pwm0 Configuration)

    0, 1, 3 - 5 Parameter Description Unmonitored digital input RSSI PWM0 Digital input, monitored Digital output, default low Digital output, default high Default P1 (DIO11/PWM1 Configuration) Set the configure options for the device's DIO11 line. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 240: P2 (Dio12 Configuration)

    Digital output, default high Default P3 (DIO13/DOUT Configuration) Set or read the configuration options for the DIO13 line of the RF module. Parameter range 0, 1, 3 - 5 Parameter Description Unmonitored digital input Data out for UART XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 241: P4 (Dio14/Din)

    The DIO15/SPI_MISO pin configuration (pin 17). This only applies to surface-mount devices. Parameter range 0, 1 Parameter Description Unmonitored digital input Output from SPI port Default P6 (SPI_MOSI Configuration) The DIO16/SPI_MOSI pin configuration (pin 16). This only applies to surface-mount devices. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 242 The DIO18/SPI_SCLK pin configuration (TH pin 18/SMT pin 14). This only applies to surface-mount devices. Parameter range 0, 1 Parameter Description Unmonitored digital input SPI clock input Default P9 (DIO19/SPI_ATTN/PTI_DATA) Sets or read the function for DIO19. This only applies to surface-mount devices. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 243: D0 (Ad0/Dio0 Configuration)

    Digital output, high Default D1 (AD1/DIO1/PTI_En Configuration) Set or read the function for the AD1/DIO1/PTI_En configuration. Parameter range 0 - 6 Parameter Description Unmonitored digital input SPI_ATTN - Analog input, single ended for the through-hole device XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 244: D2 (Ad2/Dio2 Configuration)

    SPI_CLK for through-hole devices Analog input, single ended Digital input Digital output, low Digital output, high Default D3 (AD3/DIO3 Configuration) Select or read the function for AD3/ DIO3. Parameter range 0 - 5 Parameter Description Unmonitored digital input XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 245: D4 (Dio4 Configuration)

    Configure options for the DIO5 line of the device. Parameter range 0, 1, 3 - 5 Parameter Description Unmonitored digital input Associate LED indicator - blinks when associated Digital input Digital output, default low Digital output, default high XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 246: D8 (Dio8/Dtr/Slp_Rq)

    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. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 247: Pr (Pull-Up/Down Resistor Enable)

    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 PWM1/DIO11 8/SMT, 7/TH CTS/DIO7 25/SMT, 12/TH DOUT/DIO13 3/SMT, 2/TH Parameter range 0 - 0x7FFF (bit field) Default 0x1FFF XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 248: Pd (Pull Up/Down Direction)

    Network Leave Request Not Allowed. Indicates if a router node discards or accepts network leave commands. Reserved Reserved Verbose Joining Mode. See Extended Modem Status frame - 0x98 for a full description. Parameter range 0-0xFFFF Default 0x00 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 249: Do (Device Options)

    Channel Mask. Set V+ to 0 by default (do not include the supply voltage). The units of this command are mV. For example, to include a measurement of the supply voltage when it falls below 2.7 V, set V+ to 2700 = 0xA8A. Parameter range 0 - 0xFFFF XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 250: Tp (Temperature)

    The upper byte returns a value that is unique to each device type. The lower byte indicates the hardware revision. Note The XBee returns a value of 0x22xx for this command. The XBee-PRO returns a value of 0x21xx. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 251: Ai (Association Indication)

    Applications should read AI until it returns 0x00, indicating a successful startup (coordinator) or join (routers and end devices). Parameter range 0 - 0xFF [read-only] Default Command mode options The following commands are Command mode option commands. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 252: Ct (Command Mode Timeout)

    (GT + CC + GT). The Command mode sequence enters the device into Command mode. For more information about Command mode sequence, see Command mode options. Parameter range 0 - 0xFF Default 0x2B (the ASCII plus character: +) Sleep commands The following AT commands are sleep commands. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 253: Sm (Sleep Mode)

    Set the value to at least equal to the longest SP time of any child end device. Parameter range 0x20 - 0xAF0 x 10ms (Quarter second resolution) Default 0x20 XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 254: St (Time Before Sleep)

    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. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 255: Execution Commands

    Scans the neighborhood for beacon responses. The AS command is only valid as a local command. Response frames are structured as: AS_type – unsigned byte = 2 - ZB firmware uses a different format than XBee Wi-Fi , which is type 1 Channel – unsigned byte PAN –...
  • Page 256: Re (Restore Defaults)

    If NR = 1: Sends broadcast transmission to reset network layer parameters on all nodes in the PAN. Note NR and NR0 both perform the same function and may be used interchangeably. Parameter range 0 - 1 Default XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 257: Si (Sleep Immediately)

    If you send ND through a local API frame, the device returns each response as a separate AT_CMD_ Response packet. The data consists of the above listed bytes without the carriage return delimiters. The NI string end in a “0x00” null character. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 258: Dn (Destination Node)

    ERROR, the device does not exit command mode. Set the radius of the DN command using the BH command. Parameter range Up to 20-Byte printable ASCII string Default IS (Force Sample) Forces a read of all enabled digital and analog input lines. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 259 AT commands Execution commands Parameter range Default XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 260: 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. XCTU configuration tool XBee Bootloader Programming XBee modules Writing custom firmware...
  • Page 261: Xctu Configuration Tool

    Firmware on the XBee/XBee-PRO ZigBee RF Module can be updated serially. Serial firmware updates Serial firmware updates use the XBee custom bootloader which ships in all units. This bootloader is based on Ember's standalone bootloader, but with a modified entry mechanism. The modified entry...
  • Page 262: Invoke The Xbee Bootloader

    A file error or a flash error occurs during the firmware load. 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 263: Enable Gpio 1 And 2

    For more information on configuring and setting GPIOs, consult the EM357 specification. 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.
  • Page 264: Special Instructions For Using The Jtag Interface

    ModuleIsXBeePro = false; Special instructions for using the JTAG interface There are four JTAG programming pins on the XBee/XBee-PRO ZigBee RF Module through which firmware can be loaded onto the EM357 processor. Three of these pins are also connected to a second pin on the device and are used for separate functions.
  • Page 265: Regulatory Information

    Regulatory information United States (FCC) Europe (CE) IC (Industry Canada) Australia (RCM) ANATEL (Brazil) South Korea XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 266: United States (Fcc)

    United States (FCC) United States (FCC) The 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 267: Fcc Notices

    FCC notices IMPORTANT: The XBee/XBee-PRO ZigBee RF Modules have been certified by the FCC for use with other products without any further certification (as per FCC section 2.1091). Modifications not expressly approved by Digi could void the user's authority to operate the equipment.
  • Page 268: Fcc-Approved Antennas (2.4 Ghz)

    United States (FCC) FCC-approved antennas (2.4 GHz) The XBee/XBee-PRO ZigBee RF Modules can be installed using antennas and cables constructed with non-standard connectors (RPSMA, RPTNC, etc.) An adapter cable may be necessary to attach the XBee connector to the antenna connector.
  • Page 269 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. Minimum cable loss/power...
  • Page 270 Minimum cable loss/power reduction/attenuation required Type Gain Min. (description) Part number (dBi) Application* separation Channels 11-25 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 271 Minimum cable loss/power reduction/attenuation required Type Gain Min. (description) Part number (dBi) Application* separation Channels 11-25 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 272 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 273 Required antenna cable loss (dB) Gain Min. Channels 11- Part number Type (description) (dBi) Application* separation Channel 26 A24-F8NF Omni-directional (Fiberglass base station) Fixed 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...
  • Page 274 Required antenna cable loss (dB) Gain Min. Channels 11- Part number Type (description) (dBi) Application* separation Channel 26 A24-Y10NF Yagi (10-element) 11.0 Fixed 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...
  • Page 275 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 276 Required antenna cable loss (dB) Gain Channels 11- (dBi) Part number Type (description) Application* separation Channel 26 A24-F8NF Omni-directional (Fiberglass base station) Fixed 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...
  • Page 277 Required antenna cable loss (dB) Gain Channels 11- (dBi) Part number Type (description) Application* separation Channel 26 A24-Y10NF Yagi (10-element) 11.0 Fixed 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)
  • Page 278 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 279 Required antenna cable loss (dB) Gain Min. Channels 11- Part number Type (description) (dBi) Application* separation Channel 26 A24-F8NF Omni-directional (Fiberglass base station) Fixed 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...
  • Page 280 Required antenna cable loss (dB) Gain Min. Channels 11- Part number Type (description) (dBi) Application* separation Channel 26 A24-Y10NF Yagi (10-element) 11.0 dBi Fixed 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...
  • Page 281 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 or Required cable-loss...
  • Page 282 Required cable-loss or Required cable-loss Required cable-loss power reduction from or power reduction or power reduction Gain Min. +8 dBm channels 11 to from +8 dBm from +1 dBm channel Application Part number Type (description) (dBi) separation channel 25 A24-F3NF Omni-directional Fixed/Mobile 20 cm (Fiberglass base station)
  • Page 283 Required cable-loss or Required cable-loss Required cable-loss power reduction from or power reduction or power reduction Gain Min. +8 dBm channels 11 to from +8 dBm from +1 dBm channel Application Part number Type (description) (dBi) separation channel 25 Dipole Antennas A24-HASM- Dipole (Half-wave Fixed/Mobile 20 cm...
  • Page 284: Associated Antenna Descriptions

    1.25 dB RF exposure If you are an integrating the XBee into another product, you must include the following Caution statement in OEM product manuals to alert users of FCC RF exposure compliance: CAUTION! To satisfy FCC RF exposure requirements for mobile transmitting devices, a separation distance of 25 cm or more should be maintained between the antenna of this device and persons during device operation.
  • Page 285: Oem Labeling Requirements

    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...
  • Page 286: Ic (Industry Canada)

    Unintentional Radiators. ICES-003 is the same as FCC Part 15 Sub. B and Industry Canada accepts FCC test report or CISPR 22 test report for compliance with ICES-003. Note Legacy XBee-PRO SMT (Model: PRO S2C; hardware version 21xx) has IC: 1846A-XBPS2C. For XBee ZB through-hole: Contains Model S2CTH Radio, IC: 1846A-S2CTH The integrator is responsible for its product to comply with IC ICES-003 &...
  • Page 287: Detachable Antenna

    (or lesser) gain approved for the transmitter by Industry Canada. To reduce potential radio interference to other users, the antenna type and its gain should be so chosen that the equivalent isotropically radiated power (EIRP) is not more than that necessary for successful communication. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 288: Australia (Rcm)

    Australia (RCM) Only XBee S2C and XBee-PRO S2C modules comply with requirements to be used in end products in Australia and New Zealand. All products with EMC and radio communications must have registered RCM and R-NZ marks. Registration to use the compliance mark will only be accepted from Australia or New Zealand manufacturers or importers, or their agents.
  • Page 289 Regulatory information ANATEL (Brazil) XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 290 Regulatory information ANATEL (Brazil) XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 291: South Korea

    South Korea 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.
  • Page 292 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 293 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: XBee/XBee-PRO®...
  • Page 294 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...
  • Page 295: 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 296: Pin Mapping

    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 #...
  • Page 297: Mounting

    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 298 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 299: Manufacturing Information

    Manufacturing information Manufacturing information The surface-mount XBee/XBee-PRO ZigBee RF Module is designed for surface-mount on the OEM PCB. It has castellated pads to allow for easy solder attach inspection. The pads are all located on the edge of the device so there are no hidden solder joints on these devices.
  • Page 300: Recommended Solder Reflow Cycle

    Hand soldering is possible and should be done in accordance with approved standards. The XBee/XBee-PRO ZB RF Modules are level 3 Moisture Sensitive Devices. When using this kind of device, consider the relative requirements in accordance with standard IPC/JEDEC J-STD-020.
  • Page 301 RF test points on the bottom of the device as shown in the following diagram. These devices have a ground plane in the middle on the back side for shielding purposes, which can be affected by copper traces directly below the device. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 302: 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 303: Load Zigbee Firmware On 802.15.4 Devices

    Load ZigBee firmware on 802.15.4 devices Background Load ZB firmware XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 304: Background

    Our XBee/XBee-PRO 802.15.4 RF modules are built on the same hardware as the XBee/XBee-PRO S2C ZB RF Modules. It is possible to load ZigBee firmware on existing 802.15.4 modules. The “XBee/XBee- PRO S2C 802.15.4 part numbers” table shows which part numbers are compatible with ZigBee firmware.
  • Page 305: Load Zb 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: http://www.digi.com/products/xbee-rf-solutions/xctu-software/xctu...
  • Page 306: Zigbee Node Types

    Several routers can operate in one PAN Can route data packets to/from other nodes Can be a data packet source and destination Mains-powered Refer to ZigBee router operation for more information. XBee/XBee-PRO® S2C ZigBee® RF Module...
  • Page 307: Zigbee Protocol

    The ZigBee stack provides a layer of network functionality on top of the 802.15.4 specification. For example, the mesh and routing capabilities available to ZigBee solutions are absent in the 802.15.4 protocol. XBee/XBee-PRO® S2C ZigBee® RF Module...

This manual is also suitable for:

Xbee-pro

Table of Contents