•XBee Wall Router. The XBee/XBee-PRO ZB firmware release can be installed on XBee ZNet or ZB modules. The XBee ZB firmware is based on the EmberZNet 3.x ZigBee PRO Feature Set mesh networking stack, while the XBee ZNet 2.5 firmware is based on Ember's proprietary "designed for ZigBee"...
XBee®/XBee‐PRO® ZB RF Modules Manual The XBee/XBee-PRO/S2B ZB 2x7x manual includes the following corrections over the 2x6x manual: •Descriptions and specification for the PRO S2B. •SIF Header Interface, pin 8 relabeled as pin 10. •Pin mappings for pins 22 and 24 updated. •New modem status codes were added.
Self-routing, self-healing and fault-tolerant mesh networking Worldwide Acceptance FCC Approval (USA) Refer to Appendix A for FCC Requirements. Systems that contain XBee®/ XBee-PRO® ZB RF Modules inherit Digi Certifications. ISM (Industrial, Scientific & Medical) 2.4 GHz frequency band Manufactured under ISO 9001:2000 registered standards XBee®/XBee-PRO®...
XBee®/XBee‐PRO® ZB RF Modules Specifications Specifications of the XBee®/XBee‐PRO® ZB RF Module Specification XBee XBee-PRO (S2) XBee-PRO (S2B) Performance Up to 300 ft. (90 m), up to 200 ft (60 m) Up to 300 ft. (90 m), up to 200 ft (60 m) Indoor/Urban Range up to 133 ft. (40 m)
The following specifications need to be added to the current measurement of the previous table if the module has the programmable secondary processor. For example, if the secondary processor is running and constantly collecting DIO samples at a rate while having the RF portion of the XBEE sleeping the new current will be I...
XBee module. The SIF header orientation and pinout are shown below. A male header can be populated on the XBee that mates with Ember's 2x5 ribbon cable. The male header and ribbon cables are available from Samtec: 2x5 Male Header - FTSH-105-01-F-DV-K 2x5 Ribbon Cable - FFSD-05-D-12.00-01-N...
XBee®/XBee‐PRO® ZB RF Modules Mounting Considerations The XBee module was designed to mount into a receptacle (socket) and therefore does not require any soldering when mounting it to a board. The XBee-PRO Development Kits contain RS-232 and USB interface boards which use two 20-pin receptacles to receive modules.
Output Output Module Status Indicator or Digital I/O 9 Not used for EM250. Used for programmable secondary processor. For compatibility with other XBEE modules, we VREF Input recommend connecting this pin voltage reference if Analog sampling is desired. Otherwise, connect to GND.
41 (GPIO 15) 42 (GPIO 14) 43 (GPIO 13) * NOTE: These lines may not go to the external XBEE pins of the module if the programmable secondary processor is populated. Design Notes The XBee modules do not specifically require any external circuitry or specific connections for proper operation.
7 for more details. The source and sink capabilities are limited to 4mA for all pins on the module. The VRef pin (pin 14) is not used on this module. For compatibility with other XBee modules, we recommend connecting this pin to a voltage reference if analog sampling is desired.
The S2B modules that have the programmable option populated have a secondary processor with 32k of flash and 2k of RAM. This allows module integrators to put custom code on the XBEE module to fit their own unique needs. The DIN, DOUT, RTS, CTS, and RESET lines are intercepted by the secondary processor to allow it to be in control of the data transmitted and received.
XBEE Programmable Bootloader Overview The Xbee Programmable module is equipped with a Freescale MC9S08QExx application processor. This application processor comes with a supplied bootloader. The following section describes how to interface the customer's application code running on this processor to the XBee Programmable module's supplied bootloader.
Page 21
XBee®/XBee‐PRO® ZB RF Modules Operation Upon reset of any kind, the execution control begins with the bootloader. If the reset cause is Power-On reset (POR), Pin reset (PIN), or Low Voltage Detect(LVD) reset the bootloader will not jump to the application code if the override bits are set to RTS(D7)=1, DTR(D5)=0, and DIN(B0)=0.
Page 22
XBee®/XBee‐PRO® ZB RF Modules Application Interrupt Vector table and Linker Command File Since the bootloader flash region is read-only, the interrupt vector table is redirected to the region 0xF1C0 to 0xF1FD so that application developers can use hardware interrupts. Note that in order for Application interrupts to function properly, the Application's linker command file (*.prm extension)
Over the Air (OTA) updates without local intervention.) a. The XBee module sending the file OTA (Host module) should be set up with a series 2 Xbee module with transparent mode firmware.
Page 25
XBee®/XBee‐PRO® ZB RF Modules Bootloader updates The supplied bootloader requires files in a "flat binary" format which differs from the default ABS file produced. The Codewarrior tool also produces a S19 output file. In order to successfully flash new applications, the S19 file must be converted into the flat binary format. Utilities are available on the web that will convert S19 output to "BIN"...
(baud rate, parity, start bits, stop bits, data bits). The UART baud rate, parity, and stop bits settings on the XBee module can be configured with the BD, NB, and SB commands respectively. See the command table in chapter 10 for details.
XBee®/XBee‐PRO® ZB RF Modules TInternal Data Flow Diagram Serial RF TX Receiver Transmitter Buffer Buffer RF Switch Antenna Processor Port RF RX Serial Transmit DOUT Receiver Buffer Buffer Serial Receive Buffer When serial data enters the RF module through the DIN Pin (pin 3), the data is stored in the serial receive buffer until it can be processed.
RF data packet will be discarded. Note: If the XBee is sending data out the UART when RTS is de-asserted (set high), the XBee could send up to 5 characters out the UART after RTS is de-asserted.
Page 29
XBee®/XBee‐PRO® ZB RF Modules A Comparison of 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...
XBee®/XBee‐PRO® ZB RF Modules 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) •Receive Mode (Valid RF data is received through the antenna)
In this case, the source will retransmit the data, which could cause the destination 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 See Data Transmission and Routing in chapter 4 for more information.
Sleep Mode Sleep modes allow the RF module to enter states of low power consumption when not in use. The XBee RF modules support both pin sleep (sleep mode entered on pin transition) and cyclic sleep (module sleeps for a fixed time).
3. XBee ZigBee Networks 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. The Alliance is made up of over 300 members, including semiconductor, module, stack, and software developers.
XBee®/XBee‐PRO® ZB RF Modules A router has the following characteristics: it •Must join a ZigBee PAN before it can transmit, receive, or route data •After joining, can allow routers and end devices to join the network •After joining, can assist in routing data •Cannot sleep--should be mains powered.
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. See the API Operations chapter for details.
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 the Explicit Addressing ZigBee Command API frame in chapter 3 for details.
The coordinator will retain this information indefinitely until it leaves the network. When the coordinator leaves a network and starts a new network, the previous PAN ID, operating channel, and child table data are lost. XBee ZB Coordinator Startup The following commands control the coordinator network formation process.
If NJ < 0xFF, joining will be enabled only for a number of seconds, based on the NJ parameter. The timer is started once the XBee joins a network. Joining will not be re-enabled if the module is power cycled or reset.
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.
The ZigBee Alliance requires that certified solutions not send beacon request messages too frequently. To meet certification requirements, the XBee firmware attempts 9 scans per minute for the first 5 minutes, and 3 scans per minute thereafter. If a valid PAN is within range of a joining router, it should typically be discovered within a few seconds.
The router will retain this information indefinitely until it leaves the network. When the router leaves a network, the previous PAN ID, operating channel, and child table data are lost. XBee ZB Router Joining When the router is powered on, if it is not already joined to a valid ZigBee network, it immediately attempts to find and join a valid ZigBee network.
Page 42
XBee®/XBee‐PRO® ZB RF Modules The following commands control the router joining process. Command Description Sets the 64-bit PAN ID to join. Setting ID=0 allows the router to join any 64-bit PAN ID. Set the scan channels bitmask that determines which channels a router will scan to find a valid network.
If NJ < 0xFF, joining will be enabled only for a number of seconds, based on the NJ parameter. The timer is started once the XBee joins a network. Joining will not be re-enabled if the module is power cycled or reset. The following mechanisms can restart the permit-joining timer: •Changing NJ to a different value (and applying changes with the AC or CN commands)
Page 44
XBee®/XBee‐PRO® ZB RF Modules Network Watchdog The NW command (network watchdog timeout) can be used for a powered router to periodically check for the presence of a coordinator to verify network connectivity. The NW command specifies a timeout in minutes where the router must receive communication from the coordinator or data collector. The following events restart the network watchdog timer: •RF data received from the coordinator...
XBee®/XBee‐PRO® ZB RF Modules 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 There are a couple of mechanisms that will cause the router to leave its current PAN and attempt to discover and join a new network based on its network joining parameter values.
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.
9 scans per minute for the first 5 minutes, and 3 scans per minute thereafter. Note: The XBee ZB end device will not enter sleep until it has completed scanning all SC channels for a valid network.
Otherwise, it will attempt to discover and join a valid network. XBee: ZB End Device Joining When an end device is powered on, if it is not joined to a valid ZigBee network, or if the orphan scan fails to find a parent, it immediately attempts to find and join a valid ZigBee network.
Note that changes to command values only take effect when changes are applied (AC or CN commands). 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.
11, 12, 13, 14, and 25 have been scanned (in that order). Once an XBee router or end device joins a network on a given channel, if the XBee is told to leave (see "Leaving a Network"...
Layers - In Depth" in chapter 3.) 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 •Utilize service and network management capabilities of the ZDO •Operate on a public application profile such as Home Controls or Smart Energy.
Buffer spacing is handled automatically by the XBee module. Since broadcast transmissions are retransmitted by each device in the network, broadcast messages should be used sparingly.
Page 54
10 devices, the application should implement an address table to store the 16-bit and 64-bit addresses for each remote device. Any XBee that will send data to more than 10 remotes should also use API firmware. The application can then send both the 16-bit and 64-bit addresses to the XBee in the API transmit frames which will significantly reduce the number of 16-bit address discoveries and greatly improve data throughput.
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.
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.
XBee®/XBee‐PRO® ZB RF Modules Routing Approach Description When to Use Ad hoc On-demand Routing paths are created between source and Use in networks that will not scale beyond about Distance Vector (AODV) destination, possibly traversing multiple nodes 40 destination devices. Mesh Routing (“hops”). Each device knows who to send data...
XBee®/XBee‐PRO® ZB RF Modules This mechanism enables devices A and B to recognize that the link is not reliable in both directions and select a different neighbor when establishing routes. (Such links are called asymmetric links, meaning the link quality is not similar in both directions.) When a router or coordinator device powers on, it sends link status messages every couple seconds to attempt to discover link qualities with its neighbors quickly.
Page 59
XBee®/XBee‐PRO® ZB RF Modules network (refer to the Broadcast Transmission), each node that re-broadcasts the message updates the path cost field and creates a temporary entry in its route discovery table. 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.
XBee®/XBee‐PRO® ZB RF Modules direction. If the originator fails to receive this Ack, it will retransmit the data, up to 2 times until an Ack is received. This Ack is called the ZigBee APS layer acknowledgment. Refer to the ZigBee specification for more details.
Page 61
XBee®/XBee‐PRO® ZB RF Modules The data collector sends a Many-to-One route request broadcast to create reverse routes on all devices. After obtaining a source route, the data A remote device sends an RF data packet collector sends a source routed to the data collector. (This is prefaced by transmission to the remote device.
Page 62
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...
See chapter 5 for details. Maximum RF Payload Size XBee ZB firmware includes a command (ATNP) that returns the maximum number of RF payload bytes that can be sent in a unicast transmission. Querying the NP command, like most other commands, returns a HEXADECIMAL value.
XBee®/XBee‐PRO® ZB RF Modules •Broadcast transmissions can support 8 bytes more than unicast transmissions. •If source routing is used, the 16-bit addresses in the source route are inserted into the RF payload space. For example, if NP returns 84 bytes, and a source route must traverse 3 intermediate hops (3 16-bit addresses), the total number of bytes that can be sent in one RF packet is 78.
Receiving ZDO Commands and Responses In XBee ZB firmware, ZDO commands can easily be sent using the API. In order to receive incoming ZDO commands, receiver application addressing must be enabled with the AO command. (See examples later in this section.)
XBee®/XBee‐PRO® ZB RF Modules 0x00 - Broadcast radius 0x00 - Tx Options 0x76 - Transaction sequence number 0x00 - Required payload for LQI request command 0xCE - Checksum (0xFF - SUM (all bytes after length)) Description: This API frame sends a ZDO LQI request (neighbor table request) to a remote device to obtain data from its neighbor table.
XBee®/XBee‐PRO® ZB RF Modules The XBee API includes a transmit options bit that can be set to specify if the extended timeout should be used for a given transmission. If this bit is set, the extended timeout will be used when sending RF data to the specified destination.
0xFFFF, all devices, including sleeping end devices can receive this broadcast. If receiver application addressing is enabled, the XBee will report all received data frames in the explicit format (0x91) to indicate the source and destination endpoints, cluster ID, and profile ID that each packet was received on.
Page 69
0x65 - Checksum (0xFF - SUM (all bytes after length)) Description: 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.
APS layer link key. High security adds entity authentication, and a number of other features not widely supported. XBee ZB modules primarily support standard security, although end devices that support residential security can join and interoperate with standard security devices. The remainder of this chapter focuses on material that is relevant to standard security.
XBee®/XBee‐PRO® ZB RF Modules 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. If a device receives a packet from a neighbor with a smaller frame counter than it has previously seen, the packet is discarded.
XBee®/XBee‐PRO® ZB RF Modules 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.
Implementing Security on the XBee If security is enabled in the XBee ZB firmware, devices acquire the network key when they join a network. Data transmissions are always encrypted with the network key, and can optionally be end-to-end encrypted with the APS link key.
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 (e.g. 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.
- for example, EE=1. This is not the correct notation for setting command values in the XBee. In AT command mode, each command is issued with a leading 'AT' and no '=' sign - for example ATEE1.
Page 76
XBee®/XBee‐PRO® ZB RF Modules 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 d. WR (save networking parameters to preserve them through power cycle) 3.
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.
All ZigBee devices send a ZDO Device Announce broadcast transmission when they join a ZigBee network (ZDO cluster ID 0x0013). These frames will be sent out the XBee's UART as an Explicit Rx Indicator API frame (0x91) if AO is set to 1. The device announce payload includes the following information: [ Sequence Number] + [16-bit address] + [64-bit address] + [Capability] The 16-bit and 64-bit addresses are received in little-endian byte order (LSB first).
XBee®/XBee‐PRO® ZB RF Modules Push button XBee Associate A pushbutton and an LED can be connected to module pins 20 and 15 respectively to support the commissioning pushbutton and associate LED functionalities. Commissioning Pushbutton The commissioning pushbutton definitions provide a variety of simple functions to aid in deploying devices in a network.
XBee®/XBee‐PRO® ZB RF Modules 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 81
XBee®/XBee‐PRO® ZB RF Modules Broadcast Node Identification Transmission Associate Pin (D5 = 1) AD0/DIO0 Pin (Remote Device) A single button press on a remote device causes a broadcast node identification transmission to be sent. All devices that receive this transmission blink their associate pin rapidly for one second if the associate LED functionality is enabled.
XBee®/XBee‐PRO® ZB RF Modules The parent can buffer one broadcast transmission for all of its end device children. When a broadcast transmission is received and buffered, the parent sets a flag in its child table when each child polls and retrieves the packet. Once all children have received the broadcast packet, the buffered broadcast packet is discarded.
CTS flow control. When the XBee wakes from sleep, the On/Sleep pin is asserted (high), and if flow control is enabled, the CTS pin is also asserted (low). If the module has not joined a network, it will scan all SC channels after waking to try and find a valid network to join.
Page 85
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.
4 or 5. SM5 is a slight variation of SM4 that allows the module to be woken prematurely by asserting the Sleep_RQ pin (pin 9). In SM5, the XBee can wake after the sleep period expires, or if a high-to- low transition occurs on the Sleep_RQ pin.
Page 87
XBee®/XBee‐PRO® ZB RF Modules 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 88
0x04 - Enable extended sleep (sleep for full (SP * SN) time) The XBee module supports both a short cyclic sleep and an extended cyclic sleep that make use of these commands. These two modes allow the sleep period to be configured according to the application requirements.
Transmitting poll request to parent ∆t = SP ∆t = SP Setting SN > 1 allows the XBee to silently poll for data without asserting On /Sleep. If RF data is received when polling, On/Sleep will immediately assert . Legend...
7 for details. Parent Verification Since an end device relies on its parent to maintain connectivity with other devices in the network, XBee end devices include provisions to verify its connection with its parent. End devices monitor their link with their parent when sending poll messages and after a power cycle or reset event as described below.
XBee®/XBee‐PRO® ZB RF Modules The value of these timeouts depends on the sleep time used by the end devices. Each of these timeouts are discussed below. RF Packet Buffering Timeout When a router or coordinator receives an RF data packet intended for one of its end device children, it buffers the packet until the end device wakes and polls for the data, or until a packet buffering timeout occurs.
- for example, SM=4. This is not the correct notation for setting command values in the XBee. In AT command mode, each command is issued with a leading 'AT' and no '=' sign - for example ATSM4.
Page 93
XBee®/XBee‐PRO® ZB RF Modules IR = 0x258 (600 decimal). Set IR to a value greater than (2 seconds / 4) to get 4 samples in 2 seconds. The end device sends an IO sample at the IR rate until the sleep timer has expired.
IO Sampling The XBee ZB modules have the ability to monitor and sample the analog and digital IO lines. IO samples can be read locally or transmitted to a remote device to provide indication of the current IO line states. (Only API firmware devices can send remote IO sample data out their UART.)
Page 95
XBee®/XBee‐PRO® ZB RF Modules •Queried 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.) Indicates which digital IO lines have sampling enabled. Each bit corresponds to one digital IO line on the module.
RSSI PWM The XBee module features an RSSI/PWM pin (pin 6) that, if enabled, will adjust the PWM output to indicate the signal strength of the last received packet. The P0 (P-zero) command is used to enable the RSSI pulse width modulation (PWM) output on the pin.
RSSI (in dBm) is converted to PWM counts using the following equation: PWM counts = (41 * RSSI_Unsigned) - 5928 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.
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 99
Identifier-specific Data cmdID cmdData 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 and Values API Frame Names...
To verify: Add all bytes (include checksum, but not the delimiter and length). If the checksum is correct, the sum will equal 0xFF. API Examples Example: Create an API AT command frame to configure an XBee to allow joining (set NJ to 0xFF). The frame should look like: 0x7E 0x00 0x05 0x08 0x01 0x4E 0x4A 0xFF 5F...
XBee®/XBee‐PRO® ZB RF Modules API UART Exchanges AT Commands The following image shows the API frame exchange that takes place at the UART when sending an AT command request to read or set a module parameter. The response can be disabled by setting the frame ID to 0 in the request.
XBee®/XBee‐PRO® ZB RF Modules Source Routing The following image shows the API frame exchanges that take place at the UART when sending a source routed transmission. Supporting the API Applications that support the API should make provisions to deal with new API frames that may be introduced in future releases.
XBee®/XBee‐PRO® ZB RF Modules Frame Fields Offset Example Description Start Delimiter 0 0x7E Length MSB 1 0x00 Number of bytes between the length and the checksum LSB 2 0x04 Frame-specific Data Frame Type 3 0x08 Identifies the UART data frame for the host to correlate...
Page 104
XBee®/XBee‐PRO® ZB RF Modules The broadcast radius can be set from 0 up to NH. If set to 0, the value of NH specifies the broadcast radius (recommended). This parameter is only used for broadcast transmissions. The maximum number of payload bytes can be read with the NP command.
XBee®/XBee‐PRO® ZB RF Modules Example: The example above shows how to send a transmission to a module where escaping is disabled (AP=1) with destination address 0x0013A200 40014011, payload "TxData1B". If escaping is enabled (AP=2), the frame should look like: 0x7E 0x00 0x16 0x10 0x01 0x00 0x7D 0x33 0xA2 0x00 0x40 0x0A 0x01 0x27...
Page 106
XBee®/XBee‐PRO® ZB RF Modules Frame Fields Offset Example Description Start Delimiter 0 0x7E Length MSB 1 0x00 Number of bytes between the length and the checksum LSB 2 0x1A Frame-specific Data Frame Type 3 0x11 Identifies the UART data frame for the host to correlate...
XBee®/XBee‐PRO® ZB RF Modules Remote AT Command Request Frame Type: 0x17 Used to query or set module parameters on a remote device. For parameter changes on the remote device to take effect, changes must be applied, either by setting the apply changes options bit, or by sending an AC command to the remote.
XBee®/XBee‐PRO® ZB RF Modules 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.
XBee®/XBee‐PRO® ZB RF Modules AT Command Response Frame Type: 0x88 In response to an AT Command message, the module will send an AT Command Response message. Some commands will send back multiple frames (for example, the ND (Node Discover) command). Frame Fields Offset Example...
XBee®/XBee‐PRO® ZB RF Modules 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...
Page 112
XBee®/XBee‐PRO® ZB RF Modules 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 Start Delimiter 0 0x7E Length MSB 1 0x00 Number of bytes between the length and the checksum...
XBee®/XBee‐PRO® ZB RF Modules 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 Start Delimiter 0 0x7E Length MSB 1 0x00...
XBee®/XBee‐PRO® ZB RF Modules ZigBee IO Data Sample Rx Indicator Frame Type: 0x92 When the module receives an IO sample frame from a remote device, it sends the sample out the UART using this frame type (when AO=0). Only modules running API firmware will send IO samples out the UART.
Page 115
DIO3 is enabled as a digital output (low) the IO sample is shown in the API example in the table above. 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 116
XBee®/XBee‐PRO® ZB RF Modules T = 0x016A To convert these to temperature and humidity values, the following equations should be used. Temperature (°C) = (T / 16), for T < 2048 = - (T & 0x7FF) / 16, for T >= 2048 Vsupply = (AD2 * 5.1) / 255 Voutput = (AD3 * 5.1) / 255...
30 0x01 command). 3 = Frame sent after power cycle event occurred (see JN command). 31 0xC1 Digi Profile ID Set to Digi's application profile ID. 32 0x05 33 0x10 Manufacturer ID Set to Digi's Manufacturer ID. 34 0x1E Checksum 35 0x1B 0xFF - the 8 bit sum of bytes from offset 3 to this byte.
Page 118
XBee®/XBee‐PRO® ZB RF Modules Example: 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 preceding node identification indicator would be received. Please note that 00 03 00 00 appears before the checksum with the DD value only if ATNO &...
XBee®/XBee‐PRO® ZB RF Modules Over-the-Air Firmware Update Status Frame Type: 0xA0 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.
XBee®/XBee‐PRO® ZB RF Modules 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 121
XBee®/XBee‐PRO® ZB RF Modules 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 Example Description Start Delimiter 0 0x7E MSB 1 0x00 Length Number of bytes between the length and the checksum...
64-bit addresses) must be sent in little endian byte order for the command to be executed correctly on a remote device. For an API XBee to receive ZDO responses, the AO command must be set to 1 to enable the explicit receive API frame.
XBee®/XBee‐PRO® ZB RF Modules Frame Fields Offset Example Description Start Delimiter 0 0x7E Length MSB 1 0x00 Number of bytes between the length and the checksum LSB 2 0x17 Frame Type 3 0x11 Identifies the UART data frame for the host to correlate...
Page 124
XBee®/XBee‐PRO® ZB RF Modules Sending ZigBee Cluster Library (ZCL) Commands with the API The ZigBee Cluster Library defines a set of attributes and commands (clusters) that can be supported in multiple ZigBee profiles. The ZCL commands are typically required when developing a ZigBee product that will interoperate in a public profile such as home automation or smart energy, or when communicating with ZigBee devices from other vendors.
XBee®/XBee‐PRO® ZB RF Modules The following table shows how the Explicit API frame can be used to read the hardware version attribute from a device with a 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).
Page 126
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 127
XBee®/XBee‐PRO® ZB RF Modules Frame Fields Offset Example Description Start Delimiter 0 0x7E Length MSB 1 0x00 Number of bytes between the length and the checksum LSB 2 0x19 Frame Type 3 0x11 Identifies the UART data frame for the host to correlate...
XBee®/XBee‐PRO® ZB RF Modules Frame Fields Offset Example Description 26 0x78 4-byte unique identifier. Note the 4-byte ID is sent in little endian byte order 27 0x56 (0x78563412). Issuer Event ID 28 0x34 The event ID in this example (0x12345678) was arbitrarily selected.
Page 130
XBee®/XBee‐PRO® ZB RF Modules Register Joining Device Frame Type: 0x24 Frame Fields Offset Example Description Start Delimiter MSB 1 Length LSB 2 Identifies the UART data frame for the host to match with Frame ID a subsequent response. If zero, no response is requested.
Page 131
SE is only 0 - 0xFF 0xE8 supported in AT firmware.The default value 0xE8 (Data endpoint) is the Digi data endpoint Destination Endpoint. Set/read Zigbee application layer destination ID value. This value will be used as the destination endpoint all data transmissions.
Page 132
Coordinator / Router to join during Association. Scan Time is measured as:(# Channels to Scan) * (2 ^ SD) * 15.36ms - The number of channels to scan is determined by the SC parameter. The XBee can scan up to 16 channels (SC = 0xFFFF).
Page 133
XBee®/XBee‐PRO® ZB RF Modules Networking Commands Node AT Name and Description Parameter Range Default Command Type Node Join Time. Set/Read the time that a Coordinator/Router allows nodes to join. This value can be changed at run time without requiring a Coordinator or Router to restart.
Page 134
4 = 10dBm Power Level. Select/Read the power level at which the RF module transmits conducted power. For XBee-PRO (S2B) Power Level 4 is calibrated and the other power levels are XBee-PRO (S2B) approximate. For XBee (S2), onlythe default power level (PL=4) is guaranteed from -40 (Boost mode enabled) to 85°...
Page 135
XBee®/XBee‐PRO® ZB RF Modules Serial Interfacing (I/O) Serial Interfacing Commands Node AT Name and Description Parameter Range Default Command Type 1 - 2 API Enable. Enable API Mode. 1 = API-enabled 2 = API-enabled The AP command is only supported when using API firmware: 21xx (API coordinator), (w/escaped control...
Page 136
XBee®/XBee‐PRO® ZB RF Modules I/O Commands I/O Commands Node AT Name and Description Parameter Range Default Command Type IO Sample Rate. Set/Read the IO sample rate to enable periodic sampling. For periodic sampling to be enabled, IR must be set to a non-zero value, and at least one module pin 0, 0x32:0xFFFF (ms) must have analog or digital IO functionality enabled (see D0-D8, P0-P2 commands).
Page 137
0-0xFFFF Given the operating Vcc ranges for different platforms, and scaling by 1024/1200, the useful parameter ranges are: XBee 2100-3600 mV 0,0x0700-0x0c00 PRO 3000-3400 mV, 0,0x0a00-0x0b55 S2B 2700-3600 mV, 0,0x0900-0x0c00 Reads the module temperature in Degrees Celsius. Accuracy +/- 7 degrees.
0 - 0xFFFF [read-only] Factory-set 0x1Exx XBee ZB and XBee ZNet modules return the following (hexadecimal) values: 0x19xx - XBee module 0x1Axx - XBee-PRO module Association Indication. Read information regarding last node join request: 0x00 - Successfully formed or joined a network. (Coordinators form a network, routers and end devices join a network.)...
Command Type 0-Sleep disabled (router) Sleep Mode Sets the sleep mode on the RF module. An XBee loaded with router 0 - Router 1-Pin sleep enabled firmware can be configured as either a router (SM set to 0) or an end device (SM > 0).
Page 140
Force Sample Forces a read of all enabled digital and analog input lines. XBee Sensor Sample. Forces a sample to be taken on an XBee Sensor device. This command can only be issued to an XBee sensor device using an API remote command.
This chapter provides customization information for the XBee/XBee-PRO ZB modules. In addition to providing an extremely flexible and powerful API, the XBee and XBee-PRO ZB modules are a robust development platform that have passed FCC and ETSI testing. Developers can customize default parameters, or even write or load custom firmware for Ember's EM250 chip.
WR (write config settings). Serial Firmware Updates Serial firmware updates make use of the XBee custom bootloader which ships in all units. This modified bootloader is based on 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).
XBee bootloader. If this happens, serial firmware updates will not work. Regulatory Compliance XBee modules are FCC and ETSI certified for operation on all 16 channels. The EM250 output power can be configured up to 3dBm with boost mode enabled.
The GPIO1 pin on the EM250 is used to identify the module type (see table 1-03 in chapter 1). GPIO1 is connected to ground on the XBee module. The following code could be used to determine if a module is an XBee or XBee-PRO: GPIO_DIRCLRL = GPIO(1);// Set GPIO1 as an input...
XBee (non-PRO) Initialization: /* GPIO 1 and 2 are not used in the XBee (non-PRO) and should be set as outputs and driven low to reduce current draw. */ GPIO_DIRSETL = GPIO(1) | GPIO(2);// Set GPIO 1,2 as outputs GPIO_CLRL = GPIO(1) | GPIO(2);// Set GPIO 1,2 low...
-- 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. Router A node that creates/maintains network information and uses this information to determine the best route for a data packet. A router must join a network before it can allow other routers and end devices to join to it.
Page 147
XBee®/XBee‐PRO® ZB RF Modules ZigBee Protocol Personal Area Network - A data communication network that includes a coordinator and one or more routers/end devices. 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).
Appendix B: Agency Certifications United States FCC The XBee RF Module complies with Part 15 of the FCC rules and regulations. Compliance with the labeling requirements, FCC notices and antenna usage guidelines is required. To fulfill FCC Certification, the OEM must comply with the following regulations: 1.The system integrator must ensure that the text on the external label provided with this...
Page 149
15.203 (Unique Antenna Connectors) and Section 15.247 (Emissions). XBee RF Modules: XBee RF Modules have been tested and approved for use with all the antennas listed in the tables below. (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.
Page 150
XBee®/XBee‐PRO® ZB RF Modules Antennas approved for use with the XBee RF Module YAGI CLASS ANTENNAS for Channels 11 - 26 Min. Separation Part Number Type (Description) Gain Application* Cable-loss Required A24-Y6NF Yagi (6-element) 8.8 dBi Fixed 7.8 dB A24-Y7NF Yagi (7-element) 9.0 dBi Fixed 8 dB A24-Y9NF Yagi (9-element) 10.0 dBi...
Page 151
XBee®/XBee‐PRO® ZB RF Modules Antennas approved for use with the XBee‐PRO (S2) RF Module YAGI CLASS ANTENNAS for Channels 11 - 24 Min. Separation Part Number Type (Description) Gain Application* Cable-loss Required A24-Y6NF Yagi (6-element) 8.8 dBi Fixed A24-Y7NF Yagi (7-element) 9.0 dBi Fixed A24-Y9NF Yagi (9-element) 10.0 dBi Fixed A24-Y10NF Yagi (10-element) 11.0 dBi...
Page 152
XBee®/XBee‐PRO® ZB RF Modules Antennas approved for use with the XBee‐PRO (S2B) RF Module YAGI CLASS ANTENNAS for Channels 11 to 24 Minimum Cable Loss/ Power Reduction/ Part Number Type (Description) Gain Application* Min. Separation Attenuation Required for 18dBm Output A24-Y6NF Yagi (6-element) 8.8 dBi Fixed A24-Y7NF Yagi (7-element) 9.0 dBi Fixed...
Page 153
XBee®/XBee‐PRO® ZB RF Modules Europe (ETSI) The XBee RF Modules have been certified for use in several European countries. For a complete list, refer to www.digi.com If the XBee RF Modules are incorporated into a product, the manufacturer must ensure compliance of the final product to the European harmonized EMC and low-voltage/safety standards.
Page 154
Unintentional Radiators. ICES-003 is the same as FCC Part 15 Sub. B and Industry Canada accepts FCC test report or CISPR 22 test report for compliance with ICES-003. If it contains an XBee-PRO (S2) RF Module, the clearly visible label on the outside of the final product enclosure must display the following text:...
•ZA - Set / read the ZigBee Addressing enable command. This command was required in ZNet 2.5 to enable application level addressing commands SE, DE, CI. XBee ZB does not support ZA. The SE, DE, and CI values always determine the application level addressing values.
Appendix D:Additional Information 1-Year Warranty XBee RF Modules from Digi International, Inc. (the "Product") are warranted against defects in materials and workmanship under normal use, for a period of 1-year from the date of purchase. In the event of a product failure due to materials or workmanship, Digi will repair or replace the defective product. For warranty service, return the defective product to Digi International, shipping prepaid, for prompt repair or replacement.
Need help?
Do you have a question about the XBee and is the answer not in the manual?
Questions and answers