Digi XBee-PRO User Manual

Digi XBee-PRO User Manual

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

Advertisement

Quick Links

XBee/XBee-PRO ZigBee RF Module
User Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Digi XBee-PRO

  • Page 1 XBee/XBee-PRO ZigBee RF Module User Guide...
  • Page 2 0x98 frame. Added another ANATEL label. Trademarks and copyright Digi, Digi International, and the Digi logo are trademarks or registered trademarks in the United States and other countries worldwide. All other trademarks mentioned in this document are the property of their respective owners.
  • Page 3 Applicable firmware and hardware Hardware: S2C Firmware: 401x, 402x, 403x, 404x, 405x Hardware: S2D Firmware: 705x XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 4: Table Of Contents

    PAN ID ..................XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 5 Addressing ..................XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 6 Example 2: forming a network with security (obtaining keys during joining) ......XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 7 PWM1 ..................XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 8 Design considerations for Digi drop-in networking ........
  • Page 9 Detecting XBee versus XBee-PRO ........
  • Page 10: Overview Of The Xbee Zigbee Rf Module

    Overview of the XBee ZigBee RF Module This manual describes the operation of the XBee/XBee-PRO ZB RF module, which consists of ZigBee firmware loaded onto XBee S2C and PRO S2C hardware. XBee® and XBee-PRO® ZB embedded RF modules provide wireless connectivity to end-point devices in ZigBee mesh networks.
  • Page 11: Specifications

    Up to 4000 ft. (1200 m) Up to 2 miles (3200 m) Transmit Power Output 6.3mW (+8dBm), Boost mode 63mW (+18 dBm) (maximum) 3.1mW (+5dBm), Normal mode Channel 26 max power is +3dBm RF Data Rate 250,000 b/s XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 12 15 Direct Sequence Channels Interface Immunity DSSS (Direct Sequence Spread Spectrum) Channels 11 to 26 Addressing Options PAN ID and Addresses, Cluster IDs and Endpoints (optional) Interface Options UART 1 Mb/s maximum (burst) 5 Mb/s maximum (burst) XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 13: Agency Approvals

    Serial communications specifications Agency approvals The following table provides the agency approvals for the module. Note Legacy XBee-PRO SMT (model: PRO S2C; hardware version 21xx) has different FCC and IC IDs; see Agency certifications on page 212. XBee XBee-PRO XBee...
  • Page 14: Spi

    Output source/sink current for pad numbers 7, 8, 24, 31, and 33 on the SMT modules 8 mA Output source/sink current for pin numbers 6, 7, 11, 18, and 20 on the TH modules 8 mA Total output current (for GPIO pads) 40 mA XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 15: Hardware Specifications For The Programmable Variant

    VREF Range 1.8VDC to VCC Mechanical drawings The following mechanical drawings of the XBee/XBee-PRO ZB RF Modules show all dimensions in inches. The first drawing shows the SMT model (antenna options not shown). The drawings below show the XBee TH module.
  • Page 16 Mechanical drawings XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 17: Pin Signals For The Surface Mount Module

    Pin signals for the surface mount module The drawings below show the XBee-PRO TH model. Pin signals for the surface mount module Pin # Name Direction Default State Description Ground Power Supply DOUT / DIO13 Both Output UART Data Out / GPIO...
  • Page 18 AD1 / DIO1 Both Disabled Analog Input / GPIO AD0 / DIO0 Both Input Analog Input / GPIO / Commissioning Button [reserved] Disabled Do Not Connect Ground Both RF IO for RF Pad Variant XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 19: Pin Signals For The Through-Hole Module

    Analog Input / GPIO / SPI Clock AD1 / DIO1 / SPI_ATTN Both Disabled Analog Input / GPIO / SPI Attention AD0 / DIO0 / CB Both Disabled Analog Input / GPIO / Commissioning Button XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 20: Em357 Pin Mappings

    JTAG (see Writing Custom Firmware section) PC4 / JTMS / SWDIO JTAG (see Writing Custom Firmware section) PC1 / ADC3 PB7 / ADC2 PB6 / ADC1 PB5 / ADC0 Temperature sensor on PRO version XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 21: Design Notes

    The choice of antenna and antenna location is very important for correct performance. With the exception of the RF Pad variant, XBees do not require additional ground planes on the host PCB. In general, antenna elements XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 22 PCB antenna modules. It should be noted that for optimal performance, this module should not be mounted 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 ZigBee RF Modules User Guide...
  • Page 23 Design notes SMT keepout area XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 24 Design notes TH keepout area XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 25 Implementing these design suggestions will help ensure that the RF Pad module performs to its specifications. The following illustration shows PCB layer 1 of an example RF layout. The following illustration shows PCB layer 2 of an example RF layout. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 26: Module Operation For The Programmable Variant

    Digi provides a bootloader that can take care of programming the processor over the air or through the serial interface. This means that over the air updates can be supported through an XMODEM protocol. The processor can also be programmed and debugged through a one wire interface BKGD (Pin 9/SMT, Pin 8/TH).
  • Page 27 Module operation for the programmable variant The following figure shows the programmable connections for the SMT. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 28 Module operation for the programmable variant The following illustration shows the programmable connections for the TH Module. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 29: Xbee Programmable Bootloader

    To prevent unexpected halting of the application, the application shall clear or decrement BLResetCause just before a pending reset. To disable this feature, the application shall clear BLResetCause at the start of the application. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 30 100 bytes including the terminating NULL character. During an update the bootloader erases the entire application from 0x8400 on. The XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 31 This will inform the linker that the interrupt function “vSci1Rx()” should be placed at address 0x0000F1E0. Next, the developer should add a file to their project “vector_table.c” that creates an array of function pointers to the ISR routines used by the application. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 32 /* Int.no. 31 Vreset (at F1FE) Reset vector */ void vDummyIsr(void){ for(;;){ if(iWriteToSci1("STUCK IN UNASSIGNED ISR\n\r>")); The interrupt routines themselves can be defined in separate files. The "vDummyIsr" function is used in conjunction with “iWritetoSci1” for debugging purposes. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 33: Bootloader Menu Commands

    UART has an auto baud feature added to detect if the UART is at the wrong baud rate. If a single character is sent, it will automatically switch to 115200 or 9600 baud. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 34: Firmware Updates

    Xmodem CRC transfer. Using XCTU or another terminal program, select “XMODEM” file transfer. Select the Binary file to upload/transfer. Click Send to start the transfer. At the con-conclusion of a successful transfer, the bootloader will jump to the newly loaded application. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 35: Output File Configuration

    “BIN” outputs. Often times, the “BIN” file conversion will pad the addresses from 0x0000 to the code space with the same number. (Often 0x00 or 0xFF) These extra bytes before the APP code starts will need to be deleted from the bin file before the file can be transferred to the bootloader. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 36: Module Operation

    RS-232 or USB interface board), or through a Serial Peripheral Interface, which is a synchronous interface to be described later. Two Wire serial Interface (TWI) is also available, but not supported by Digi. For information on the TWI, see the EM357 specification.
  • Page 37: Spi Communications

    • Data/clock rates of up to 5 Mb/s are possible • Data is MSB first • Frame format mode 0 is used (see below) The following illustration shows the frame format for SPI communications. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 38: Serial Buffers

    The serial transmit buffer collects data that is received via the RF link that will be transmitted out the UART or SPI port. The following figure shows an internal data flow diagram. Serial RF TX Receiver Transmitter Buffer Buffer RF Switch Antenna Processor Port RF RX Serial Transmit DOUT Receiver Buffer Buffer XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 39: Uart Flow Control

    If an RF data packet is received, and the serial transmit buffer does not have enough space for all of the data bytes, the entire RF data packet will be discarded. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 40: Break Control

    The module will send data frames to the application containing status packets; as well as source, and payload information from received data packets. The API operation option facilitates many operations such as the examples cited below: XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 41 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 ZigBee RF Modules User Guide...
  • Page 42: Modes Of Operation

    The data will be transmitted once a route is established. If route discovery fails to establish a route, the packet will be discarded. The following figure shows the Transmit Mode sequence. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 43: Receive Mode

    Send the 3-character command sequence “+++” and observe guard times before and after the command characters. [Refer to the “Default AT Command Mode Sequence” below.] Default AT Command Mode Sequence (for transition to Command Mode): XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 44 Changes can be applied in one of the following ways: • The AC (Apply Changes) command is issued. • AT command mode is exited. To exit AT Command Mode: 1. Send the ATCN (Exit Command Mode) command (followed by a carriage return). XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 45: Sleep Mode

    Sleep modes allow the RF module to enter states of low power consumption when not in use. XBee RF modules support both pin sleep (sleep mode entered on pin transition) and cyclic sleep (module sleeps for a fixed time). XBee sleep modes are discussed in detail in Managing End Devices on page 116. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 46: Zigbee Networks

    The ZigBee stack consists of several layers including the PHY, MAC, Network, Application Support Sublayer (APS), and ZigBee Device Objects (ZDO) layers. Technically, an Application Framework (AF) layer also exists, but will be grouped with the APS layer in remaining discussions. The ZigBee layers are shown in the figure below. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 47: Zigbee Networking Concepts

    Must always transmit and receive RF data through its parent, and cannot route data • Can enter low power modes to conserve power and can be battery-powered An example of such a network is shown below: XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 48: Pan Id

    (PAN ID). This identifier is common among all devices of the same network. ZigBee devices are either preconfigured with a PAN ID to join, or they can discover nearby networks and select a PAN ID to join. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 49: Operating Channel

    ZigBee stack that are not required in many cases. Skip this section if • The XBee does not need to interoperate or talk to non-Digi ZigBee devices • The XBee simply needs to send data between devices Read this section if •...
  • Page 50: Application Profiles

    Alliance has defined a ZigBee Cluster Library (ZCL) that contains definitions or various general use clusters that could be implemented in any profile. XBee modules implement various clusters in the Digi private profile. In addition, the API can be used to send or receive messages on any cluster ID (and profile ID or endpoint). See Explicit Addressing ZigBee Command frame on page 149 for details.
  • Page 51: Zigbee Coordinator Operation

    Security policy The security policy determines which devices are allowed to join the network, and which device(s) can authenticate joining devices. See ZigBee Security on page 92 for a detailed discussion of various security policies. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 52: Persistent Data

    • 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 ZigBee RF Modules User Guide...
  • Page 53: Permit Joining

    Leaving a network There are a couple of mechanisms that will cause the coordinator to leave its current PAN and start a new network based on its network formation parameter values. These include the following: XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 54: Replacing A Coordinator (Security Disabled Only)

    Set the scan channels bitmask to enable the read operating channel (CH command). For example, if the operating channel is 0x0B, set SC to 0x0001. If the operating channel is 0x17, set SC to 0x1000. Set the stack profile to match the read ZS value. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 55: Example: Starting A Coordinator

    The router evaluates each beacon received on the channel to determine if a valid PAN is found. A router considers a PAN to be valid if the PAN: • Has a valid 64-bit PAN ID (PAN ID matches ID if ID > 0) XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 56: Joining A Network

    The DJ command can be set to 1 to disable joining. The DJ parameter cannot be written with WR, so a power cycle always clears the DJ setting. The following commands control the router joining process. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 57: Permit Joining

    Sets the Associate LED blink time when joined. Default is 2 blinks per second (router). Permit joining The permit joining attribute on the router is configurable with the NJ command. NJ can be configured to always allow joining, or to allow joining for a short time. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 58: Joining Always Enabled

    • RF data received from the coordinator • RF data sent to the coordinator and an acknowledgment was received • Many-to-one route request was received (from any device) • Changing the value of NW XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 59: Leaving A Network

    Issue the NR0 command to cause the router to leave. • Issue the NR1 command to send a broadcast transmission, causing all devices in the network to leave and migrate to a different channel XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 60: Network Locator Option

    Similar to routers, end devices must also discover and join a valid ZigBee network before they can participate in a network. After an end device has joined a network, it can communicate with other devices on the network. Since XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 61: Discovering Zigbee Networks

    If a router or coordinator has at least one unused entry in its child table, the device is said to have end device capacity. In other words, it can allow one or more XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 62: Authentication

    The DJ command can be set to 1 to disable joining. The DJ parameter cannot be written with WR, so a power cycle always clears the DJ setting. Similar to a router, the following commands control the end device joining process. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 63: Parent Connectivity

    If the end device does not receive an acknowledgment for 3 consecutive poll requests, it considers itself disconnected from its parent and will attempt to discover and join a valid ZigBee network. See Managing End Devices on page 116 for details. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 64: Resetting The End Device

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

    In the XBee firmware, joining is disabled by setting the NJ command to a value less than 0xFF on all routers and coordinator devices. Joining can be enabled for a short time using the commissioning push-button (see Network commissioning and diagnostics on page 100 for details) or the CB command. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 66: Application Messaging

    If the application does not receive the expected response message after joining, the application could force the XBee to leave and continue scanning (see the NR parameter). XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 67: Transmission, Addressing, And Routing

    49). Application layer addressing allows data transmissions to be addressed to specific profile IDs, cluster IDs, and endpoints. Application layer addressing is useful if an application must • Interoperate with other ZigBee devices outside of the Digi application profile XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 68: Data Transmission

    Each node that transmits the broadcast will also create an entry in a local broadcast transmission table. This entry is used to keep track of each received broadcast packet to ensure the packets are not endlessly transmitted. Each entry persists for 8 seconds. The broadcast transmission table holds 8 entries. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 69: Unicast Transmissions

    16-bit address is unknown (0xFFFE), address discovery will be attempted and the modem status message will show a delivery status code of 0x24 (address not found) and a discovery status code of 0x01 (address discovery was attempted). XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 70 The application should always update the 16-bit address in the address table when one of these frames is received to ensure the table has the most recently known 16-bit address. If a transmission failure occurs, the application should set the 16-bit address in the table to 0xFFFE (unknown). XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 71: Binding Transmissions

    RF transmissions and reassembled by the receiver before sending data out its serial port. This is shown in the image below. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 72: Data Transmission Examples

    Suppose the coordinator's address is 0x0013A200404A2244. 1. Enter command mode ('+++') 2. After receiving an OK\r, issue the following commands: 3. ATDH13A200\r a. ATDL404A2244\ b. ATCN\r 4. Verify that each of the three commands returned an OK\r response. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 73 If the explicit transmit frame is used, the cluster ID should be set to 0x0011, the profile ID to 0xC105, and the source and destination endpoints to 0xE8 (recommended defaults for data transmissions in the Digi profile.) The same transmission could be sent using the following explicit transmit frame: 7E 00 15 11 01 0000 0000 0000 0000 FFFE E8 E8 0011 C105 00 00 31 18 Notice the 16-bit address is set to 0xFFFE.
  • Page 74: Rf Packet Routing

    Note A network cannot revert from Many-to-One routing to AODV routing without first doing a network reset (NR). XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 75: Link Status Transmission

    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 ZigBee RF Modules User Guide...
  • Page 76 When the destination node receives a route request, it compares the ‘path cost’ field against previously received route request commands. If the path cost stored in the route request is better than any previously received, the XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 77: Many-To-One Routing

    The many-to-one broadcast is a route request message with the target discovery address set to the address of the data collector. Devices that receive this route request create a reverse many-to-one routing table entry to create XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 78: High/Low Ram Concentrator Mode

    16-bit address of each hop in the route. The data collector can store the routing information and retrieve it later to send a source routed packet to the remote. This is shown in the images below. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 79 There are several ways to force remotes to send route record transmissions. 1. If the application on remote devices periodically sends data to the data collector, each transmission will force a route record to occur. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 80 To send a source-routed packet to R3, the application must send 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: XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 81 If the originator fails to receive this Ack, it will retransmit the data, up to two times until an Ack is received. This Ack is called the ZigBee APS layer acknowledgment. Note Refer to the ZigBee specification for more details. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 82: Encrypted Transmissions

    This process adds some overhead latency to unicast transmissions, but it helps prevent replay attacks. See ZigBee Security on page 92 for details. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 83: Maximum Rf Payload Size

    • have an 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 ZigBee RF Modules User Guide...
  • Page 84: Throughput

    1 hop, RE, SE Not yet available 1 hop, ER, SD Not yet available 1 hop, ER, SE Not yet available 4 hops, RR, SD Not yet available 4 hops, RR, SE Not yet available XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 85: Latency Timing Specifications

    Response that includes the 16-bit address of a device. LQI Response 0x8031 Response that includes neighbor table data from a remote device. Routing Table Response 0x8032 Response that includes routing table entry data from a remote device. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 86: Sending A Zdo Command

    0x00 - Destination endpoint 0x0031 - Cluster ID (LQI Request, or Neighbor table request) 0x0000 - Profile ID (ZigBee Device Profile) 0x00 - Broadcast radius 0x00 - Tx Options 0x76 - Transaction sequence number XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 87 All multi-byte fields in the API payload of a ZDO command must have their data inserted in little endian byte order. Also recall that the AO command must be set correctly on an API device to enable the explicit API receive frames in order to receive the ZDO response. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 88: Transmission Timeouts

    RF data packet for up to (1.2 * SP) time. To ensure the end device has adequate time to wake and receive the data, the extended transmission timeout to an end device is: XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 89: Transmission Examples

    This transmission sends the string “TxData” to the coordinator, without knowing the coordinator device's 64-bit address. A 64-bit address of 0 is defined as the coordinator in ZB firmware. If the coordinator's 64-bit address was XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 90 0x01 - frame ID (set to a non-zero value to enable AT command response frames) 0x414F - ASCII representation of 'A','O' (the command being issued) 0x01 - Parameter value 0x65 - Checksum (0xFF - SUM (all bytes after length)) Description XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 91 Setting AO=1 is required for the XBee to use the explicit receive API frame (0x91) when RF data packets are received. This is required if the application needs indication of source or destination endpoint, cluster ID, and/or profile ID values used in received ZigBee data packets. ZDO messages can only be received if AO=1. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 92: Zigbee Security

    APS commands, and ZDO commands. Network encryption is not applied to MAC layer transmissions such as beacon transmissions, etc. If security is enabled in a network, all data packets will be encrypted with the network key. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 93: Frame Counter

    MIC allows receiving devices to ensure the message has not been changed. The MIC provides message integrity in the ZigBee security model. If a device receives a packet and the MIC does not match the device’s own hash of the data, the packet is dropped. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 94: Network Layer Encryption And Decryption

    MIC is different than the MIC appended by the network layer. The MIC allows the destination device to ensure the message has not been changed. If the destination device receives a packet and the MIC does not match the destination device’s own hash of the data, the packet is dropped. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 95: Aps Link Keys

    ZigBee packet when both are applied. Trust center ZigBee defines a trust center device that is responsible for authenticating devices that join the network. The trust center also manages link key distribution in the network. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 96: Forming And Joining A Secure Network

    In ZigBee, if EE and EO are set to 0x01, then the network key is sent in the clear (unencrypted) with the link key at association time. This may be a useful setting in development environments, but we discourage it for product deployment for security reasons. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 97: Setting The Aps Trust Center Link Key

    0. This approach will cause the coordinator to form a new network that the remaining devices should join. Resetting the network in this manner will bring the XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 98: Xbee Security Examples

    NK=0 d. KY=0 e. WR (save networking parameters to preserve them through power cycle) 2. Configure one or more routers or end devices with the following settings: a. ID=2235 b. EE=1 c. KY=0 XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 99 And since KY was set to 0 on all devices, the network key was sent unencrypted (“in the clear”) when the devices joined. This approach introduces a security vulnerability into the network and is not recommended. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 100: Network Commissioning And Diagnostics

    ID (0x12) on the data endpoint (0xE8). Any data sent to this cluster ID on the data endpoint will be transmitted back to the sender. This is shown in the figure below: XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 101: Rssi Indicators

    Device discovery Network discovery The network discovery command can be used to discover all Digi modules that have joined a network. Issuing the ND command sends a broadcast node discovery command throughout the network. All devices that receive the command will send a response that includes the device’s addressing information, node identifier string (see NI...
  • Page 102: Zdo Discovery

    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). The LQI Request can be used to read the devices in the neighbor table of a remote device, and the Network Update Request can be used to have a remote device do an active scan to discover all nearby ZigBee devices.
  • Page 103: Commissioning Pushbutton

    The associate pin can indicate the joined status of a device . Once the device has joined a network, the associate pin toggles state at a regular interval (∆t). The time can be set by using the LT command. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 104: 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 There are three binding request messages supported by the Digi XBee firmware: End Device Bind, Bind, and Unbind. End_Device_Bind_req The End Device Bind request (ZDO cluster 0x0020) is described in the ZigBee Specification.
  • Page 105 R2<-C Unbind_req R2->C Unbind-rsp (status code - SUCCESS) C proceeds to remove binding table entries from the two devices. R1<-C Unbind_req R1->C Unbind_rsp R2<-C Unbind_req R2->C Unbind_rsp C sends responses to the original End_Device_Bind_req messages. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 106 Commissioning Pushbutton and Associate LED 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: 7e002811010000000000000000fffe000000200000000001f2995cb5474000a21300e605c101010001020046 Same frame broken into labeled fields. Note the multibyte fields are represented in big-endian format.
  • Page 107: Group Table Api

    The design of the Group Table API of the XBee firmware is derived from the ZCL Group Cluster 0x0006. Developers should use the Explicit API frame 0x11 addressed to the Digi Device Object endpoint (0xE6) with the Digi XBee ProfileID (0xC105) to send commands and requests to the local device.
  • Page 108 UART buffer, then no Tx Status message would occur. ZigBee Tx Status API 0x8B FrameID 0x01 16DestAddr 0xFFFE Transmit Retries 0x00 Delivery Status 0x00 Discovery Status 0x00 Success XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 109 And here is the decoded second message, which is a Tx Status for the original command request. If the FrameId value in the original command request had been zero, or if no space was available in the transmit UART buffer, then no Tx Status message would occur. ZigBee Tx Status XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 110 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 XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 111 RF_Data 0x09EE02FF013412 The response in terms of Preamble, ZCL Header, and ZCL Payload: Preamble = “910013a2004047b55cfffee7e68006c10500” The packet has the endpoints reversed from the request, the clusterID is 0x8006 indicating a Group cluster response. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 112 The response in raw hex byte form, consisting of two packets: 7e0018910013a2004047b55cfffee7e68006c1050009ee0300341235 7e00078b01fffe00000076 The command response in decoded form: ZigBee Explicit Rx Indicator API 0x91 64DestAddr 0x0013A2004047B55C 16DestAddr 0xFFFE SrcEP 0xE7 DestEP 0xE6 ClusterID 0x8006 ProfileID 0xC105 Options 0x00 XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 113 No payload is needed for this command. The packet in raw hex byte form: 7e001711010013a2004047b55cfffee6e70006c105000001ee0417 The response in raw hex byte form, consisting of two packets: 7e0016910013a2004047b55cfffee7e68006c1050009ee04007c 7e00078b01fffe00000076 The command response in decoded form: ZigBee Explicit Rx Indicator XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 114 ZCL Header; unexpected command identifier code value in the ZCL header 0x82 EMBER_ZCL_STATUS_UNSUP_GENERAL_COMMAND: unexpected frametype in the Frame Control Field of the ZCL Header 0x84 EMBER_ZCL_STATUS_UNSUP_MANUF_GENERAL_COMMAND: unexpected manufacturer specific indication in the Frame Control Field of the ZCL Header XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 115 [6] View Group Response, section 3.6.2.3.2. [7] Get Group Membership Command, section 3.6.2.2.5. [8] Get Group Membership Response, section 3.6.2.3.3. [9] Remove Group Command, section 3.6.2.2.6. [10] Remove Group Response, section 3.6.2.3.4. [11] Remove All Groups Command, section 3.6.2.2.7. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 116: Managing End Devices

    If the end device receives the acknowledgment and finds that the parent has no data for it, the end device can return to idle mode or sleep. Otherwise, it will remain awake to receive the data. This polling mechanism allows the end XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 117: Parent Operation

    This allows the child table on a router or coordinator to better accommodate mobile end devices in the network. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 118: Packet Buffer Usage

    Otherwise, the end device will turn off the receiver and enter idle mode (until the next poll request is sent) to reduce current consumption (and improve battery life). XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 119: Pin Sleep

    (i.e. when scanning for a valid network completes). The module will wake from pin sleep when the Sleep_RQ pin is de-asserted (low). The following figure shows the XBee SMT pin sleep pins. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 120 When the XBee 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 for it. The end device will continue to send poll requests every 100ms while it is awake. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 121: Cyclic Sleep

    (D7 command), the CTS pin will assert (low) when the module wakes and can receive serial data, and de-assert (high) when the module sleeps. The following figure shows the XBee SMT cyclic sleep pins. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 122 ST command. While the module is awake, it will send poll request transmissions every 100ms to check its parent for buffered data messages. The module returns to sleep when the sleep timer expires, or if the SI command is sent to it. The following image shows this behavior. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 123 This mechanism allows the XBee to wake at regular intervals to poll its parent for data without waking an external device for an extended time (SP * SN time). This following figure shows this. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 124 Similar to short cyclic sleep, end devices running in this mode will return to sleep when the sleep timer expires, or when the SI command is received. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 125: Recommended Sleep Current Measurements

    • 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). • Each GPIO input line with a pullup resistor which is driven low draws about 100 uA current through the internal pullup resistor.
  • Page 126: Transmitting Rf Data

    In pin sleep mode, the end device polls every 100ms while the Sleep_RQ pin is de-asserted (low). In cyclic sleep mode, the end device will only poll once before returning to sleep unless the sleep timer (ST) XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 127: I/O Sampling

    (i.e. child table not full). The rejoin mechanism can be used to allow a device to join the same network even if permit-joining is disabled. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 128: Xbee Router/Coordinator Configuration

    RF data could be on the way. Therefore, the end device will poll at a faster rate, gradually decreasing its adaptive poll rate until polling resumes at the regular rate as defined by the PO command. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 129: Transmission Timeout

    Example 1: configure a device to sleep for 20 seconds, but set SN such that the On/sleep line will remain de-asserted for up to 1 minute. The following settings should be configured on the end device. SM = 4 (cyclic sleep) or 5 (cyclic sleep, pin wake) XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 130 It should also remain awake for a short time to allow devices to send data to it. The following are recommended settings. ST = 0x7D0 (2 second wake time) SO = 0x06 (enable extended sleep and wake for ST time) XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 131 This will ensure 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 ZigBee RF Modules User Guide...
  • Page 132: Analog And Digital I/O Lines

    0, 1 SPI_SSel/DIO17 0, 1 SPI_MOSI/DIO16 0, 1 SPI_MISO/DIO15 JTMS/SWDIO/DIO12/CD 0, 3-5 JTRst/DIO4 0, 3-5 CTS/DIO7 0, 1, 3-7 JTDO/On_SLP/DIO9 0, 1, 3-5 JTDI/Assoc/DIO5 0, 1, 3-5 RTS/DIO6/SClk2 0, 1, 3-5 AD3/DIO3 0, 2-5 XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 133: Xbee Zb Through-Hole Rf Module

    After issuing the configuration command, changes must be applied on the module for the I/O settings to take effect. Pin Command Parameter Description Disabled. (See below) Peripheral control Analog XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 134: I/O Sampling

    I/O samples will be discarded There are three ways to obtain I/O samples, either locally or remotely: • Queried Sampling • Periodic Sampling • Change Detection Sampling IO sample data is formatted as shown in the table below XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 135 Following the digital I/O data (if any), each enabled analog channel will return 2 bytes. The data starts with AIN0 and continues sequentially for each enabled analog input channel up to AIN3, and the supply voltage (if enabled) at the end. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 136: Queried Sampling

    64-bit address of the remote device (SH and SL). Only devices running in API mode can send I/O data samples out their serial port. Devices running in transparent mode will discard received I/O data samples. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 137: Change Detection Sampling

    Example 2: calculate the PWM counts for a packet received with an RSSI of -84dBm RSSI = -84 = 0xAC = 172 decimal (unsigned) PWM counts = (41 * 172) - 5928 PWM counts = 1124 XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 138: Pwm1

    32,787 Hz, which is a period of 30.5 s. The main purpose of the PWM output is to provide a clock for the PLUS processor, although it may also be used for other purposes. *When this feature is enabled, the RSSI PWM output is automatically disabled, even if it is configured. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 139: Api Operation

    Data Frame. Note that Digi may add new API frames to future versions of firmware, so build into your software interface the ability to filter out additional API frames with unknown Frame Types.
  • Page 140 The following figure shows the serial port data frame and API-specific structure: Start Delimiter Length Frame Data Checksum (Byte 1) (Bytes 2-3) (Bytes 4-n) (Byte n + 1) API-specific Structure 1 Byte 0x7E API Identifier Identifier-specific Data cmdID cmdData XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 141 To calculate: Not including frame delimiters and length, add all bytes keeping only the lowest 8 bits of the result and subtract the result from 0xFF. To verify: Add all bytes (include checksum, but not the delimiter and length). If the checksum is correct, the sum will equal 0xFF. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 142: Api Examples

    0x01 = Frame ID 0x0000000000000000 = Coordinator's address (can be replaced with coordinator's actual 64-bit address if known) 0xFFFE = 16- bit Destination Address 0x02 = Apply Changes (Remote Command Options) 0x4431 = AT command ('D1') XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 143: Api Serial Port Exchanges

    The following image shows the API frame exchanges that take place at the serial port when sending a remote AT command. A remote command response frame is not sent out the serial port if the remote device does not receive the remote command. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 144: Source Routing

    Applications that support the API should make provisions to deal with new API frames that may be introduced in future releases. For example, a section of code on a host microprocessor that handles received serial API frames (sent out the module's DOUT pin) might look like this: XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 145: Api Frames

    Identifies the serial port data frame for the host to correlate with a subsequent ACK (acknowledgment). If set to 0, no response is sent. AT Command 0x4E (N) Command Name - Two ASCII characters that identify the AT Command. 0x4A (J) XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 146: At Command - Queue Parameter Value

    115200 baud) Checksum 0x68 0xFF - the 8 bit sum of bytes from offset 3 to this byte. Note In this example, the parameter could have been sent as a zero-padded 2-byte or 4-byte value. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 147: Zigbee Transmit Request

    This example shows if escaping is disabled (AP=1). Frame Fields Offset Example Description Start Delimiter 0x7E Length MSB 1 0x00 Number of bytes between the length and the checksum LSB 2 0x16 Frame-specific Frame Type 0x10 Data XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 148 RF Data 0x54 Data that is sent to the destination device 0x78 0x44 0x61 0x74 0x61 0x30 0x41 Checksum 0x13 0xFF - the 8 bit sum of bytes from offset 3 to this byte. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 149: Explicit Addressing Zigbee Command Frame

    The maximum number of payload bytes can be read with the NP command. Note If source routing is used, the RF payload will be reduced by two bytes per intermediate hop in the source route. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 150 Profile ID used in the transmission 0x05 Broadcast 0x00 Sets the maximum number of hops a broadcast transmission can Radius traverse. If set to 0, the transmission radius will be set to the network maximum hops value. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 151 0xFF - the 8 bit sum of bytes from offset 3 to this byte. Example: Send a data transmission to the coordinator (64-bit address of 0x00s) using a source endpoint of 0xA0, destination endpoint 0xA1, cluster ID =0x1554, and profile ID 0xC105. Payload will be “TxData”. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 152: Remote At Command Request

    Setting the extended timeout bit causes the stack to set the extended transmission timeout for the destination address. See Transmission, addressing, and routing on page 67. All unused and unsupported bits must be set to 0. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 153: Create Source Route

    Set to the 64-bit address of the destination device. The following Destination addresses are also supported: 0x13 Address 0x0000000000000000 - Reserved 64-bit address for the coordinator 0xA2 Frame-specific 0x000000000000FFFF - Broadcast address Data 0x00 0x40 0x40 0x11 LSB 12 0x22 XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 154 16-bit addresses: B = 0xAABB C = 0xCCDD D = 0xEEFF The example above shows how to send the Create Source Route frame to establish a source route between A and XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 155: At Command Response

    0xFF - the 8 bit sum of bytes from offset 3 to this byte. Suppose the BD parameter is changed on the local device with a frame ID of 0x01. If successful (parameter was valid), the above response would be received. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 156: Modem Status

    0x80+ = Ember ZigBee stack error Checksum 0x6F 0xFF - the 8 bit sum of bytes from offset 3 to this byte. Note New modem status codes may be added in future firmware releases. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 157: Zigbee Transmit Status

    0xFF - the 8 bit sum of bytes from offset 3 to this byte. Suppose a unicast data transmission was sent to a destination device with a 16-bit address of 0x7D84. (The transmission could have been sent with the 16-bit address set to 0x7D84 or 0xFFFE.) XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 158: Zigbee Receive Packet

    Other possible values 0x00, 0x21, 0x22, 0x60, 0x61, 0x62. Received Data 0x52 Received RF data 0x78 Frame-specific 0x44 Data 0x61 0x74 0x61 Checksum 0x0D 0xFF - the 8 bit sum of bytes from offset 3 to this byte. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 159: Zigbee Explicit Rx Indicator

    64-bit address) if the sender's 64-bit address is unknown. Address 0x13 0xA2 0x00 Frame-specific 0x40 Data 0x52 0x2B LSB 11 0xAA 16-bit Source MSB 12 0x7D 16-bit address of sender. Network LSB 13 0x84 Address XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 160 “RxData”. Suppose the transmission was sent with source and destination endpoints of 0xE0, cluster ID=0x2211, and profile ID=0xC105. If AO=1 on the receiving device, it would send the above frame out its serial port. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 161: Zigbee Io Data Sample Rx Indicator

    > 0), these two bytes contain samples for all enabled digital IO 0x14 lines. DIO lines that do not have sampling enabled return 0. Bits in these 2 bytes map the same as they do in the Digital Channels Mask field. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 162 40522BAA and a 16-bit address of 0x7D84. If pin AD1/DIO1 is enabled as an analog input, AD2/DIO2 and DIO4 are enabled as a digital inputs (currently high), and AD3/DIO3 is enabled as a digital output (low) the IO sample is shown in the API example in the table above. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 163: Xbee Sensor Read Indicator

    API frames XBee Sensor Read Indicator Frame Type: 0x94 When the module 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). Frame Fields Offset Example Description...
  • Page 164 True Humidity = Relative Humidity / (1.0546 - (0.00216 * Temperature (°C))) Looking at the sample data, we have: Vsupply = (234 * 5.1 / 255) = 4.68 Voutput = (82 * 5.1 / 255) = 1.64 Temperature = (362 / 16) = 22.625°C XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 165: Node Identification Indicator

    Receive Options 14 0x02 0x01 - Packet Acknowledged 0x02 - Packet was a broadcast packet Source 16-bit 0x7D Set to the 16-bit network address of the remote. Set to 0xFFFE if unknown. address 0x84 XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 166 0xFF - the 8 bit sum of bytes from offset 3 to this byte. If the commissioning push button is pressed on a remote router device with 64-bit address 0x0013A200 40522BAA, 16-bit address 0x7D84, and default NI string, the following node identification indicator would be received. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 167: Remote Command Response

    Set to 0xFFFE if unknown. AT Commands 0x53 Name of the command 0x4C Command 0x00 0 = OK Status 1 = ERROR 2 = Invalid Command 3 = Invalid Parameter 4 = Remote Command Transmission Failed XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 168: Extended Modem Status

    Number of bytes between the length and the checksum LSB 1 0x03 Frame-specific Frame Type 0x98 Data Status Code 0x0B See below for status code descriptions. Status Data 0x03 The length of this field varies with the Status Code. Checksum 0x5C XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 169 0xC9 to 0x05 inclusive panid(2) 16 bit 4med' a network, or a Router/End Device has 'joined' a network. extendedPanId(8) 64 bit PAN Identifier for network XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 170 16 bit PAN Identifier for network (DO80) has found a matching network 0x09 Reject LQIRSSI JV/NW with search option (DO80) candidate rejected because this beacon response is weaker than an earlier beacon response. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 171 Rejected because it ast) matches the last associated network. 0x13 Rejected(cmdS Rejected because it ave) matches an already saved beacon response. 0x14 Reject strength During first/best phase, response is weaker than an already saved beacon response. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 172 Note that comments are interspersed with the trace messages to explain the content, and are preceded by an ellipsis “...”. +++OK atid3151 ...configured pan identifier has been changed atdc10 ...and verbose join enabled atac XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 173: Over-The-Air Firmware Update Status

    64-bit address 0x0013A200403E0750 and 16-bit address 0x0000, the following is the expected response. Frame Fields Offset Example Description Start Delimiter 0x7E Length MSB 1 0x00 Number of bytes between the length and the checksum LSB 2 0x16 XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 174 If a query request returns a 0x15 (NACK) status, the target is likely waiting for a firmware update image. If no messages are sent to it for about 75 seconds, the target will timeout and accept new query messages. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 175: Route Record Indicator

    0x02 - Packet was a broadcast. Number of 0x03 The number of addresses in the source route (excluding source Addresses and destination). Address 1 0xEE (neighbor of destination) 0xFF Address 2 0xCC Address of intermediate hop (closer hop 0xDD XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 176: Many-To-One Route Request Indicator

    The many-to-one route request indicator frame is sent out the serial port whenever a many-to-one route request is received Frame Fields Offset Example Description Start Delimiter 0x7E Length MSB 1 0x00 Number of bytes between the length and the checksum LSB 2 0x0C XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 177: Sending Zigbee Device Objects (Zdo) Commands With The Api

    See the “ZigBee Device Profile” section of the ZigBee Specification for details. ZDO Command Cluster ID 0x0000 Network Address Request 0x0001 IEEE Address Request 0x0002 Node Descriptor Request 0x0004 Simple Descriptor Request 0x0005 Active Endpoints Request XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 178 For an API XBee to receive ZDO responses, the AO command must be set to 1 to enable the explicit receive API frame. The following table shows how the Explicit API frame can be used to send an “Active Endpoints” request to discover the active endpoints on a device with a 16-bit address of 0x1234. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 179 LSB 18 0x05 0x0005 = Active Endpoints Request Profile ID MSB 19 0x00 Set to 0x0000 for ZDO transmissions (Profile ID 0x0000 is the ZigBee Device Profile that supports LSB 20 0x00 ZDOs). XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 180: Sending Zigbee Cluster Library (Zcl) Commands With The Api

    Thermostat (0x0201) -Setpoint raise / lower (0x00) Occupancy (0x0002) The ZCL defines a number of profile-wide commands that can be supported on any profile, also known as general commands. These commands include the following. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 181 64-bit address of 0x0013A200 40401234 (unknown 16-bit address). This example uses arbitrary source and destination endpoints. Recall the hardware version attribute (attribute ID 0x0003) is part of the basic cluster (cluster ID 0x0000). The Read Attribute general command ID is 0x00. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 182 Set to the cluster ID that corresponds to the ZCL command being sent. LSB 18 0x00 0x0000 = Basic Cluster Profile ID MSB 19 0xD1 Set to the profile ID supported on the device. (0xD123 arbitrarily selected). LSB 20 0x23 XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 183 0 - The command is being sent from the client side to the server side. Disable Default Response 0 - Default response not disabled Reserved Set to 0. See the ZigBee Cluster Library specification for details. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 184: Sending Public Profile Commands With The Api

    0x12 0x34 16-bit MSB 13 0x56 16-bit address of the destination device Destination (big endian byte order). Set to 0xFFFE for LSB 14 0x78 broadcast, or if the 16-bit address is Network unknown. Address XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 185 Since the frame control “frame type” bits are 01, this byte specifies a cluster-specific command. Command ID 0x00 in the Demand Response and Load Control cluster is a Load Control Event command. (See Smart Energy specification.) XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 186 Requested cooling set point in 0.01 Temperature degrees Celsius. 0x80 Set Point A value of 0x8000 means the set point field is not used in this event. Note the 0x80000 is sent in little endian byte order. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 187 0 - The manufacturer code field is omitted from the ZCL Frame Header. Direction 1 - The command is being sent from the server side to the client side. Disable Default Response 0 - Default response not disabled Reserved Set to 0. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 188: Command Reference Tables

    Serial Number High. Read the high 32 bits of the 0 - 0xFFFFFFFF factory-set module's unique 64-bit address. [read-only] Serial Number Low. Read the low 32 bits of the 0 - 0xFFFFFFFF factory-set module's unique 64-bit address. [read-only] XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 189 0x20 - Enable APS Encryption (if EE=1). Note that this decreases the maximum RF payload by 4 bytes below the value reported by NP. 0x40 - Use the extended timeout for this destination. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 190: Networking Commands

    0 - 0xFFFFFFFF 0xA0000 value can be used to differentiate different XBee-based devices. Digi reserves the range 0 - 0xFFFFFF. For the XBee ZB SMT module, the device type is 0xA0000. Conflict Report. The number of PAN id conflict reports...
  • Page 191 ND responses or API node identification frames. Options include: 0x01 = Append DD value (to ND responses or API node identification frames) 002 = Local device sends ND response frame when ND is issued. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 192 PL and PM configuration settings. For the XBee-PRO SMT module, Channel 26 is not allowed to transmit at more than 6 dBm. For the XBee-PRO TH module, Channel 26 is not allowed to transmit at more than 2 dBm.
  • Page 193 PAN. If JV=0, the router or end device will continue operating on its current channel even if a coordinator is not detected. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 194: Security Commands

    Setting KY to 0 will cause the coordinator to transmit the network key in the clear to joining devices, and will cause joining devices to acquire the network key in the clear when joining. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 195: Rf Interfacing Commands

    3dB disabled, 1= Boost mode enabled. Note: This command is disabled on the XBee-PRO. It is forced on by the software to provide the extra sensitivity. Boost mode imposes a slight increase in current draw. See section 1.2 for details.
  • Page 196: Serial Interfacing (I/O) Commands

    [x character times] packetization. Set (RO=0) to transmit characters as they arrive instead of buffering them into one RF packet The RO command is only supported when operating in transparent mode. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 197: I/O Commands

    7 (DIO7) 11 (DIO11) PWM0 Configuration. Select/Read function for PWM0. 0 = Unmonitored digital input 1 = RSSI PWM 3 - Digital input, monitored 4 - Digital output, default low 5 - Digital output, default high XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 198 DIO19 / SPI_Attn / PTI_DATA. Set/read function for DIO19. 0 – Unmonitored digital input 1 - SPI data available indicator 6 – Packet trace interface data output. Must be set along with D1=6 to output traces for OTA sniffing. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 199 4 – Digital output, low 5 – Digital output, high DIO4 Configuration. Select/Read function for DIO4. 0 – Unmonitored digital input 1 – SPI_MOSI* 3 – Digital input 4 – Digital output, low 5 – Digital output, high XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 200 11 - PWM0 / RSSI / DIO10 (Pin 7/SMT, Pin 6/TH) 12 - PWM1 / DIO11 (Pin 8/SMT, Pin 7/TH) 13 - CTS / DIO7 (Pin 25/SMT, Pin 12/TH) 14 - DOUT / DIO13 (Pin 3/SMT, Pin 2/TH) XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 201 Bit5 - Disable ACK for End Device I/O Sampling. Bit6 - Enable High Ram Concentrator. Bit7 - Enable ATNW to find new network before leaving the network. Supply Voltage. Reads the voltage on the Vcc pin in mV. -0x-0xFFFF [read only] XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 202: Diagnostics Commands

    Firmware Version. Read firmware version of the module as a 4-digit hex number. 0 - 0xFFFF [read- Factory- only] Version Long. Shows detailed version information, module type, a time stamp for the build, Ember stack version, and bootloader version. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 203: At Command Options

    The upper byte returns a value that is unique to each module type. The lower byte indicates the hardware revision. The regular XBee returns a value of 0x22xx for this command. the XBee-PRO returns a value of 0x21xx. Association Indication. Read information regarding last node join request:...
  • Page 204: Sleep Commands

    0. Sleep options include: 0x02 - Always wake for ST time 0x04 - Sleep entire SN * SP time Sleep options should not be used for most applications. See Managing End Devices on page 116. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 205: Execution Commands

    “OK\r” response is received. The WR command should be used sparingly. The EM357 supports a limited number of write cycles. Restore Defaults. While preserving KY and AI settings, restore the configuration to factory defaults. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 206 PermitDuration will be set to NJ. 4 - Restore configuration to default values and leave the network. &X Clear Binding and Group Tables. This command resets the binding and group tables. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 207 In the case of an ERROR, Command Mode is not exited. The radius of the DN command is set by the BH command. Force Sample. Forces a read of all enabled digital and analog input lines. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 208: Module Support

    Contact Digi to create a custom configuration. Design considerations for Digi drop-in networking XBee RF modules contain a variety of features that allow for interoperability with Digi's full line of Drop-in Networking products. Interoperability with other “DIN” products can offer these advantages: •...
  • Page 209: Xbee Bootloader

    4, 10, and 29 (DIN, DTR, and RTS respectively) on the SMT, and pins 3, 9, 16 on the TH. The XCTU program can update firmware serially on the XBee. Contact Digi support for details. If an application requires custom firmware to update the XBee firmware serially, the following steps are required.
  • Page 210: Writing Custom Firmware

    8 dBm with boost mode enabled on channels 11 through 25. On channel 26 you must reduce the power to 3 dBm. XBee-PRO modules are FCC certified for operation on all 16 channels. The XBee-PRO contains a power compensation method to adjust the output power near 18 dBm on channels 11 through 25. You must configure the EM357 with an output power such that the module outputs 18 dBm or less on channels 11 through 25.
  • Page 211: Detecting Xbee Versus Xbee-Pro

    For more information on configuring and setting GPIOs, consult the EM357 specification. Detecting XBee versus XBee-PRO For some applications, it may be necessary to determine if the code is running on an XBee or an XBee-PRO device. The PC7 pin on the EM357 is used to identify the module type (see Overview of the XBee ZigBee RF Module page 10).
  • Page 212: Agency Certifications

    (2.) this device must accept any interference received, including interference that may cause undesired operation. Required FCC Label for OEM products containing the XBee-PRO S2C SMT RF Module Contains FCC ID:MCQ-PS2CSM This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1.) this device may not cause harmful interference and (2.) this device must accept any interference received,...
  • Page 213: Fcc Notices

    FCC notices IMPORTANT: The XBee and XBee-PRO 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 214 Agency certifications The antennas in the tables below have been approved for use with this module. Cable loss is required when using gain antennas as shown in the tables. Digi does not carry all of these antenna variants. Contact Digi Sales for available antennas. The following table shows the antennas approved for use with the XBee ZB Surface Mount RF Module.
  • Page 215 4.0 dB A24-Y10NF Yagi (10-element) 11.0 dBi Fixed 5.0 dB A24-Y12NF Yagi (12-element) 12.0 dBi Fixed 6.0 dB A24-Y13NF Yagi (13-element) 12.0 dBi Fixed 6.0 dB A24-Y15NF Yagi (15-element) 12.5 dBi Fixed 6.5 dB XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 216 Dipole (Half-wave articulated bulkhead mount U.FL. w/ 5” pigtail) 2.1 dBi Fixed/Mobile 25 cm A24-HASM-525 Dipole (Half-wave articulated RPSMA - 5.25") 2.1 dBi Fixed 25 cm Omni-directional Antennas A24-F2NF Omni-directional (Fiberglass base station) 2.1 dBi Fixed/Mobile 25 cm XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 217 A24-P15NF Flat Panel 15.0 dBi Fixed 9.0 dB A24-P16NF Flat Panel 16.0 dBi Fixed 10.0 dB A24-P19NF Flat Panel 19.0 dBi Fixed 13.0 dB Yagi Antennas A24-Y6NF Yagi (6-element) 8.8 dBi Fixed 2.8 dB XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 218 A24-Y15NF Yagi (15-element) 12.5 dBi Fixed 6.5 dB A24-Y16NF Yagi (16-element) 13.5 dBi Fixed 7.5 dB A24-Y16RM Yagi (16-element, RPSMA connector) 13.5 dBi Fixed 7.5 dB A24-Y18NF Yagi (18-element) 15.0 dBi Fixed 9.0 dB XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 219 Agency certifications The following table shows antennas approved for use with the XBee-PRO ZB Surface Mount RF Module. Minimum Cable Loss/Power Reduction/Attenuation Required Part Number Type (Description) Gain Application* Separation Channels 11-25 Channel 26 Internal Antennas 29000313 Integral PCB antenna 0.0 dBi...
  • Page 220 7.9 dB A24-Y16NF Yagi (16-element) 13.5 dBi Fixed 7.1 dB 8.9 dB A24-Y16RM Yagi (16-element, RPSMA connector) 13.5 dBi Fixed 7.1 dB 8.9 dB A24-Y18NF Yagi (18-element) 15.0 dBi Fixed 8.6 dB 10.4 dB XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 221 Agency certifications The following table shows the antennas approved for use with the XBee-PRO ZB Through Hole RF Module. Minimum Cable Loss/Power Reduction/Attenuation Required Min. Part Number Type (Description) Gain Application* Separation Channels 11-25 Channel 26 Integral Antennas 29000294 Integral PCB antenna -0.5 dBi...
  • Page 222 3.5 dB A24-Y16NF Yagi (16-element) 13.5 dBi Fixed 5.0 dB 4.5 dB A24-Y16RM Yagi (16-element, RPSMA connector) 13.5 dBi Fixed 5.0 dB 4.5 dB A24-Y18NF Yagi (18-element) 15.0 dBi Fixed 6.5 dB 6 dB XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 223: Rf Exposure

    The CE marking must have a height of at least 5mm except where this is not possible on account of the nature of the apparatus • The CE marking must be affixed visibly, legibly, and indelibly XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 224: Restrictions

    Digi Support. Important Note: Digi does not list the entire set of standards that must be met for each country. Digi customers assume full responsibility for learning and meeting the required guidelines for each country in their distribution market. For...
  • Page 225: For Xbee-Pro Zb Surface Mount

    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 226: Anatel (Brazil) Certification

    ANATEL (Brazil) certification Contact Digi for questions related to locating a contact in Australia. ANATEL (Brazil) certification The XBee ZB RF modules (models noted below) comply with Brazil ANATEL standards in Resolution No. 506. The following information is required in the user manual for the product containing the radio and on the product...
  • Page 227 ANATEL (Brazil) certification XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 228: Migrating From Xbee Through-Hole To Xbee Surface Mount Modules

    DIN / CONFIG / DIO14 DIO12 RESET RSSI PWM / DIO10 PWM1 / DIO11 [reserved] DTR / SLEEP_RQ / DIO8 SPI_ATTN / BOOTMODE / DIO19 SPI_CLK / DIO18 SPI_SSEL / DIO17 SPI_MOSI / DIO16 XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 229: Mounting

    One of the important differences between the Surface Mount and the Through-hole modules is the way they mount to the PCB. Different mounting techniques are required. Digi International has designed a footprint which will allow either module to be attached to a PCB. The layout is shown below. All dimensions are in inches.
  • Page 230 (see Pin Mapping above). By using diagonal traces to connect the appropriate pins, the layout will work for both modules. Information on attaching the SMT module is included in Manufacturing information on page 231. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 231: Manufacturing Information

    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 module, consider the relative requirements in accordance with standard IPC/JEDEC J-STD-020.
  • Page 232 RF test points on the bottom of the module (see below). Furthermore, these modules have a ground plane in the middle on the back side for shielding purposes, which can be affected by copper traces directly below the module. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 233 During rework, the module temperature may rise above its internal solder melting point and care should be taken not to dislodge internal components from their intended positions. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 234: Definitions

    One coordinator per PAN • Establishes/Organizes PAN • Can route data packets to/from other nodes • Can be a data packet source and destination • Mains-powered Refer to the XBee coordinator section for more information. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 235 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 ZigBee RF Modules User Guide...

This manual is also suitable for:

XbeePs2csm

Table of Contents