Digi XBEE2 User Manual

Digi XBEE2 User Manual

Zigbee rf modules
Hide thumbs Also See for XBEE2:
Table of Contents

Advertisement

Quick Links

ZigBee RF Modules
XBEE2, XBEEPRO2, PRO S2B
User Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Summary of Contents for Digi XBEE2

  • Page 1 ZigBee RF Modules XBEE2, XBEEPRO2, PRO S2B User Guide...
  • Page 2: Customer Support

    To provide feedback on this document, send your comments to techcomm@digi.com. Customer 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, please contact us at 952.912.3456 or visit www.digi.com/support.
  • Page 3: Table Of Contents

    Contents Overview The difference between XBee and ZigBee ............Specifications of the XBee/XBee-PRO ZB RF Module .
  • Page 4 PAN ID selection ................. . Security policy .
  • Page 5 Link status transmission ................AODV mesh routing .
  • Page 6 Associate LED ..................Managing End Devices End Device operation .
  • Page 7 Design considerations for Digi drop-in networking ........
  • Page 8 When sleeping (end devices): ..............When waking from sleep (end devices): .
  • Page 9 Overview Hardware specifications for programmable variant ........12 Mechanical drawings .
  • Page 10: Overview

    Although the names are similar, it is important that you distinguish between XBee and ZigBee. XBee is the name Digi gave to the physical radio module and refers to the form factor. Some radio modules are also offered in an XBee-PRO variant for expanded range.
  • Page 11 Overview Specification XBee XBee-PRO (S2) XBee-PRO (S2B) Transmit power 2 mW (+3dBm), boost mode 50 mW (+17 dBm) 63mW (+18 dBm) output enabled 10 mW (+10 dBm) for International 10mW (+10 dBm) for 1.25 mW (+1dBm), boost mode variant International variant disabled RF data rate 250,000 b/s...
  • Page 12: Hardware Specifications For Programmable Variant

    PAN ID and addresses, cluster IDs PAN ID and addresses, cluster IDs and endpoints (optional) and endpoints (optional) IDs and endpoints (optional) Agency Approvals United States (FCC FCC ID: OUR-XBEE2 FCC ID: MCQ-XBEEPRO2 FCC ID: MCQ-PROS2B Part 15.247) Industry Canada IC: 4214A-XBEE2 IC: 1846A-XBEEPRO2...
  • Page 13 Overview Hardware specifications for programmable variant These numbers add to S2B specifications Optional Secondary Processor Specification (Add to RX, TX, and sleep currents depending on mode of operation) Sleep current +0.5 uA typical For additional specifications see the Freescale datasheet and MC9S08QE32 manual Minimum reset low pulse time for EM250...
  • Page 14: Mechanical Drawings

    Overview Mechanical drawings Mechanical drawings Mechanical drawings of the XBee/XBee-PRO ZB RF Modules (antenna options not shown). Mechanical Drawings for the RPSMA Variant XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 15: Sif Header Interface

    20-pin receptacles to receive modules. The following image shows the XBee-PRO module mounting to an RS-232 interface board. The receptacles used on Digi development boards are manufactured by Century Interconnect. Several other manufacturers provide comparable mounting solutions; however, Digi currently uses the following receptacles: Through-hole single-row receptacles - Samtec P/N: MMS-110-01-L-SV (or equivalent) ...
  • Page 16: Pin Signals

    Overview Pin signals Through-hole single-row receptacles - Mill-Max P/N: 831-43-0101-10-001000  Surface-mount double-row receptacles - Century Interconnect P/N: CPRMSL20-D-0-1 (or equivalent)  Surface-mount single-row receptacles - Samtec P/N: SMM-110-02-SM-S  Note We also recommend printing an outline of the module on the board to indicate the orientation the module should be mounted.
  • Page 17: Em250 Pin Mappings

    Overview Pin signals Pin # Name Direction Default State Description AD2 / DIO2 Both Disabled Analog Input 2 or Digital I/O 2 AD1 / DIO1 Both Disabled Analog Input 1 or Digital I/O 1 AD0 / DIO0 / Both Disabled Analog Input 0, Digital IO 0, or Commissioning Button Commissioning Button EM250 pin mappings...
  • Page 18: Design Notes

    Overview Design notes EM250 Pin Number XBee Pin Number Other Usage 36 (SIF_MOSI) Connected to pin 4 on 2x5 SIF header. 37 (SIF_LOAD) Connected to pin 7 on 2x5 SIF header. 40 (GPIO 16) 41 (GPIO 15) 42 (GPIO 14) 43 (GPIO 13) 1.
  • Page 19: Board Layout

    Overview Design notes Board layout XBee modules do not have any specific sensitivity to nearby processors, crystals or other PCB components. Other than mechanical considerations, no special PCB placement is required for integrating XBee radios except for those with integral antennas. In general, Power and GND traces should be thicker than signal traces and be able to comfortably support the maximum currents.
  • Page 20 Overview Design notes XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 21: Electrical Characteristics

    Overview Electrical characteristics Electrical characteristics The following table provides the DC characteristics of the module. Symbol Parameter Condition Typical Max Units 0.2 * VCC Input Low Voltage All digital inputs 0.8 * VCC Input High Voltage All digital inputs 0.18*VCC Output Low Voltage VCC >= 2.7 V 0.82*VCC...
  • Page 22 In order for the secondary processor to sample with ADCs, the XBee pin 14 (VREF) needs to be connected to a reference voltage. Digi provides a bootloader that can take care of programming the processor over the air or through the serial interface. This means that over the air updates can be supported through an XMODEM protocol.
  • Page 23: Programmable Xbee Sdk

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

    Module operation Serial communications ............. 25 Comparing Transparent and API operation .
  • Page 25: Serial Communications

    Module operation Serial communications Serial communications The XBee RF Modules interface to a host device through a logic-level asynchronous serial port. Through its serial port, the module can communicate with any logic and voltage compatible UART; or through a level translator to any serial device;...
  • Page 26: Serial Buffers

    Module operation Serial communications UART data packet 0x1F (decimal number “31”) as transmitted through the RF module Example data format is 8-N-1 (bits - parity - # of stop bits) Serial communications depend on the two UARTs (the microcontroller's and the RF module's) to be configured with compatible settings (baud rate, parity, start bits, stop bits, data bits).
  • Page 27: Serial Flow Control

    Module operation Serial communications 2 If the module is transmitting an RF data packet, the module may need to discover the destination address or establish a route to the destination. After transmitting the data, the module may need to retransmit the data if an acknowledgment is not received, or if the transmission is a broadcast.
  • Page 28: Api Operation

    Module operation Serial communications No serial characters are received for the amount of time determined by the RO (Packetization Timeout)  parameter. If RO = 0, packetization begins when a character is received. The Command Mode Sequence (GT + CC + GT) is received. Any character buffered in the serial receive buffer ...
  • Page 29: Comparing Transparent And Api Operation

    Module operation Comparing Transparent and API operation Comparing Transparent and API operation The following table compares the advantages of transparent and API modes of operation: Transparent Operation Features Simple Interface All received serial data is transmitted unless the module is in command mode. Easy to support It is easier for an application to support transparent operation and command mode API Operation Features...
  • Page 30: Modes Of Operation

    Module operation Modes of operation Modes of operation Idle Mode When not receiving or transmitting data, the RF module is in Idle Mode. The module 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 31: Receive Mode

    Module operation Modes of operation to receive the same data packet multiple times. The XBee modules do not filter out duplicate packets. The application should include provisions to address this potential issue Data transmission on page 54 for more information. Receive Mode If a valid RF packet is received, the data is transferred to the serial transmit buffer.
  • Page 32: Sleep Mode

    Module operation Modes of operation For modified parameter values to persist in the module’s registry after a reset, changes must be saved to non-volatile memory using the WR (Write) Command. Otherwise, parameters are restored to previously saved values after the module is reset. Command response When a command is sent to the module, the module will parse and execute the command.
  • Page 33 XBee ZigBee networks Introduction to ZigBee ............. 34 ZigBee stack layers .
  • Page 34: Xbee Zigbee Networks

    XBee ZigBee networks Introduction to ZigBee Introduction to ZigBee ZigBee is an open global standard built on the IEEE 802.15.4 MAC/PHY. ZigBee defines a network layer above the 802.15.4 layers to support advanced mesh routing capabilities. The ZigBee specification is developed by a growing consortium of companies that make up the ZigBee Alliance.
  • Page 35: Networking Concepts

    XBee ZigBee networks Networking concepts Networking concepts Device types ZigBee defines three different device types: Coordinator, Router, and End Device. Node types / sample of a basic ZigBee network topology A coordinator has the following characteristics: it Selects a channel and PAN ID (both 64-bit and 16-bit) to start the network ...
  • Page 36: Pan Id

    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 ...
  • Page 37: Application Support Sublayer (Aps)

    Digi XBee ZB firmware operates on a private profile called the Digi Drop-In Networking profile. However, the API firmware in the module can be used in many cases to talk to devices in public profiles or non-Digi private profiles. API operation on page 108 for details.
  • Page 38: Coordinator Operation

    XBee ZigBee networks Coordinator operation could, for example, implement one endpoint that supports a Smart Energy load controller, and another endpoint that supports other functionality on a private profile. ZigBee device profile Profile ID 0x0000 is reserved for the ZigBee Device Profile. This profile is implemented on all ZigBee devices. Device Profile defines many device and service discovery features and network management capabilities.
  • Page 39: Persistent Data

    XBee ZigBee networks Coordinator operation Persistent data Once a coordinator has started a network, it retains the following information through power cycle or reset events: PAN ID  Operating channel  Security policy and frame counter values  Child table (end device children that are joined to the coordinator). ...
  • Page 40: Permit Joining

    XBee ZigBee networks Coordinator operation If any of the command values in the network formation commands table changes, the coordinator will leave its current network and start a new network, possibly on a different channel. Note that command changes must be applied (AC or CN command) before taking effect.
  • Page 41: Replacing A Coordinator (Security Disabled Only)

    XBee ZigBee networks Coordinator operation Replacing a Coordinator (security disabled only) In 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, a replacement XBee coordinator can be configured 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 42: Example: Replacing A Coordinator (Security Disabled)

    XBee ZigBee networks Router operation After startup, the coordinator will allow joining based on its NJ value. Example: replacing a Coordinator (security disabled) 1 Read the OP, OI, CH, and ZS commands on the running coordinator. 2 Set the ID, SC, and ZS parameters on the new coordinator, followed by WR command to save these parameter values.
  • Page 43: Authentication

    XBee ZigBee networks Router operation Authentication In a network where security is enabled, the router must then go through an authentication process. See security on page 74 for a discussion on security and authentication. After the router is joined (and authenticated, in a secure network), it can allow new devices to join the network. Persistent data Once a router has joined a network, it retains the following information through power cycle or reset events: PAN ID...
  • Page 44: Permit Joining

    XBee ZigBee networks Router operation Sets AI=0  Starts blinking the Associate LED  Sends an API modem status frame (“associated”) out the UART (API firmware only).  These behaviors are configurable using the following commands: Command Description Sets the permit-join time on the router, or the time that it will allow new devices to join the network, measured in seconds.
  • Page 45 XBee ZigBee networks Router operation also attempt to discover the 64-bit address of the coordinator after a power cycle event. If 3 discovery attempts fail, the router will leave the network and try to join a new network. Power-on join verification is disabled by default (JV defaults to 0).
  • Page 46: Leaving A Network

    XBee ZigBee networks Router operation Network Watchdog Behavior Clear Network Watchdog Failure Count Restart Network Watchdog Timer Received RF Communication from Coordinator or Data Collector Network Watchdog Timer Expired? Discover Coordinator Network Watchdog Failure Count Coordinator Network Watchdog Failure Found? Count +=1 Leave Leaving a network...
  • Page 47: Resetting The Router

    XBee ZigBee networks End Device operation Resetting the router When the router is reset or power cycled, it checks its PAN ID, operating channel and stack profile against the network configuration settings (ID, SC, ZS). It also verifies the saved security policy is valid based on the security configuration commands (EE, KY).
  • Page 48: Joining A Network

    XBee ZigBee networks End Device operation If scanning all SC channels fails to discover a valid PAN, XBee ZB modules will attempt to enter a low power state and will retry scanning all SC channels after the module wakes from sleeping. If the module cannot enter a low power state, it will retry scanning all channels, similar to the router.
  • Page 49: Orphan Scans

    XBee ZigBee networks End Device operation it will leave the network and try to discover and join a new network. When the end device leaves a network, the previous PAN ID and operating channel settings are lost. Orphan scans When an end device comes up from a power cycle, it performs an orphan scan to verify it still has a valid parent. The orphan scan is sent as a broadcast transmission and contains the 64-bit address of the end device.
  • Page 50: Parent Connectivity

    XBee ZigBee networks End Device operation Attempts to enter low power modes  These behaviors are configurable using the following commands: Command Description Enables the Associate LED functionality. Sets the Associate LED blink time when joined. Default is two blinks per second (end devices). SM, SP, ST, SN, SO Parameters that configure the sleep mode characteristics.
  • Page 51: Example: Joining A Network

    XBee ZigBee networks Channel scanning for the XBee/XBee-PRO ZB RF Module Example: joining a network After starting a coordinator (that is allowing joins), the following steps will cause an XBee end device to join the network: 1 Set ID to the desired 64-bit PAN ID, or to 0 to join any PAN. 2 Set SC to the list of channels to scan to find a valid network.
  • Page 52: Pan Id Filtering

    XBee ZigBee networks Channel scanning for the XBee/XBee-PRO ZB RF Module Application messaging  PAN ID filtering The XBee can be configured with a fixed PAN ID by setting the ID command to a non-zero value. If the PAN ID is set to a non-zero value, the XBee will only join a network with the same PAN ID.
  • Page 53: Transmission, Addressing, And Routing

    Transmission, addressing, and routing Addressing ............... 54 Data transmission .
  • Page 54: Addressing

    36. 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 Inter-operate with other ZigBee devices outside of the Digi application profile ...
  • Page 55: Unicast Transmissions

    Transmission, addressing, and routing Data transmission Note When a router or coordinator delivers a broadcast transmission to an end device child, the transmission is only sent once (immediately after the end device wakes and polls the parent for any new data). See Parent operation on page 89 for details.
  • Page 56 Transmission, addressing, and routing Data transmission When sending a unicast transmission, the ZigBee network layer uses the 16-bit address of the destination and each hop to route the data packet. If the 16-bit address of the destination is not known, the ZigBee stack includes a discovery provision to automatically discover the destination device's 16-bit address before routing the data.
  • Page 57: Data Transmission Examples

    Transmission, addressing, and routing Data transmission Fragmentation Each unicast transmission may support up to 84 bytes of RF payload. Enabling security or using source routing can reduce this number. See the NP command for details. However, the XBee ZB firmware supports a ZigBee feature called fragmentation that allows a single large data packet to be broken up into multiple RF transmissions and reassembled by the receiver before sending data out its UART.
  • Page 58 Transmission, addressing, and routing Data transmission 2 After receiving an OK\r, issue the following commands: a. ATDH0\r b. ATDL0\r c. ATCN\r 3 Verify that each of the three commands returned an OK\r response. 4 After setting these command values, all serial characters will be sent as a unicast transmission to the coordinator.
  • Page 59 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 60: Rf Packet Routing

    Transmission, addressing, and routing RF packet routing This example will use the transmit request API frame (0x10) to send an ASCII 1 in a broadcast transmission. To send an ASCII 1 as a broadcast transmission, the following API frame can be used: 7E 00 0F 10 01 0000 0000 0000 FFFF FFFE 00 00 31 C2 Notice the destination 16-bit address is set to 0xFFFE for broadcast transmissions.
  • Page 61: Aodv Mesh Routing

    Transmission, addressing, and routing RF packet routing When a router or coordinator device powers on, it sends link status messages every couple seconds to attempt to discover link qualities with its neighbors quickly. After being powered on for some time, the link status messages are sent at a much slower rate (about every three to four times per minute).
  • Page 62 Transmission, addressing, and routing RF packet routing Sample route request (broadcast) transmission where R3 is trying to discover a route to R6. When the destination node receives a route request, it compares the ‘path cost’ field against previously received route request commands. If the path cost stored in the route request is better than any previously received, the destination node will transmit a route reply packet to the node that originated the route request.
  • Page 63: Many-To-One Routing

    Transmission, addressing, and routing RF packet routing Many-to-one routing In networks where many devices must send data to a central collector or gateway device, AODV mesh routing requires significant overhead. If every device in the network had to discover a route before it could send data to the data collector, the network could easily become inundated with broadcast route discovery messages.
  • Page 64 Transmission, addressing, and routing RF packet routing 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. After obtaining a source route, the data collector sends a This is prefaced by a route record transmission to the data source routed transmission to the remote device.
  • Page 65 Transmission, addressing, and routing RF packet routing Acquiring source routes Acquiring source routes requires the remote devices to send a unicast to a data collector (device that sends many-to-one route request broadcasts). There are several ways to force remotes to send route record transmissions.
  • Page 66 Transmission, addressing, and routing RF packet routing Device 16-bit address 0xAABB 0xCCDD 0xEEFF Then the Create Source Route API frame would be: 7E 0012 21 00 0013A200 404A1234 EEFF 00 02 CCDD AABB 5C Where: 0x0012 - length 0x21 - API ID (create source route) 0x00 - frame ID (set to 0 always) 0x0013A200 404A1234 - 64-bit address of R3 (destination) 0xEEFF - 16-bit address of R3 (destination)
  • Page 67: Encrypted Transmissions

    Transmission, addressing, and routing Encrypted transmissions Disabling MTO routing To disable many-to-one (MTO) routing in a system where it has been active, you will need to disable AR on the aggregator, and do a network wide power reset to rebuild the routing tables. 1 Set AR on the aggregator to 0xFF.
  • Page 68: Throughput

    Transmission, addressing, and routing Throughput Throughput Throughput in a ZigBee network can vary by a number of variables, including: number of hops, encryption enabled/disabled, sleeping end devices, failures/route discoveries. Our empirical testing showed the following throughput performance in a robust operating environment (low interference). Data throughput Configuration Data Throughput...
  • Page 69: Sending A Zdo Command

    Transmission, addressing, and routing ZDO transmissions Cluster Name Cluster ID Description Routing Table Request 0x0032 Request to retrieve routing table entries from a remote device. Network Address Response 0x8000 Response that includes the 16-bit address of a device. LQI Response 0x8031 Response that includes neighbor table data from a remote device.
  • Page 70 Transmission, addressing, and routing ZDO transmissions 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 0x00 - Required payload for LQI request command 0xCE - Checksum (0xFF - SUM (all bytes after length)) Description This API frame sends a ZDO LQI request (neighbor table request) to a remote device to obtain data from its...
  • Page 71: Transmission Timeouts

    Transmission, addressing, and routing Transmission timeouts 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. Transmission timeouts The ZigBee stack includes two kinds of transmission timeouts, depending on the nature of the destination device.
  • Page 72: Transmission Examples

    Transmission, addressing, and routing Transmission timeouts To ensure the end device has adequate time to wake and receive the data, the extended transmission timeout to an end device is: (50 * NH) + (1.2 * SP) This timeout includes the packet buffering timeout (1.2 * SP) and time to account for routing through the mesh network (50 * NH).
  • Page 73 Transmission, addressing, and routing Transmission timeouts 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 Field composition: 0x0014 - length 0x10 - API ID (tx data)
  • Page 74 ZB security Security modes ..............75 ZigBee security model .
  • Page 75: Zb Security

    ZB security Security modes ZigBee supports various levels of security that can be configured depending on the needs of the application. Security provisions include: 128-bit AES encryption  Two security keys that can be preconfigured or obtained during joining  Support for a trust center ...
  • Page 76: Frame Counter

    ZB security ZigBee security model Frame counter The network header of encrypted packets includes a 32-bit frame counter. Each device in the network maintains a 32-bit frame counter that is incremented for every transmission. In addition, devices track the last known 32-bit frame counter for each of its neighbors.
  • Page 77: Message Integrity Code

    ZB security ZigBee security model If APS security is enabled, packets are encrypted and authenticated using 128-bit AES. This is shown in the figure below: Message integrity code If APS security is enabled, the APS header and data payload are authenticated with 128-bit AES. A hash is performed on these fields and appended as a 4-byte message integrity code (MIC) to the end of the packet.
  • Page 78: Trust Center

    ZB security Implementing security on the XBee 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. Forming and joining a secure network The coordinator is responsible for selecting a network encryption key.
  • Page 79: Enabling Security

    ZB security Implementing security on the XBee Enabling security To enable security on a device, the EE command must be set to 1. If the EE command value is changed and changes are applied (for example AC command), the XBee module will leave the network (PAN ID and channel) it was operating on, and attempt to form or join a new network.
  • Page 80: Using A Trust Center

    ZB security XBee security examples APS encryption can be enabled in API firmware on a per-packet basis. To enable APS encryption for a given transmission, the “enable APS encryption” transmit options bit should be set in the API transmit frame. Enabling APS encryption decreases the maximum payload size by nine bytes.
  • Page 81: Example 2: Forming A Network With Security (Obtaining Keys During Joining)

    ZB security XBee security examples c. KY=4455 d. WR (save networking parameters to preserve them through power cycle) 3 Read the AI setting on the coordinator and joining devices until they return 0 (formed or joined a network). In this example, EE, ID, and KY are set the same on all devices. After successfully joining the secure network, all application data transmissions will be encrypted by the network key.
  • Page 82: Network Commissioning And Diagnostics

    Network commissioning and diagnostics Device configuration ............. . . 83 Device placement .
  • Page 83: Device Configuration

    Network commissioning and diagnostics Device configuration Network commissioning is the process whereby devices in a mesh network are discovered and configured for operation. The XBee modules include several features to support device discovery and configuration. In addition to configuring devices, a strategy must be developed to place devices to ensure reliable routes. To accommodate these requirements, the XBee modules include various features to aid in device placement, configuration, and network diagnostics.
  • Page 84: 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 the NI command), and other relevant information.
  • Page 85: Commissioning Pushbutton And Associate Led

    Network commissioning and diagnostics Commissioning pushbutton and associate LED Commissioning pushbutton and associate LED The XBee modules support a set of commissioning and LED behaviors to aid in device deployment and commissioning. These include the commissioning pushbutton definitions and associate LED behaviors. These features can be supported in hardware as shown below.
  • Page 86: Associate Led

    Network commissioning and diagnostics Commissioning pushbutton and associate LED The node identification frame is similar to the node discovery response frame – it contains the device’s address, node identifier string (NI command), and other relevant data. All API devices that receive the node identification frame send it out their UART as an API Node Identification Indicator frame (0x95).
  • Page 87 Network commissioning and diagnostics Commissioning pushbutton and associate LED Associate (D5 = 1 Device not joined) AD0/DIO0 A single comm issioning button press when the device has not joined a network that causes the associate pin to blink to indicate the AI Code where : AI = # blinks + 0x20. In this example, AI = 0x22.
  • Page 88 Managing End Devices End Device operation ............. . 89 Parent operation .
  • Page 89: Managing End Devices

    Managing End Devices End Device operation ZigBee End Devices are intended to be battery-powered devices capable of sleeping for extended periods of time. Since end devices may not be awake to receive RF data at a given time, routers and coordinators are equipped with additional capabilities (including packet buffering and extended transmission timeouts) to ensure reliable data delivery to end devices.
  • Page 90: End Device Poll Timeouts

    Managing End Devices Non-parent device operation all children have not received a buffered broadcast packet and a new broadcast is received, the old broadcast packet is discarded, the child table flags are cleared, and the new broadcast packet is buffered for the end device children.
  • Page 91: Xbee End Device Configuration

    Managing End Devices XBee End Device configuration timeout mechanism in order to allow enough time for the end device to wake and receive the data transmission from its parent. If a non-parent device does not know the destination is an end device, it will use the standard unicast timeout for the transmission.
  • Page 92 Managing End Devices XBee End Device configuration In the figure above, t1, t2, and t3 represent the following events: T1 - Time when Sleep_RQ is asserted (high)  T2 - Time when the XBee enters sleep (CTS state change only if hardware flow control is enabled) ...
  • Page 93: Cyclic Sleep

    Managing End Devices XBee End Device configuration Cyclic sleep Cyclic sleep allows the module to sleep for a specified time and wake for a short time to poll its parent for any buffered data messages before returning to sleep again. Cyclic sleep mode is enabled by setting the SM command to 4 or 5.
  • Page 94 Managing End Devices XBee End Device configuration In the figure above, t1, t2, and t3 represent the following events: T1 - Time when the module wakes from cyclic sleep  T2 - Time when the module returns to sleep  T3 - Later time when the module wakes from cyclic sleep.
  • Page 95 Managing End Devices XBee End Device configuration ST = Time Awake On/Sleep A cyclic sleep end device enters sleep mode when no serial or RF data is received for ST time Legend On/Sleep Transmitting Poll Request Sleep period The sleep period is configured based on the SP, SN, and SO commands. The following table lists the behavior of these commands.
  • Page 96: Transmitting Rf Data

    Managing End Devices XBee End Device configuration On/Sleep On/Sleep (SN = 3) (SN = 1) ∆t = SP * SN ∆t = SP * SN Transmitting poll request to parent Transmitting poll request to parent ∆t = SP ∆t = SP Setting SN >...
  • Page 97: Receiving Rf Data

    Managing End Devices XBee End Device configuration Receiving RF data After waking from sleep, an end device sends a poll request to its parent to determine if the parent has any buffered data for it. In pin sleep mode, the end device polls every 100 ms while the Sleep_RQ pin is de-asserted (low).
  • Page 98: Xbee Zb Router/Coordinator Configuration

    Managing End Devices XBee ZB Router/Coordinator configuration request will send a rejoin response if it can allow the device to join the network (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. To enable rejoining, NJ should be set less than 0xFF on the device that will join.
  • Page 99: Transmission Timeout

    Managing End Devices Putting It all together Adaptive polling The PO command determines the regular polling rate. However, if RF data has been recently received by an end device, it is likely that yet more 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.
  • Page 100: Example 1

    Managing End Devices Sleep examples Example 1 Configure a device to sleep for 20 seconds, but set SN such that the On/Sleep line will remain de-asserted for up to 1 minute. The following settings should be configured on the end device. SM = 4 (cyclic sleep) or 5 (cyclic sleep, pin wake) SP = 0x7D0 (2000 decimal).
  • Page 101 Managing End Devices Sleep examples For best results, the end device should send a transmission when it wakes to inform the coordinator (or network) when it wakes. It should also remain awake for a short time to allow devices to send data to it.
  • Page 102: Analog And Digital Io Lines

    Analog and digital IO lines IO configuration ..............103 IO sampling .
  • Page 103: Io Configuration

    Analog and digital IO lines IO configuration XBee ZB firmware supports a number of analog and digital IO pins that are configured through software commands. Analog and digital IO lines can be set or queried. The following table lists the configurable IO pins and the corresponding configuration commands.
  • Page 104 Analog and digital IO lines IO sampling Periodic sampling  Change detection sampling.  IO sample data is formatted as shown in the table below Bytes Name Description Sample Sets Number of sample sets in the packet. Always set to 1. Digital Channel Mask Indicates which digital IO lines have sampling enabled.
  • Page 105: Queried Sampling

    Analog and digital IO lines IO sampling To convert the A/D reading to mV, do the following: AD(mV) = (A/D reading * 1200mV) / 1023 The reading in the sample frame represents voltage inputs of 1143.75 and 342.1875mV for AD0 and AD1 respectively.
  • Page 106: Periodic Io Sampling

    Analog and digital IO lines RSSI PWM The following table shows an example of the fields in an IS response. Example Sample AT Response 0x01 [1 sample set] 0x0C0C [Digital Inputs: DIO 2, 3, 10, 11 low] 0x03 [Analog Inputs: A/D 0, 1] 0x0408 [Digital input states: DIO 3, 10 high, DIO 2, 11 low] 0x03D0...
  • Page 107: Io Examples

    Analog and digital IO lines RSSI PWM IO examples Example 1: configure the following IO 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. To configure AD1/DIO1 as an input, issue the ATD1 command with a parameter of 3 ("ATD13").
  • Page 108: Api Operation

    API operation API frame specifications ............109 API UART exchanges .
  • Page 109: Api Frame Specifications

    UART Data Frame. Please note that Digi may add new API frames to future versions of firmware, so please build into your software interface the ability to filter out additional API frames with unknown Frame Types.
  • Page 110 API operation API frame specifications API operation - with escape characters (AP parameter = 2) When this API mode is enabled (AP = 2), the UART data frame structure is defined as follows: UART data frame structure - with escape control characters: Start Delimiter Length Frame Data...
  • Page 111: Api Examples

    API operation API frame specifications The cmdID frame (API-identifier) indicates which API messages will be contained in the cmdData frame (Identifier-specific data). Note that multi-byte values are sent big endian. The XBee modules support the following API frames: API Frame Names API ID AT Command 0x08...
  • Page 112: Api Uart Exchanges

    API operation API UART exchanges 0x08 = AT Command API frame type 0x01 = Frame ID (set to non-zero value) 0x4E4A = AT Command ('NJ') 0xFF = value to set command to 0x5F = Checksum The checksum is calculated as [0xFF - (0x08 + 0x01 + 0x4E + 0x4A + 0xFF)] Example: Send an ND command to discover the devices in the PAN.
  • Page 113: Transmitting And Receiving Rf Data

    API operation API UART exchanges Transmitting and receiving RF data The following image shows the API exchanges that take place at the UART when sending RF data to another device. The transmit status frame is always sent at the end of a data transmission unless the frame ID is set to 0 in the transmit request.
  • Page 114: Supporting The Api

    API operation Supporting the API Supporting the API 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: voidXBee_HandleRxAPIFrame(_apiFrameUnion *papiFrame){ switch(papiFrame->api_id){...
  • Page 115: Api Frames

    API operation API frames API frames The following sections illustrate the types of frames encountered while using the API. AT command Frame type: 0x08 Used to query or set module parameters on the local device. This API command applies changes after executing the command.
  • Page 116: At Command - Queue Parameter Value

    API operation API frames AT command - Queue Parameter Value Frame type: 0x09 This API type allows module parameters to be queried or set. In contrast to the “AT Command” API type, new parameter values are queued and not applied until either the “AT Command” (0x08) API type or the Apply Changes (AC) command is issued.
  • Page 117 API operation API frames Note If source routing is used, the RF payload will be reduced by two bytes per intermediate hop in the source route. This example shows if escaping is disabled (AP=1). Frame Fields Offset Example Description 0x7E Start Delimiter MSB 1 0x00...
  • Page 118 API operation API frames Frame Fields Offset Example Description Options Bitfield of supported transmission options. Supported values include the following: 0x01 - Disable retries and route repair 0x20 - Enable APS encryption (if EE=1) 0x40 - Use the extended transmission timeout Enabling APS encryption presumes the source and destination have been authenticated.
  • Page 119: Explicit Addressing Zigbee Command Frame

    API operation API frames 0x00 = Broadcast radius 0x00 = Options 0x547832436F6F7264 = Data payload (“Tx2Coord”) 0xFC = Checksum Explicit Addressing ZigBee Command frame Frame type: 0x11 Allows ZigBee application layer fields (endpoint and cluster ID) to be specified for a data transmission. Similar to the ZigBee Transmit Request, but also requires ZigBee application layer addressing fields to be specified (endpoints, cluster ID, profile ID).
  • Page 120 API operation API frames Frame Fields Offset Example Description MSB 5 0x00 64-bit Set to the 64-bit address of the destination device. The following Destination addresses are also supported: 0x00 Address 0x0000000000000000 - Reserved 64-bit address for the 0x00 coordinator 0x00 0x000000000000FFFF - Broadcast address 0x00...
  • Page 121: Remote At Command Request

    API operation API frames Frame Fields Offset Example Description 0x54 Data Payload Data that is sent to the destination device 0x78 0x44 Frame-specific Data 0x61 0x74 0x61 0x3A Checksum 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.
  • Page 122 API operation API frames Frame Fields Offset Example Description MSB 13 0xFF 16-bit Set to the 16-bit address of the destination device, if known. Set to Destination 0xFFFE if the address is unknown, or if sending a broadcast. LSB 14 0xFE Network Address...
  • Page 123: Create Source Route

    API operation API frames Create Source Route Frame type: 0x21 This frame creates a source route in the module. A source route specifies the complete route a packet should traverse to get from source to destination. Source routing should be used with many-to-one routing for best results.
  • Page 124: At Command Response

    API operation API frames Frame Fields Offset Example Description 0xAA Frame-specific Address 3 (neighbor of source) Data 0xBB 0x01 Checksum 0xFF - the 8 bit sum of bytes from offset 3 to this byte. Intermediate hop addresses must be ordered starting with the neighbor of the destination, and working closer to the source.
  • Page 125: Modem Status

    API operation API frames Modem Status Frame type: (0x8A) RF module status messages are sent from the module in response to specific conditions. The following API frame is returned when an API coordinator forms a network. Frame Fields Offset Example Description 0x7E Start Delimiter...
  • Page 126: Zigbee Transmit Status

    API operation API frames ZigBee Transmit Status Frame type: 0x8B When a TX Request is completed, the module sends a TX Status message. This message will indicate if the packet was transmitted successfully or if there was a failure. Frame Fields Offset Example Description...
  • Page 127: Zigbee Receive Packet

    API operation API frames ZigBee Receive Packet Frame type: (0x90) When the module receives an RF packet, it is sent out the UART using this message type. Frame Fields Offset Example Description 0x7E Start Delimiter MSB 1 0x00 Length Number of bytes between the length and the checksum LSB 2 0x11 0x90...
  • Page 128: Zigbee Explicit Rx Indicator

    API operation API frames ZigBee Explicit Rx Indicator Frame type:0x91 When the modem receives a ZigBee RF packet it is sent out the UART using this message type (when AO=1). Frame Fields Offset Example Description 0x7E Start Delimiter MSB 1 0x00 Length Number of bytes between the length and the checksum...
  • Page 129: Zigbee Io Data Sample Rx Indicator

    API operation API frames Suppose a device with a 64-bit address of 0x0013A200 40522BAA, and 16-bit address 0x7D84 sends a broadcast data transmission to a remote device with payload “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 UART.
  • Page 130 API operation API frames Frame Fields Offset Example Description MSB 12 0x7D 16-bit Source 16-bit address of sender Network Address LSB 13 0x84 Receive Options 0x01 - Packet Acknowledged 0x01 0x02 - Packet was a broadcast packet Number of Samples Number of sample sets included in the payload 0x01 (Always set to 1)
  • Page 131: Xbee Sensor Read Indicator

    API operation 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 UART using this message type (when AO=0). Frame Fields Offset Example...
  • Page 132 API operation API frames Example: Suppose a 1-wire sensor sample is received from a device with a 64-bit address of 0x0013A200 40522BAA and a 16-bit address of 0xDD6C. If the sensor sample was taken from a 1-wire humidity sensor, the API frame could look like this (if AO=0): For convenience, let's label the A/D and temperature readings as AD0, AD1, AD2, AD3, and T.
  • Page 133: Node Identification Indicator

    API operation API frames Node Identification Indicator Frame type: 0x95 This frame is received when a module transmits a node identification message to identify itself (when AO=0). The data portion of this frame is similar to a network discovery response frame (see the ND command). Frame Fields Offset Example...
  • Page 134 2 = Frame sent after joining event occurred (see the JN 0x01 command). 3 = Frame sent after power cycle event occurred (see the JN command) 0xC1 Digi Profile ID Set to Digi's application profile ID 0x05 0x10 Manufacturer ID Set to Digi's Manufacturer ID 0x1E 0x1B...
  • Page 135: Remote Command Response

    API operation API frames Remote Command Response Frame type: 0x97 If a module receives a remote command response RF data frame in response to a Remote AT Command Request, the module will send a Remote AT Command Response message out the UART. Some commands may send back multiple frames—for example, Node Discover (ND) command.
  • Page 136 API operation API frames The Over-the-Air Firmware Update Status frame provides a status indication of a firmware update transmission attempt. If a query command (0x01 0x51) is sent to a target with a 64-bit address of 0x0013A200 40522BAA through an updater with 64-bit address 0x0013A200403E0750 and 16-bit address 0x0000, the following is the expected response.
  • Page 137 API operation API frames Frame Fields Offset Example Description Block Number Block number used in the update request. Set to 0 if not 0x00 applicable. 0x00 64-bit Target 64-bit address of remote device that is being updated (target) Address 0x13 0xA2 Frame-specific Data...
  • Page 138: Route Record Indicator

    API operation API frames Route Record Indicator Frame type: 0xA1 The route record indicator is received whenever a device sends a ZigBee route record command. This is used with many-to-one routing to create source routes for devices in a network. Frame Fields Offset Example...
  • Page 139: Many-To-One Route Request Indicator

    API operation Sending ZigBee Device Objects (ZDO) commands with the API D = 0xEEFF The data collector will send the above API frame out its UART. Many-to-One Route Request Indicator Frame type: 0xA3 The many-to-one route request indicator frame is sent out the UART whenever a many-to-one route request is received Frame Fields Offset...
  • Page 140 API operation Sending ZigBee Device Objects (ZDO) commands with the API ZDO Command Cluster ID 0x0000 Network Address Request 0x0001 IEEE Address Request 0x0002 Node Descriptor Request 0x0004 Simple Descriptor Request 0x0005 Active Endpoints Request 0x0006 Match Descriptor Request 0x0031 Mgmt LQI Request 0x0032 Mgmt Routing Request...
  • Page 141 API operation Sending ZigBee Device Objects (ZDO) commands with the API Frame Fields Offset Example Description Start Delimiter 0x7E MSB 1 0x00 Length Number of bytes between the length and the checksum LSB 2 0x17 Frame Type 0x11 Identifies the UART data frame for the host to correlate with a subsequent Frame ID 0x01...
  • Page 142: Sending Zigbee Cluster Library (Zcl) Commands With The Api

    API operation Sending ZigBee Cluster Library (ZCL) commands with the API Frame Fields Offset Example Description Transaction The required payload for a ZDO 0x01 Sequence Number Data Payload command. All multi-byte ZDO parameter values (u16, u32, 64-bit address) must be ZDO Payload 0x34 sent in little endian byte order.
  • Page 143 API operation Sending ZigBee Cluster Library (ZCL) commands with the API 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: Command (Command ID) Description Read Attributes (0x00) Used to read one or more attributes on a remote device Read Attributes Response (0x01)
  • Page 144 API operation Sending ZigBee Cluster Library (ZCL) commands with the API Frame Fields Offset Example Description MSB 5 0x00 64-bit address of the destination device (big endian byte order). For unicast 0x13 transmissions, set to the 64-bit address of 0xA2 the destination device, or to 0x0000000000000000 to send a unicast to 0x00...
  • Page 145 API operation Sending ZigBee Cluster Library (ZCL) commands with the API Frame Fields Offset Example Description Bitfield that defines the command type and Data Frame other relevant information in the ZCL 0x00 Payload Control command. See the ZCL specification for details.
  • Page 146: Sending Public Profile Commands With The Api

    API operation Sending public profile commands with the API Sending public profile commands with the API Commands in public profiles such as Smart Energy and Home Automation can be sent with the XBee API using the Explicit Transmit API frame (0x11). Sending public profile commands with the Explicit Transmit API frame requires some formatting of the data payload field.
  • Page 147 API operation Sending public profile commands with the API Frame Fields Offset Example Description Set to the source endpoint on the sending Source Endpoint 0x41 device. 0x41 arbitrarily selected. Set to the destination endpoint on the Destination Endpoint 0x42 remote device. 0x42 arbitrarily selected. MSB 17 0x07 Set to the cluster ID that corresponds to the...
  • Page 148 API operation Sending public profile commands with the API Frame Fields Offset Example Description 4-byte unique identifier. Payload Note the 4-byte ID is sent in little endian byte - Load order (0x78563412). 0x78 Control The event ID in this example (0x12345678) Event was arbitrarily selected.
  • Page 149 API operation Sending public profile commands with the API Frame Fields Offset Example Description 0x00 Requested heating set point in 0.01 degrees Celsius. Heating A value of 0x8000 means the set point field is Temperature not used in this event. 0x80 Set Point Note the 0x80000 is sent in little endian byte...
  • Page 150: Device Authenticated Indicator

    API operation Sending public profile commands with the API Device Authenticated Indicator Frame type: 0xa2 Frame Fields Offset Example Description Start Delimiter MSB 1 Length LSB 2 Frame Type MSB 4 Authenticated 64-bit (MAC/EUI64) device address 64-bit Source Address Frame-specific Data LSB 11 MSB 12...
  • Page 151: Register Joining Device Status

    API operation Sending public profile commands with the API Register Joining Device Status Frame type: 0xa4 Frame Fields Offset Example Description Start Delimiter MSB 1 Length LSB 2 Frame Type MSB 4 64-bit Source Address Frame-specific Data LSB 11 MSB 12 Source 16-bit Address LSB 13...
  • Page 152: Register Joining Device

    API operation Sending public profile commands with the API Register Joining Device Frame type: 0x24 Frame Fields Offset Example Description Start Delimiter MSB 1 Length LSB 2 Frame ID Identifies the UART data frame for the host to match with a subsequent response.
  • Page 153: Command Reference Tables

    Command reference tables Addressing commands ............154 Networking commands .
  • Page 154: Addressing Commands

    0xE8 source endpoint value. This value will be used as the source endpoint for all data transmissions. SE is only supported in AT firmware.The default value 0xE8 (Data endpoint) is the Digi data endpoint. XBee/XBee-PRO ZigBee RF Modules User Guide...
  • Page 155 ID value. This value will be used as the destination endpoint all data transmissions. DE is only supported in AT firmware.The default value (0xE8) is the Digi data endpoint. Cluster Identifier. Set/read ZigBee application layer 0 - 0xFFFF 0x11 cluster ID value.
  • Page 156 0x30000 value can be used to differentiate different XBee-based devices. Digi reserves the range 0 - 0xFFFFFF. For example, Digi currently uses the following DD values to identify various ZigBee products: 0x30001 - ConnectPort X8 Gateway 0x30002 - ConnectPort X4 Gateway...
  • Page 157: Networking Commands

    Command reference tables Networking commands Networking commands Node Command Name and Description Type Parameter Range Default Operating Channel. Read the channel number used for XBee [read-only] transmitting and receiving between RF modules. Uses 0, 0x0B - 0x1A | 802.15.4 channel numbers. A value of 0 means the (Channels 11-26) device has not joined a PAN and is not operating on any XBee-PRO (S2)
  • Page 158 Command reference tables Networking commands Node Command Name and Description Type Parameter Range Default Network Discovery options. Set/Read the options 0 - 0x03 [bitfield] value for the network discovery command. The options bitfield value can change the behavior of the ND (network discovery) command and/or change what optional values are returned in any received ND responses or API node identification frames.
  • Page 159 Command reference tables Networking commands Node Command Name and Description Type Parameter Range Default Scan Duration. Set/Read the scan duration exponent. 0 - 7 [exponent] Changes to SD should be written using WR command. Coordinator - Duration of the Active and Energy Scans (on each channel) that are used to determine an acceptable channel and Pan ID for the Coordinator to startup on.
  • Page 160 Command reference tables Networking commands Node Command Name and Description Type Parameter Range Default Channel Verification. Set/Read the channel verification 0 - Channel verification parameter. If JV=1, a router will verify the coordinator is disabled on its operating channel when joining or coming up 1 - Channel verification from a power cycle.
  • Page 161: Security Commands

    Command reference tables Security commands Security commands Node Parameter Command Name and Description Type Range Default Encryption Enable. Set/Read the encryption enable setting. 0 - Encryption disabled 1 - Encryption enabled Encryption Options. Configure options for encryption. Unused option 0 - 0xFF bits should be set to 0.
  • Page 162: Rf Interfacing Commands

    Command reference tables RF interfacing commands RF interfacing commands Node Command Name and Description Type Parameter Range Default Power Level. Select/Read the power level at which the RF XBee (S2) module transmits conducted power. For XBee-PRO (S2B) (boost mode enabled) Power Level 4 is calibrated and the other power levels are 0 = -8 dBm approximate.
  • Page 163: Serial Interfacing (I/O) Commands

    Command reference tables Serial interfacing (I/O) commands Serial interfacing (I/O) commands Node Command Name and Description Type Parameter Range Default API Enable. Enable API Mode. 1 - 2 The AP command is only supported when using API firmware: 1 = API-enabled 21xx (API coordinator), 23xx (API router), 29xx (API end 2 = API-enabled device).
  • Page 164: I/O Commands

    Command reference tables I/O commands Node Command Name and Description Type Parameter Range Default DIO7 Configuration. Select/Read options for the DIO7 line of 0 = Disabled the RF module. 1 = CTS Flow Control 3 = Digital input 4 = Digital output, low 5 = Digital output, high 6 = RS-485 transmit enable (low enable)
  • Page 165 Command reference tables I/O commands Node Command Name and Description Type Parameter Range Default PWM0 Configuration. Select/Read function for PWM0. 0 = Disabled 1 = RSSI PWM 3 - Digital input, monitored 4 - Digital output, default 5 - Digital output, default high DIO11 Configuration.
  • Page 166 Command reference tables I/O commands Node Command Name and Description Type Parameter Range Default AD2/DIO2 Configuration. Select/Read function for AD2/ 0, 2-5 DIO2. 0 – Disabled 2 - Analog input, single ended 3 – Digital input 4 – Digital output, low 5 –...
  • Page 167 Command reference tables I/O commands Node Command Name and Description Type Parameter Range Default Pull-up Resistor. Set/read the bit field that configures the 0 - 0x3FFF internal pull-up resistor status for the I/O lines “1” specifies 0x1FFF the pull-up resistor is enabled. “0” specifies no pullup.(30k pull-up resistors) Bits:”...
  • Page 168: Diagnostics Commands

    Command reference tables Diagnostics commands Diagnostics commands Node Command Name and Description Type Parameter Range Default Firmware Version. Read firmware version of the module. 0 - 0xFFFF [read-only] Factory- The firmware version returns 4 hexadecimal values (2 bytes) “ABCD”. Digits ABC are the main release number and D is the revision number from the main release.
  • Page 169: At Command Options

    Command reference tables AT command options Node Command Name and Description Type Parameter Range Default Association Indication. Read information regarding last 0 - 0xFF node join request: [read-only] 0x00 - Successfully formed or joined a network. (Coordinators form a network, routers and end devices join a network). 0x21 - Scan found no PANs 0x22 - Scan found no valid PANs based on current SC and ID settings...
  • Page 170: Sleep Commands

    Command reference tables Sleep commands Node Command Name and Description Type Parameter Range Default Command Sequence Character. Set/Read the ASCII 0 - 0xFF 0x2B character value to be used between Guard Times of the AT (‘+’ ASCII) Command Mode Sequence (GT + CC + GT). The AT Command Mode Sequence enters the RF module into AT Command Mode.
  • Page 171: Execution Commands

    Command reference tables Execution commands Node Command Name and Description Type Parameter Range Default Wake Host. Set/Read the wake host timer value. If the wake 0 - 0xFFFF (x 1ms) host timer is set to a non-zero value, this timer specifies a time (in millisecond units) that the device should allow after waking from sleep before sending data out the UART or transmitting an IO sample.
  • Page 172 Command reference tables Execution commands Parameter Command Name and Description Node Type Range Default Sleep Immediately. Cause a cyclic sleep module to sleep immediately rather than wait for the ST timer to expire. Commissioning Pushbutton. This command can be used to simulate commissioning button presses in software.
  • Page 173 Command reference tables Execution commands Parameter Command Name and Description Node Type Range Default Destination Node. Resolves an NI (Node Identifier) string to a up to 20-Byte physical address (case-sensitive). The following events occur after printable ASCII the destination node is discovered: string <AT Firmware>...
  • Page 174: Module Support

    ........... . . 175 Design considerations for Digi drop-in networking .
  • Page 175: Power Up The Module At 9600 Baud

    API frames at 9600 baud until an API frame applies changes. XCTU Digi provides XCTU for configuring module parameters and updating firmware. XCTU has the capability to do the following: Discover all XBee devices in the network ...
  • Page 176: Xbee Bootloader

    Ember's standalone bootloader, but with a modified entry mechanism. The modified entry mechanism uses module pins 3, 9, and 16 (DIN, DTR, and RTS respectively). The XCTU program can update firmware serially on the XBee and XBee-PRO ZB modules. Contact Digi support for details.
  • Page 177: Sif Firmware Updates

    Module support Programming XBee modules 2 Send an ASCII 1 character to initiate a firmware update 3 After sending a 1, the EM250 waits for an XModem CRC upload of an .ebl image over the serial line at 115200 b/ s.
  • Page 178: Writing Custom Firmware

    Module support Writing custom firmware CAUTION! If programming firmware through the SIF interface, be aware that uploading firmware through the SIF header can potentially erase the XBee bootloader. If this happens, serial firmware updates will not work. The pinout for the SIF headers are shown in Overview on page 9.
  • Page 179: Detecting Xbee Versus Xbee-Pro

    XBee modules manufactured before February 2008 had an incorrect configuration setting that caused the default output power mode to be set incorrectly. Digi's ZB and ZNet firmware compensate for this by setting the output power mode in the application firmware.
  • Page 180: Improving Low Power Current Consumption

    Module support Improving low power current consumption GPIO_DIRSETL = GPIO(1) | GPIO(2);// Set GPIO 1,2 as outputs GPIO_CLRL = GPIO(1);// Drive GPIO 1 low GPIO_SETL = GPIO(2);// Drive GPIO 2 high Improving low power current consumption To improve low power current consumption, the XBee should set a couple of unused IO lines as output low. This can be done during application initialization as shown below.
  • Page 181: Definitions

    Definitions ZigBee Node Types Coordinator A node that has the unique function of forming a network. The coordinator is responsible for establishing the operating channel and PAN ID for an entire network. Once established, the coordinator can form a network by allowing routers and end devices to join to it. Once the network is formed, the coordinator functions like a router (it can participate in routing packets and be a source or destination for data packets).
  • Page 182: Definitions

    Definitions Joining The process of a node becoming part of a ZigBee PAN. A node becomes part of a network by joining to a coordinator or a router (that has previously joined to the network). During the process of joining, the node that allowed joining (the parent) assigns a 16-bit address to the joining node (the child).
  • Page 183: Agency Certifications

    Agency certifications United States FCC ..............184 OEM labeling requirements .
  • Page 184: United States Fcc

    IMPORTANT: The XBee and XBee PRO RF Module 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 185: Fcc-Approved Antennas (2.4 Ghz)

    (Cable-loss IS required when using gain antennas as shown below.) The antennas in the tables below have been approved for use with this module. Digi does not carry all of these antenna variants. Contact Digi Sales for available antennas.
  • Page 186 Agency certifications FCC-approved antennas (2.4 GHz) Antennas approved for use with the XBee RF Module Min. Separation Part Number Type (Description) Gain Application Required Cable-loss Yagi class antennas for channels 11 - 26 A24-Y6NF Yagi (6-element) 8.8 dBi Fixed 7.8 dB A24-Y7NF Yagi (7-element) 9.0 dBi...
  • Page 187 Agency certifications FCC-approved antennas (2.4 GHz) Antennas approved for use with the XBee RF Module Min. Separation Part Number Type (Description) Gain Application Required Cable-loss A24-F15NF Omni-directional (Fiberglass base station) 15.0 dBi Fixed 12.3 dB A24-W7NF Omni-directional (Base station) 7.2 dBi Fixed 4.5 dB A24-M7NF...
  • Page 188 Agency certifications FCC-approved antennas (2.4 GHz) Antennas approved for use with the XBee-PRO (S2) RF Module Min. Part Separation Number Type (Description) Gain Application Required Cable-loss A24-F5NF Omni-directional (Fiberglass base station) 5.0 dBi Fixed/Mobile 20 cm A24-F8NF Omni-directional (Fiberglass base station) 8.0 dBi Fixed A24-F9NF...
  • Page 189: Rf Exposure

    Agency certifications RF exposure Antennas approved for use with the XBee-PRO (S2B) RF Module Minimum Cable Loss/ Power Reduction/ Part Min. Attenuation Required Number Type (Description) Gain Application Separation for 18dBm Output A24-P16NF Flat Panel 16.0 dBi Fixed 2.8 dB Omni-directional antennas for channels 11 to 24 A24-F9NF Omni-directional (Fiberglass base...
  • Page 190: Europe

     Restrictions Digi does not list the entire set of standards that you must meet for each country. You assume full responsibility to learn and meet the required guidelines for each country in your distribution market. Refer to the regulatory agencies in those countries concerning compliance for products containing the XBee RF Module.
  • Page 191: Declarations Of Conformity

    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.
  • Page 192: Labeling Requirements

    Labeling requirements for Industry Canada are similar to those of the FCC. A clearly visible label on the outside of the final product enclosure must display the following text: Contains Model XBee Radio, IC: 4214A-XBEE2 The integrator is responsible for its product to comply with IC ICES-003 - Unintentional Radiators. ICES-003 is similar to FCC Part 15 Sub.
  • Page 193: Brazil (Anatel)

    Have a company/distributor/agent in Australia or New Zealand that will sponsor the importing of the end product. Contact Digi for questions related to locating a contact in Australia or New Zealand. Brazil (Anatel) These modules comply with requirements to be used in end products in Brazil.
  • Page 194: Migrating From Znet 2.5 To Xbee Zb

    Migrating from ZNet 2.5 to XBee ZB Command set ..............195 New features .
  • Page 195: Command Set

    Migrating from ZNet 2.5 to XBee ZB Command set This section describes the significant differences in XBee ZB compared to its predecessor, ZNet 2.5. Command set  Firmware versions  New features.  Command set The following ZNet 2.5 commands have changed for XBee ZB: ZA - Set / read the ZigBee Addressing enable command.

This manual is also suitable for:

Xbeepro2Pro s2b

Table of Contents