A24-HASM-450 ETC2

Document overview

  • Manufacturer or author: Provided By www.digicamel.com(FREE DATASHEET DOWNLOAD SITE)
  • PDF pages: 60

Technical content

Datasheet sections

355 South 520 West, Suite 180

Lindon, UT 84042 Phone: (801) 765-9885 Fax: (801) 765-9895 rf-xperts@maxstream.net www.MaxStream.net (live chat support) XBee™ Series 2 OEM RF Modules XBee Series 2 OEM RF Modules ZigBee ™ Networks RF Module Operation RF Module Configuration Appendices Product Manual v1.x.1x - ZigBee Protocol For OEM RF Module Part Numbers: XB24-BxIT-00x /g3 ZigBee OEM RF Modules by MaxStream, Inc. - a Digi International brand Firmware Versions: 1.0xx - Coordinator, Transparent Operation /g3 1.1xx - Coordinator, API Operation /g3 1.2xx - Router, End Device, Transparent Operation /g3 1.3xx - Router, End Device, API Operation /g3 90000866_A 2007.06.01

XBee /g561OEM /g561RF /g561Modules /g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 ii © 2007 Digi International, Inc. All rights reserved No /g561part/g561of/g561the /g561contents/g561of/g561this/g561manual/g561may /g561be /g561transmitted /g561or/g561reproduced /g561in /g561any /g561 form /g561or/g561by /g561any /g561means/g561without/g561the /g561written /g561permission /g561of/g561Digi/g561International,/g561Inc. ZigBee ®/g561is/g561a/g561registered /g561trademark /g561of/g561the /g561ZigBee /g561Alliance. XBee™ /g561Series/g5612/g561/g561 is/g561a/g561trademark /g561of/g561Digi/g561International,/g561Inc. Technical /g561Support: /g561 Phone:/g561(801)/g561765 /g5569885 Live /g561Chat:/g561www.maxstream.net E/g556mail:/g561rf/g556xperts@maxstream.net

©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 4 1. /g561XBee /g561Series /g5612/g561OEM/g561RF /g561Modules The XBee Series 2 OEM RF Modules were engineered to operate within the ZigBee protocol and support the unique needs of low-cost, low-power wireless sensor networks. The modules require minimal power and provide reliable delivery of data between remote devices. The modules operate within the ISM 2.4 GHz frequency band. 1.1. Key Features 1.1.1. Worldwide Acceptance FCC Approval (USA) Refer to Appendix A [p50] for FCC Requirements. /g3 Systems that contain XBee Series 2 RF Modules inherit MaxStream Certifications. ISM (Industrial, Scientific & Medical) 2.4 GHz frequency band Manufactured under ISO 9001:2000 registered standards XBee Series 2 RF Modules are optimized for use in US , Canada , Australia, Israel and Europe (contact MaxStream for complete list of agency approvals). High Performance, Low Cost

  • Indoor/Urban: up to 133’ (40 m)
  • Outdoor line-of-sight: up to 400’ (120 m)
  • Transmit Power: 2 mW (+3 dBm)
  • Receiver Sensitivity: -95 dBm RF Data Rate: 250,000 bps Advanced Networking & Security Retries and Acknowledgements DSSS (Direct Sequence Spread Spectrum) Each direct sequence channel has over /g3 65,000 unique network addresses available Point-to-point, point-to-multipoint /g3 and peer-to-peer topologies supported Self-routing, self-healing and fault-tolerant /g3 mesh networking Low Power XBee Series 2
  • TX Current: 40 mA (@3.3 V)
  • RX Current: 40 mA (@3.3 V)
  • Power-down Current: < 1 µA @ 25 oC Easy-to-Use No configuration necessary for out-of box /g3 RF communications AT and API Command Modes for /g3 configuring module parameters Small form factor Extensive command set Free X-CTU Software /g3 (Testing and configuration software) Free & Unlimited Technical Support

XBee /g561Series /g5612/g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 5 Chapter /g5611/g561/g556/g561 XBee /g561Series /g5612/g561OEM /g561RF /g561Modules 1.2. Specifications Antenna Options: The ranges specified are typical when using the integrated Whip (1.5 dBi) and Dipole (2.1 dBi) antennas. The Chip antenna option provides advantages in its form factor; however, it typically yields shorter range than the Whip and Dipole antenna options when transmitting outdoors. For more information, refer to the “XBee Series 2 Antenna” application note located on MaxStream’s web site /g3 http://www.maxstream.net/support/knowledgebase/article.php?kb=153 Table /g5611/g55601. Specifications /g561of /g561the /g561XBee /g561Series /g5612/g561OEM/g561RF /g561Module /g561(PRELIMINARY) /g561/g561/g561 Specification XBee Series 2 Performance Indoor/Urban Range up to 133 ft. (40 m) Outdoor RF line-of-sight Range up to 400 ft. (120 m) Transmit Power Output /g3 (software selectable) 2mW (+3dBm) RF Data Rate 250,000 bps Serial Interface Data Rate (software selectable) 1200 - 230400 bps (non-standard baud rates also supported) Receiver Sensitivity -95 dBm (1% packet error rate) Power Requirements Supply Voltage 2.8 – 3.4 V Operating Current (Transmit) 40mA (@ 3.3 V) Operating Current (Receive) 40mA (@ 3.3 V) Power-down Current < 1 uA @ 25 oC General Operating Frequency Band ISM 2.4 GHz Dimensions 0.960” x 1.087” (2.438cm x 2.761cm) Operating Temperature -40 to 85º C (industrial) Antenna Options Integrated Whip, Chip, RPSMA, or U.F L Connector Networking & Security Supported Network Topologies Point-to-point, Point-t o-multipoint, Peer-to-peer & Mesh Number of Channels (software selectable) 16 Direct Sequence Channels Addressing Options PAN ID and Addresses, Cluster IDs and Endpoints (optional) Agency Approvals United States (FCC Part 15.247) Pending Industry Canada (IC) Pending Europe (CE) Pending

XBee /g561Series /g5612/g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 6 Chapter /g5611/g561/g556/g561 XBee /g561Series /g5612/g561OEM /g561RF /g561Modules 1.3. Mechanical Drawings Figure /g5611/g55601. Mechanical /g561drawings /g561of /g561the /g561XBee /g561Series /g5612/g561OEM/g561RF /g561Modules /g561(antenna /g561options /g561not /g561shown) /g3 ./g561 1.4. Mounting Considerations The XBee Series 2 RF Module (through-hole) was designed to mount into a receptacle (socket) and therefore does not require any soldering when mounting it to a board. The XBee Series 2 Development Kits contain RS-232 and USB interface boards which use two 20-pin receptacles to receive modules. Figure /g5611/g55602. XBee /g561Series /g5612/g561Module /g561Mounting /g561to /g561an /g561RS /g556232 /g561Interface /g561Board ./g561 The receptacles used on MaxStream development boards are manufactured by Century Interconnect. Several other manufacturers provide comparable mounting solutions; however, MaxStream currently uses the following receptacles:

  • Through-hole single-row receptacles - /g3 Samtec P/N: MMS-110-01-L-SV (or equivalent)
  • Surface-mount double-row receptacles - /g3 Century Interconnect P/N: CPRMSL20-D-0-1 (or equivalent)
  • Surface-mount single-row receptacles - /g3 Samtec P/N: SMM-110-02-SM-S MaxStream also recommends printing an outline of the module on the board to indicate the orientation the module should be mounted. XBee

XBee /g561Series /g5612/g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 7 Chapter /g5611/g561/g556/g561 XBee /g561Series /g5612/g561OEM /g561RF /g561Modules 1.5. Pin Signals Figure /g5611/g55603. XBee /g561Series /g5612/g561RF /g561Module /g561Pin /g561Number (top /g561sides/g561shown /g561/g556/g561 shields/g561on /g561bottom) Design Notes:

  • Minimum connections: VCC, GND, DOUT & DIN
  • Minimum connections to support firmware upgrades: VCC, GND, DIN, DOUT, RTS & DTR
  • Signal Direction is specified with respect to the module
  • Module includes a 30k Ohm resistor attached to RESET
  • Several of the input pull-ups can be configured using the PR command
  • Unused pins should be left disconnected Table /g5611/g55602. Pin /g561Assignments /g561for /g561the /g561XBee /g561Series /g5612/g561Modules /g3 (Low /g556asserted /g561signals/g561are /g561distinguished /g561with /g561a/g561horizontal/g561line /g561above /g561signal/g561name.) Pin # Name Direction Description

1 VCC - Power supply

2 DOUT Output UART Data Out

3 DIN / CONFIG

4 DIO8 Either Digital I/O 8

5 RESET

Input Module Reset (reset pulse must be at least 2 00 ns)

6 PWM0 / RSSI / DIO10 Output PWM Output 0 / RX Signal Strength Indicator / Digital IO

7 PWM / DIO11 Either Digital I/O 11

8 [reserved] - Do not connect

9 DTR

/ SLEEP_RQ/ DI8 Input Pin Sleep Control Line or Digi tal Input 8

10 GND - Ground

11 DIO4 Either Digital I/O 4

12 CTS / DIO7 Either Clear-to-Send Flow Control or Digital I/O 7

13 ON / SLEEP Output Module Status Indicator

14 [reserved] - Do not connect

15 Associate / DIO5 Either Associated Indicator, Digit al I/O 5

16 RTS

/ DIO6 Either Request-to-Send Flow Control, Digital I/O 6

17 AD3 / DIO3 Either Analog Input 3 or Digital I/O 3

18 AD2 / DIO2 Either Analog Input 2 or Digital I/O 2

19 AD1 / DIO1 Either Analog Input 1 or Digital I/O 1

20 AD0 / DIO0 Either Analog Input 0 or Digital I/O 0

XBee /g561Series /g5612/g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 8 Chapter /g5611/g561/g556/g561 XBee /g561Series /g5612/g561OEM /g561RF /g561Modules 1.6. Electrical Characteristics Table /g5611/g55603. DC /g561Characteristics /g561of /g561the /g561XBee /g561Series /g5612/g561(VCC /g561=/g5612.8 /g561/g556/g561 3.4 /g561VDC) Symbol Parameter Condition Min Typical Max Units VIL Input Low Voltage All Digital Inputs - - 0.2 * VCC V VIH Input High Voltage All Digital Inputs 0.8 * VCC - 0.1 8* VCC V VOL Output Low Voltage IOL = 2 mA, VCC >= 2.7 V - - 0.18*VCC V VOH Output High Voltage IOH = -2 mA, VCC >= 2.7 V 0.82*VCC - - V II IN Input Leakage Current VIN = VCC or GND, all inputs, per pin - - 0.5uA uA TX Transmit Current VCC = 3.3 V - 45 - mA RX Receive Current VCC = 3.3 V - 50 - mA PWR-DWN Power-down Current SM parameter = 1 - < 10 - uA

©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 9 2. /g561RF /g561Module /g561Operation 2.1. Serial Communications The XBee Series 2 OEM 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 (For example: Through a MaxStream proprietary RS-232 or USB interface board). 2.1.1. UART Data Flow Devices that have a UART interface can connect directly to the pins of the RF module as shown in the figure below. Figure /g5612/g55601. System /g561Data /g561Flow /g561Diagram /g561in /g561a/g561UART /g556interfaced /g561environment /g3 (Low /g556asserted /g561signals/g561distinguished /g561with /g561horizontal/g561line /g561over/g561signal/g561name.)Serial Data Data enters the module UART through the DIN (pin 3) as an asynchronous serial signal. The signal should idle high when no data is being transmitted. Each data byte consists of a start bit (low), 8 data bits (least significant bit first) and a stop bit (high). The following figure illustrates the serial bit pattern of data passing through the module. Figure /g5612/g55602. UART /g561data /g561packet /g5610x1F /g561(decimal /g561number /g561/g520 31 /g520)/g561as /g561transmitted /g561through /g561the /g561RF /g561module /g3 Example /g561Data /g561Format/g561is/g5618/g556N/g5561/g561(bits/g561/g556/g561 parity /g561/g556/g561 #/g561of/g561stop /g561bits) The module UART performs tasks, such as timing and parity checking, that are needed for data communications. Serial communications depend on the two UARTs to be configured with compatible settings (baud rate, parity, start bits, stop bits, data bits). 2.1.2. Serial Buffers The XBee Series 2 modules maintain small buffers to collect received serial and RF data. The serial receive buffer collects incoming serial characters and holds them until they can be processed. The serial transmit buffer collects data that is received via the RF link that will be transmitted out the UART. Serial Receive Buffer When serial data enters the RF module through the DIN Pin (3 pin), the data is stored in the serial receive buffer until it can be processed. DIN (data in) DIN (data in) DOUT (data out) DOUT (data out)

XBee/XBee /g556PRO /g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 10 Chapter /g5612/g561/g556/g561 RF /g561Module /g561Operation Hardware Flow Control (CTS ). When the serial receive buffer is 17 bytes away from being full, by default, the module de-asserts CTS (high) to signal to the host device to stop sending data [refer to D7 (DIO7 Configuration) parameter]. CTS is re-asserted after the serial receive buffer has 34 bytes of memory available. Cases in which the serial receive buffer may become full and possibly overflow: Serial Transmit Buffer When RF data is received, the data is moved into the serial transmit buffer and is sent out the serial port. If the serial transmit buffer becomes full enough such that all data in a received RF packet won’t fit in the serial transmit buffer, the entire RF data packet is dropped. Hardware Flow Control (RTS ). If RTS is enabled for flow control (D6 (DIO6 Configuration) Parameter = 1), data will not be sent out the serial transmit buffer as long as RTS (pin 16) is de- asserted. Cases in which the serial transmit buffer may become full resulting in dropped RF packets Figure /g5612/g55603. Internal /g561Data /g561Flow /g561Diagram 1. If the module is receiving a continuous stream of RF data, any serial data that arrives on the DIN pin is placed in the serial receive buffer. The data in the serial receive buffer will be transmitted over-the-air when the module is no longer receiving RF data in the network. 2. When data is ready to be transmitted, the module may need to discover a Network Address and/or a Route in order to reach the destination node. Discovery overhead may delay packet transmission. Refer to the ZigBee Networks --> Mesh Routing sections for more information. 1. If the RF data rate is set higher than the interface data rate of the module, the module could receive data faster than it can send the data to the host. 2. If the host does not allow the module to transmit data out from the serial transmit buffer because of being held off by hardware flow control. Serial Receive Buffer Serial Transmit Buffer

XBee/XBee /g556PRO /g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 11 Chapter /g5612/g561/g556/g561 RF /g561Module /g561Operation 2.1.3. Transparent Operation RF modules that contain the following firmware versions will support Transparent Mode: /g3 1.0xx (coordinator) and 1.2xx (router/end device). When operating in Transparent Mode, modules are configured using AT Commands and API operation is not supported. The modules act as a serial line replacement - all UART data received through the DIN pin is queued up for RF transmission. Data is sent to a module as defined by the DH (Destination Address High) and DL (Destination Address Low) parameters. When RF data is received by a module, the data is sent out the DOUT pin. Serial-to-RF Packetization Data is buffered in the serial receive buffer until one of the following causes the data to be packetized and transmitted: 2.1.4. API Operation API (Application Programming Interface) Operation is an alternative to the default Transparent Operation. The frame-based API extends the level to which a host application can interact with the networking capabilities of the module. RF modules that contain the following firmware versions will support API operation: 1.1xx (coordinator) and 1.3xx (router/end device). When in API mode, all data entering and leaving the module is contained in frames that define operations or events within the module. Transmit Data Frames (received through the DIN pin (pin 3)) include:

  • RF Transmit Data Frame
  • Command Frame (equivalent to AT commands) Receive Data Frames (sent out the DOUT pin (pin 2)) include:
  • RF-received data frame
  • Command response
  • Event notifications such as reset, associate, disassociate, etc. The API provides alternative means of configuring modules and routing data at the host application layer. A host application can send data frames to the module that contain address and payload information instead of using command mode to modify addresses. The module will send data frames to the application containing status packets; as well as source, and payload information from received data packets. The API operation option facilitates many operations such as the examples cited below: To implement API operations, refer to the API Operation chapter 6. 1. No serial characters are received for the amount of time determined by the RO (Packetiza- tion Timeout) parameter. If RO = 0, packetization begins when a character is received. 2. Maximum number of characters that will fit (72) i n an RF packet is received. 3. The Command Mode Sequence (GT + CC + GT) is recei ved. Any character buffered in the serial receive buffer before the sequence is transmitted. -> Transmitting data to multiple destinations withou t entering Command Mode -> Receive success/failure status of each transmitte d RF packet -> Identify the source address of each received pack et

XBee/XBee /g556PRO /g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 12 Chapter /g5612/g561/g556/g561 RF /g561Module /g561Operation 2.2. Modes of Operation 2.2.1. Idle Mode When not receiving or transmitting data, the RF module is in Idle Mode. During Idle Mode, the RF module is also checking for valid RF data. 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)
  • Sleep Mode (End Devices only)
  • Command Mode (Command Mode Sequence is issued) 2.2.2. Transmit Mode When serial data is received and is ready for packetization, the RF module will exit Idle Mode and attempt to transmit the data. The destination address determines which node(s) will receive the data. Prior to transmitting the data, the module ensures that a 16-bit Network Address and route to the destination node have been established. If the 16-bit Network Address is not known, Network Address Discovery will take place. If a route is not known, route discovery will take place for the purpose of establishing a route to the destination node. If a module with a matching Network Address is not discovered, the packet is discarded. The data will be transmitted once a route is established. If route discovery fails to establish a route, the packet will be discarded. Figure /g5612/g55604. Transmit /g561Mode /g561Sequence When data is transmitted from one node to another, a network-level acknowledgement is transmitted back across the established route to the source node. This acknowledgement packet indicates to the source node that the data packet was received by the destination node. If a network acknowledgement is not received, the source node will re-transmit the data. See Data Transmission and Routing in chapter 3 for more information. 16-bit Network Address Discovery Data Discarded Successful Transmission Yes No New Transmission 16-bit Network Address Discovered? Route Known? Route Discovered? 16-bit Network Address Known? Route Discovery Transmit Data Idle Mode No Yes No No Yes Yes

XBee/XBee /g556PRO /g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 13 Chapter /g5612/g561/g556/g561 RF /g561Module /g561Operation 2.2.3. Receive Mode If a valid RF packet is received and its address matches the RF module’s MY (16-bit Source Address) parameter, the data is transferred to the serial transmit buffer. 2.2.4. Command Mode To modify or read RF Module parameters, the module must first enter into Command Mode - a state in which incoming serial characters are interpreted as commands. Refer to the API Mode section for an alternate means of configuring modules. AT Command Mode To Enter AT Command Mode: Default AT Command Mode Sequence (for transition to Command Mode):

  • No characters sent for one second [GT (Guard Times) parameter = 0x3E8]
  • Input three plus characters (“+++”) within one second [CC (Command Sequence Character) parameter = 0x2B.]
  • No characters sent for one second [GT (Guard Times) parameter = 0x3E8] All of the parameter values in the sequence can be modified to reflect user preferences. NOTE: Failure to enter AT Command Mode is most commonly due to baud rate mismatch. Ensure the ‘Baud’ setting on the “PC Settings” tab matches the interface data rate of the RF module. By default, the BD parameter = 3 (9600 bps). To Send AT Commands: Figure /g5612/g55605. /g561Syntax /g561for /g561sending /g561AT /g561Commands /g561 To read a parameter value stored in the RF module’s register, omit the parameter field. The preceding example would change the RF module Destination Address (Low) to “0x1F”. To store the new value to non-volatile (long term) memory, subsequently send the WR (Write) command. 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. System Response. When a command is sent to the module, the module will parse and execute the command. Upon successful execution of a command, the module returns an “OK” message. If execution of a command results in an error, the module returns an “ERROR” message. To Exit AT Command Mode: Send the 3-character command sequence “+++” and observe guard times before and after the command characters. [Refer to the “Default AT Command Mode Sequence” below.] Send AT commands and parameters using the syntax shown below. 1. Send the ATCN (Exit Command Mode) command (followed by a carriage return). [OR] 2. If no valid AT Commands are received within the time specified by CT (Command Mode Timeout) Command, the RF module automatically returns to Idle Mode.

XBee/XBee /g556PRO /g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 14 Chapter /g5612/g561/g556/g561 RF /g561Module /g561Operation For an example of programming the RF module using AT Commands and descriptions of each configurable parameter, refer to the "RF Module Configuration" chapter. 2.2.5. Sleep Mode Sleep modes are supported on end devices only. Router and coordinator devices participate in routing data packets and are intended to be mains powered. End devices must be joined to a parent (router or coordinator) before they can participate on a ZigBee network. The parent device does not track when an end device is awake or asleep. Instead, the end device must inform the parent when it is able to receive data. The parent must be able to buffer incoming data packets destined for the end device until the end device can awake and receive the data. When an end device is able to receive data, it sends a poll command to the parent. When the parent router or coordinator receives the poll command, it will transmit any buffered data packets for the end device. Routers and coordinators are capable of buffering one broadcast transmission for sleeping end device children. The SM, ST, SP, and SN commands are used to configure sleep mode operation. Data Management The SP command on the parent determines how long the parent will buffer a packet. It should be set to match the maximum SP value on any end device that may join to it. SP can be set up to 28 seconds (0xAF0). End Device Sleep Modes Pin Sleep Setting SM=1 or SM=2 configures a device as a pin-sleep enabled end device. When operating in this mode, an end device monitors the Sleep_Request pin for a high state. When Sleep_Request goes high, the module enters sleep mode once any pending transmissions have finished. The module remains in a low power state until the Sleep_Request pin goes low. When the module wakes from pin sleep, it sends a poll request to the parent to see if any data is pending for the end device. Since routers and coordinators can only buffer data up to 30 seconds, end devices should not remain in pin sleep longer than about 28 seconds if incoming data packets must be received. Using pin sleep for more than 28 seconds is recommended only if incoming data packets are not expected. When the module wakes from a pin sleep mode, the CTS line goes low, and On/Sleep goes high. Cyclic Sleep Cyclic sleep allows the end device to sleep for a specified period of time. The period of time is specified by SP. Since routers and coordinators can only buffer data packets for up to 30 seconds, SP on end devices can be set up to 28 seconds (0xAF0). The module will wake after SP time and send a poll request to the parent to check for data. If any serial or RF data is received, the ST time is restarted. Once ST time has expired with no serial or RF activity, the end device will resume cyclic sleep operation. When the module wakes, CTS goes low allowing the application to send serial data to the module if necessary. The On/Sleep indicator will be set high to alert the application that the end device has awakened. If serial or RF data is received, the ST timer will be reset, otherwise, the end device will resume low power operation. Off board peripherals may wish to sleep longer than the maximum SP time of the end device. The SN command can be used to not wake off board peripherals for longer than SP time. For example, if SP=28 seconds, and SN=5, the end device will wake up every 28 seconds and poll the parent for data. If no data is pending, the end device will return to sleep. In this example, if the parent has no data for the end device, On/Sleep will go high after 140 seconds, assuming the parent never has data for the end device. If the parent has data for the end device, On/Sleep will go high and the SN counter will reset.

©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 15 3. /g561ZigBee /g561Networks 3.1. ZigBee Network Formation A ZigBee Personal Area Network (PAN) consists of one coordinator and one or more routers and/or end devices. A ZigBee Personal Area Network (PAN) is created when a coordinator selects a channel and PAN ID to start on. Once the coordinator has started a PAN, it can allow router and end device nodes to join the PAN. When a router or end device joins a PAN, it receives a 16-bit network address and can transmit data to or receive data from other devices in the PAN. Routers and the coordinator can allow other devices to join the PAN, and can assist in sending data through the network to ensure data is routed correctly to the intended recipient device. When a router or coordinator allows an end device to join the PAN, the end device that joined becomes a child of the router or coordinator that allowed the join. End devices, however can transmit or receive data but cannot route data from one node to another, nor can they allow devices to join the PAN. End devices must always communicate directly to the parent they joined to. The parent router or coordinator can route data on behalf of an end device child to ensure it reaches the correct destination. End devices are intended to be battery powered and can support low power modes. Figure /g5613/g55601. Node /g561Types /g561//g561Sample /g561of /g561a/g561Basic /g561ZigBee /g561Network /g561Topology /g561 The network address of the PAN coordinator is always 0. When a router joins a PAN, it can also allow other routers and end devices to join to it. Joining establishes a parent/child relationship between two nodes. The node that allowed the join is the parent, and the node that joined is the child. The parent/child relationship is not necessary for routing data. 3.1.1. Starting a ZigBee Coordinator When a coordinator first comes up, it performs an energy scan on mulitple channels (frequencies) to select an unused channel to start the PAN. After removing channels with high detected energy levels, the coordinator issues an 802.15.4 beacon request command on the remaining, low energy level channels. Any routers or coordinators respond to the beacon request frame with a small beacon transmission that indicates the PAN identifier (PAN ID) that they are operating on, and whether or not they are allowing joining.The coordinator will attempt to start on an unused PAN ID and channel. After starting, the coordinator may allow other devices to join its PAN. 3.1.2. Joining a Router When a router first comes up, it must locate and join a ZigBee PAN. To do this, it issues an 802.15.4 beacon request command on multiple channels to locate nearby PANs. Nearby routers and coordinators respond to the beacon request frame with a small beacon transmission, indicating which channel and PAN ID they are operating on. The router listens on each channel for these beacon frames, and determines which device it should join. If a valid PAN is found from one of the received beacons, the router issues a join request to the device that sent the beacon. If joining succeeds, the router will then receive a join confirmation from the device, indicating the join was successful. Once the router joins the PAN, it can communicate with other devices on the PAN and allow new devices to join to it.

XBee/XBee /g556PRO /g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 16 Chapter /g5613/g561/g556/g561 ZigBee /g561Networks 3.1.3. Joining an End Device When an end device first comes up, it must also locate and join a PAN. End devices follow the same process as a router to join a PAN. Once the end device has successfully joined a PAN, it can communicate with other devices on the PAN. However, since end devices cannot route data, it must always communicate directly with its parent and allow the parent to route data in its behalf. Figure /g5613/g55602. Demonstration /g561of /g561Beacon /g561Request /g561and /g561Beacon /g561transmissions /g561that /g561take /g561place /g561during /g561joining.

XBee/XBee /g556PRO /g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 17 Chapter /g5613/g561/g556/g561 ZigBee /g561Networks 3.2. ZigBee Network Communications Zigbee supports device addressing and application layer addressing. Device addressing specifies the destination address of the device a packet is destined to. Application layer addressing indicates a particular application recipient, known as a Zigbee endpoint, along with message type fields called cluster IDs. 3.2.1. ZigBee Device Addressing The 802.15.4 protocol upon which the ZigBee protocol is built specifies two address types:

  • 16-bit Network Addresses
  • 64-bit Addresses 16-bit Network Addresses A 16-bit Network Address is assigned to a node when the node joins a network. The Network Address is unique to each node in the network. However, Network Addresses are not static - it can change. The following two conditions will cause a node to receive a new Network Address: ZigBee requires that data be sent to the 16-bit network address of the destination device. This requires that the 16-bit address be discovered before transmitting data. See 3.2.3 Network Address Discovery for more information. 64-bit Addresses Each node contains a unique 64-bit address. The 64-bit address uniquely identifies a node and is permanent. 3.2.2. ZigBee Application-layer Addressing The ZigBee application layers define endpoints and cluster identifiers (cluster IDs) that are used to address individual services or applications on a device. An endpoint is a distinct task or application that runs on a ZigBee device, similar to a TCP port. Each ZigBee device may support one or more endpoints. Cluster IDs define a particular function or action on a device. Cluster IDs in the ZigBee home controls lighting profile, for example, would include actions such as “TurnLightOn”, “TurnLightOff”, “DimLight”, etc. Suppose a single radio controls a light dimmer and one or more light switches. The dimmer and switches could be assigned to different endpoint values. To send a message to the dimmer, a remote radio would transmit a message to the dimmer endpoint on the radio. In this example, the radio might support cluster IDs to “TurnLightOn”, “TurnLightOff”, or “DimLight”. Thus, for radio A to turn off a light on radio B, radio A would send a transmission to the light switch endpoint on radio B, using cluster ID “TurnLightOff”. This is shown in the figure below. 1. If an end device cannot communicate with its par ent it may need to leave the network and rejoin to find a new parent. 2. If the device type changes from router to end de vice, or vice-versa, the device will leave the network and rejoin as the new device type.

XBee/XBee /g556PRO /g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 18 Chapter /g5613/g561/g556/g561 ZigBee /g561Networks Figure /g5613/g55603. ZigBee /g561Data /g561Transmission /g561Higher /g561Layer /g561Addressing /g561Fields Figure /g5613/g55604. ZigBee /g561Layer /g556Addressing /g561Example /g561 3.2.3. Data Transmission and Routing All data packets are addressed using both device and application layer addressing fields. Data can be sent as a broadcast, multicast, or unicast transmission. Broadcast Transmissions Broadcast transmissions within the ZigBee protocol are intended to be propagated throughout the entire network such that all nodes receive the transmission. To accomplish this, all devices that receive a broadcast transmission will retransmit the packet 3 times. Each node that transmits the broadcast will also create an entry in a local broadcast transmission table. This entry is used to keep track of each received broadcast packet to ensure the packets are not endlessly transmitted. Each entry persists for 8 seconds. The broadcast transmission table holds 8 entries. Since broadcast transmissions are retransmitted by each device in the network, broadcast messages should be used sparingly. Multicast Transmissions Multicast transmissions operate similar to broadcast transmissions. Data packets are broadcast throughout the network in a similar fashion. However, only devices that are part of the multicast group will receive the data packets. Unicast Transmissions Unicast ZigBee transmissions are always addressed to the 16-bit address of the destination device. However, only the 64-bit address of a device is permanent; the 16-bit address can change. Therefore, ZigBee devices may employ network address discovery to identify the current 16-bit S rc A d d re ss D e st A d d re ss P ro file ID S rc E n d p o in t D e st E n d p o in t C lu ste r ID N e tw o rk L a ye r A p p lica tio n S u p p o rt L a ye r Endpoint 1 Endpoint 3 (radio A) Endpoint 2 Endpoint 40 Endpoint 41 (radio B) Endpoint 42 Cluster ID = TurnLightOff ZigBee Device A ZigBee Device B

XBee/XBee /g556PRO /g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 19 Chapter /g5613/g561/g556/g561 ZigBee /g561Networks address that corresponds to a known 64-bit address. Once the 16-bit address is known, a route to the destination device must be discovered. ZigBee employs mesh routing using the Ad-hoc On- demand Distance Vector routing (AODV) protocol to establish a route between the source device and the destination. Network Address Discovery Data transmissions are always sent to the 16-bit network address of the destination device. However, since the 64-bit address is unique to each device and is generally known, ZigBee devices must discover the network address that was assigned to a particular device when it joined the PAN before they can transmit data. To do this, the device initiating a transmission sends a broadcast network address discovery transmission throughout the network. This packet contains the 64-bit address of the device the initiator needs to send data to. Devices that receive this broadcast transmission check to see if their 64-bit address matches the 64-bit address contained in the broadcast transmission. If the addresses match, the device sends a response packet back to the initiator, providing the network address of the device with the matching 64-bit address. When this response is received, the initiator can then transmit data. Mesh Routing Mesh routing allows data packets to traverse multiple nodes (hops) in a network to route data from a source to a destination. The route a packet can take in a mesh network is independent of the parent/child relationships established during joining. Before transmitting a data packet from source to destination nodes, a route must be established. Route discovery is based on the AODV (Ad-hoc On-demand Distance Vector routing) protocol. AODV (Ad-hoc On-demand Distance Vector) Routing Algorithm Routing under the AODV protocol is accomplished using tables in each node that store in the next hop (intermediary node between source and destination nodes) for a destination node. If a next hop is not known, route discovery must take place in order to find a path. Since only a limited number of routes can be stored on a Router, route discovery will take place more often on a large network with communication between many different nodes. When a source node must discover a route to a destination node, it sends a broadcast route request command. The route request command contains the source Network Address, the destination Network Address and a Path Cost field (a metric for measuring route quality). As the route request command is propagated through the 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. 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. Intermediate nodes receive and forward the route reply packet to the Source Node (the node that originated route request). Retries and Acknowledgments ZigBee includes acknowledgment packets at both the Mac and Application Support (APS) layers. When data is transmitted to remote device, it may traverse multiple hops to reach the destination. As data is transmitted from one node to its neighbor, an acknowledgment packet (Ack) is transmitted in the opposite direction to indicate that the transmission was successfully received. If the Ack is not received, the transmitting device will retransmit the data, up to 4 times. This Ack is called the Mac layer acknowledgment. In addition, the device that originated the transmission expects to receive an acknowledgment packet (Ack) from the destination device. This Ack will traverse the same path that the data traversed, but in the opposite 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.

©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 20 4. /g561XBee /g561Series /g5612/g561Network /g561Formation 4.1. XBee Series 2 Network Formation To create a ZigBee network, a coordinator must be started on a channel and PAN ID. Once the coordinator has started, routers and end device can join the network. Routers and coordinator devices can support up to 8 end device children each. Network formation is governed by the SC (Scan Channels), ID (PAN ID), SD (Scan Duration), and NJ (Node Join Time) commands. The SC and ID settings must be written using the WR command to affect network formation and joining. 4.1.1. Starting an XBee Series 2 Coordinator In order to form a network, a coordinator must select an unused operating channel and PAN ID on behalf of its network. To do this, the coordinator first performs an energy scan on all channels specified by its SC (Scan Channels) parameter. The scan time on each channel is determined by the SD (Scan Duration) parameter. Once the energy scan is completed, the coordinator sends a beacon request on each of the SC channels and listens for any beacons. The information from the energy scan and the beacon scan (active scan) is used to select an unused channel and PAN ID. If the ID (PAN ID) parameter is set to 0xFFFF, the coordinator will select a random PAN ID. Otherwise, the coordinator will start on the PAN ID specified by its ID parameter. After the coordinator has started, it will allow nodes to join to it for a time based on its NJ (Node Join Time) parameter. If the Associated LED function is enabled (D5 (DIO5 Configuration) command), the Associate pin (pin 15) will toggle its output state 1x per second after the coordinator stated. At this point, the operating channel and PAN ID can be read using the CH (Operating Channel) and ID (PAN ID) commands. The 16-bit address of the coordinator is always 0. If API is enable (AP parameter > 0): The API modem status “coordinator Started” frame is sent out the UART. The AI (Association Indication) command can be used at any point during the coordinator startup routine to determine the status of the startup operation. 4.1.2. Joining an XBee Series 2 Router to an existing PAN Before a router can participate in a ZigBee network, the router must locate a coordinator or another router that has already joined a PAN, and attempt to join to it. To do this, it sends a beacon request frame on each of the SC channels and listens for beacon frames. The scan duration on each channel is determined by the SD parameter. The joining router will evaluate the received beacons to find a coordinator or router that is allowing joins on a valid PAN ID, and attempt to join to that device. If ID = 0xFFFF, the router will attempt to join to a device on any PAN ID. Otherwise, the router will only attempt joining with a device that operates on the PAN ID specified by the ID parameter. If a valid router/ coordinator is found, the router will attempt to join to that node. If the join succeeds, the Router has successfully started. After the Router has started, it will allow nodes to join to it for a time based on the NJ (Node Join Time) parameter. If the Associated LED function is enabled(D5 (DIO5 Configuration) command) the Associate pin (pin 15) will toggle its output state 2x per second after the router has joined. At this point, the operating channel and PAN ID can be read using the CH (Operating Channel) and ID (PAN ID) commands. The 16-bit Network Address of the router can be read using the MY (16-bit Source Address) command. If API is enabled (AP parameter > 0): The API modem status “Joined” is sent out the UART. The AI (Association Indication) command can be used at any point during the router join routine to know the status of the startup operation. 4.1.3. Joining an XBee Series 2 End Device to an Existing PAN Joining an end device to a PAN is similar to joining a router. Once the end device joins a PAN, however, the end device cannot allow other devices to join to it. If the Associate LED function is enabled (D5 (DIO5 Configuration) command), the Associate pin (pin 15) will toggle its output state 2x per second after the end device has joined. At this point, the operating channel and PAN ID can be read using the CH (Operating Channel) and ID (PAN ID) commands. The 16-bit network

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 21 Chapter /g5614/g561/g556/g561 RF /g561Module /g561Configuration address of the end device can be read using the MY (16-bit Source Address) command. If API is enabled (AP parameter > 0), the API modem status “Joined” is sent out the UART. The AI (Association Indication) command can be used at any point during the end device join routine to know the status of the startup operation. 4.1.4. Network Reset Once a coordinator has started, or a router or end device has joined the network, the device will continue operating on that channel and PAN ID unless one of the following occurs: 1. The ID parameter changes, and is saved using the WR command 2. The SC parameter changes and is saved using the WR command, such that the current operating channel is not included in the new SC parameter 3. The NR command is issued with either 0 or 1 as a parameter If any of the above occurs on a coordinator, the coordinator will attempt to restart on a channel and PAN ID based on the new saved ID and SC commands. On a router or end device, the above conditions will cause the device to leave the network (if previously joined) and attempt to join a new PAN using the saved ID and SC parameters.

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 22 Chapter /g5614/g561/g556/g561 RF /g561Module /g561Configuration 4.2. XBee Series 2 Addressing XBee modules support both ZigBee device addressing and application-layer addressing. 4.2.1. Device Addressing All XBee/XBee-Pro modules can be identified by their unique 64-bit adresses or a user- configurable ASCII string identifier The 64-bit address of a module can read using the SH and SL commands. The ASCII string identifier is configured using the NI command. To transmit using device addressing, only the destination address must be configured. The destination address can be specified using either the destination device’s 64-bit address or its NI-string. The XBee modules also support coordinator and broadcast addressing modes. Device addressing in the AT firmware is configured using the DL, DH, or DN commands. In the API firmware, the ZigBee Transmit Request API frame (0x10) can be used to specify destination addresses. 64-Bit Addressing To address a node by its 64-bit address, the destination 64-bit address must be set to match the 64-bit address of the remote. In the AT firmware, the DH and DL commands set the destination 64-bit address. In the API firmware, the destination 64-bit address is set in the ZigBee Transmit Request frame. The coordinator can be addressed by either setting the destination address to 0 or by setting it to match the coordinator's 64-bit address. Broadcast transmissions can be sent by setting the 64-bit address to 0x000000000000FFFF. To send a packet to an RF module using its 64-bit Address (Transparent Mode) To send a packet to an RF module using its 64-bit Address (API Mode) Since the ZigBee protocol relies on the 16-bit Network Address for routing, the 64-bit address must be converted into a 16-bit Network Address prior to transmitting data. If a module does not know the 16-bit Network Address for a given 64-bit address, it will transmit a broadcast Network Address Discovery command. The module with a matching 64-bit address will transmit its 16-bit network address back. Once the network address is discovered, the data will be transmitted. The modules maintain a table that can store up to seven 64-bit addresses and their corresponding 16-bit Network Addresses. API Addressing API Mode provides the ability to store and maintain 16-bit Network Address tables on an external processor. The 16-bit Network Address information is provided to the application through the following:

  • The ZigBee Transmit Status Frame /g3 (contains the current 16-bit Network Address of the remote)
  • The ND and DN commands /g3 (return 64-bit and 16-bit Network Addresses of remote nodes) With this information, a table can be built in an application that maps a 64-bit Address to the corresponding 16-bit Network Address. The ZigBee Transmit Request API frame specifies the 64-bit Address and the Network Address (if known) that the packet should be sent to. By supplying both addresses, the module will forego Network Address Discovery and immediately attempt to route the data packet to the remote. If the Network Address of a particular remote changes, Network Address and route discovery will Set the DH (Destination Address High) and DL (Destination Address Low) parameters of the source node to match the 64-bit Address (SH (Serial Number High) and SL (Serial Number Low) parameters) of the destination node. Use the ZigBee Transmit Request API frame to set the DH (Destination Address High) and DL (Destination Address Low) parameters of the source node to match the 64-bit Address (SH (Serial Number High) and SL (Serial Number Low) parameters) of the destination node. If the 16-bit address of the destination node is not known, set 16-bit Destination Network Address to 0xFFFE (refer to the ‘API Addressing section below).

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 23 Chapter /g5614/g561/g556/g561 RF /g561Module /g561Configuration take place to establish a new route to the correct node. Upon successful packet delivery, the TX Status Frame will indicate the correct Network Address of the remote. NI-String Addressing The NI string can alternatively be used to address a remote module. To send a packet to an RF module using its NI-string (Transparent Mode) To send a packet to an RF module using its NI-string (API Mode) When the DN command is issued, a broadcast transmission is sent across the network to discover the module that has a matching NI (Node Identifier) parameter. If a module is discovered with a matching NI-string, the DH and DL parameters will be configured to address the destination node and the command will return both the 64-bit Address and the 16-bit Network Address of the discovered node. Data can be transmitted after the DN (Destination Node) command finishes. the AO command. See “API Frames” section for details. Coordinator Addressing A Coordinator can be addressed using its 64-bit address or NI string as described in the “NI-String Addressing” section. Alternatively, since the ZigBee Coordinator has a Network Address of “0”, it can be addressed by its 16-bit Network Address. To send a transmission to a Coordinator using its 16-bit Network Address: Broadcast Addressing Broadcast transmissions are sent using a 64-bit address of 0x0000FFFF. Any RF module in the PAN will accept a packet that contains a broadcast address. When configured to operate in Broadcast Mode, receiving modules do not send ACKs (Acknowledgements). To send a broadcast packet to all modules NOTE: When programming the module, parameters are entered in hexadecimal notation (without the “0x” prefix). Leading zeros may be omitted. Refer to the “Broadcast Transmissions” for more information. 4.2.2. Application-layer Addressing Application-layer addressing allows the application to specify endpoint and cluster ID values for each transmission. Addressing multiple endpoints and cluster IDs can be accomplished by explicitly setting these values as needed. Table /g5614/g55601. Sample /g561table /g561mapping /g56164 /g556bit /g561Addresses /g561to /g56116 /g556bit /g561Network /g561Addresses Index 64-bit Address 16-bit Network Address 0 0013 4000 4000 0001 1234 1 0013 4000 4000 0002 5678 2 0013 4000 4000 01A0 A479 3 0013 4000 4000 0220 1F70 Issue the DN (Destination Node) command using the NI (Node Identifier)-string of the destina- tion node as the parameter. Issue the DN command as stated above using the AT Command API frame. Set the Destination Addresses of the transmitting module as shown below: DL (Destination Low Address) = 0 /g3 DH (Destination High Address) = 0 Set the Destination Addresses of the transmitting module as shown below: DL (Destination Low Address) = 0x0000FFFF /g3 DH (Destination High Address) = 0x00000000

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 24 Chapter /g5614/g561/g556/g561 RF /g561Module /g561Configuration In AT firmware, application-layer addressing must be enabled using the ZA command. When application-layer addressing is enabled, the DE and SE commands specify the source and destination endpoints, and the CI command sets the cluster ID that will be used in the transmission. In API firmware, the Explicit Addressing ZigBee Command frame (0x11) can be used to configure the endpoint and cluster ID addressing parameters as needed. The destination device can indicate application-layer addressing information if the Explicit Receive API frame is addressing information using either the explicit receive indicator or the binding receive API frames. The receive RF data frame is set using Binding Table Addressing The XBee Series 2 modules maintain several entries in a binding table. The binding table contains a destination 64-bit address, a type field, and endpoints for each transmission. Non-broadcast transmissions make use of the binding table to specify the addressing values for the transmission. Some entries in the binding table are reserved by MaxStream for special purposes. Binding table entries can be accessed by setting the BI command to a valid index in AT firmware, or by using the Binding Table API Command frame in the API firmware. The binding table entries are organized as follows. Coordinator Binding The coordinator binding contains the 64-bit address of the coordinator. This table entry is populated when the device joins the network. Tx-Aggregation Binding This binding table entry contains the 64-bit address of the aggregate (sink) node if one exists. Data can be sent to the aggregate node by addressing this index in the binding table. Tx-Explicit Binding The Tx-Explicit binding table entry contains the destination address and endpoint information from the last explicit transmission that was issued. This entry is modified whenever explicit addressing is used in either the AT or API firmware as described in the "XBee Series 2 Addressing" section. Command Binding If a remote command request is received, the command binding entry stores information from the device that initiated the command. For example, if the ND or DN command is issued, this binding table entry would contain the source address of the device that sent the ND command. Received Data Bindings The received data bindings contain addressing information for the last three received data packets. The fourth entry is marked invalid. When a data packet is received, the address and endpoint information is stored into the invalid entry. Then, the oldest entry is made invalid. Thus, once an entry is created in the Received Data binding indexes, it will remain valid until three more RF data packets are received. Table /g5614/g55602. Binding Table Index Name Access

0 Coordinator Binding Read-Write

1 Tx-Aggregation Binding Read-Only

2 Tx-Explicit Binding Read-Write

3-4 Command Binding Read-Only 5-8 Received Data Bindings Read-Only 9 User Bindings. Read-Write

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 25 Chapter /g5614/g561/g556/g561 RF /g561Module /g561Configuration Figure /g5614/g55605. Demonstration /g561of /g561how /g561entries /g561in /g561the /g561received /g561data /g561bindings /g561are /g561replaced /g561when /g561an /g561RF /g561data /g561 packet /g561is /g561received. User Bindings These entries can be created and maintained by the application if needed. The following commands can be used to modify the user bindings. See the command descriptions for formatting details. Multicast Addressing Multicast addressing sends a broadcast message that will only be received by devices who subscribe to a multicast group. The binding table is used to subscribe to a multicast group. To send a multicast transmission, a binding table entry must exist where the type field is set to the multicast type value. The 64-bit address in this entry becomes a multicast group address. Only remote devices with a matching 64-bit multicast group will receive multicast transmissions. Once the binding table is configured with a multicast binding entry, the binding table index can be specified for a transmission using the BI command (AT firmware), or the Binding Table API Command Frame (API firmware). See the XBee Binding Table section for details. Endpoint Addressing The ZigBee specification, Ember stack, and MaxStream application have reserved some endpoints for different uses. Some of these endpoints are not accessible. Applications that will support custom endpoints should select endpoints not already used by ZigBee, Ember, or MaxStream. The cluster ID used by MaxStream on the serial data endpoint for serial data transmissions is 0x11. 4.2.3. XBee Series 2 Endpoint Table The XBee Series 2 modules maintain a table of supported endpoints. If an endpoint will be used as the source endpoint in a data transmission, the endpoint must first be defined in the endpoint table. Table /g5614/g55603. Command Name Description B+ Add Binding Creates a binding table entry at a spe cified User Binding index. B- Remove Binding Removes a binding from a specified User Binding index. BV View Binding Views one or more bindings in the bin ding table. WB Write Binding Writes the binding table to non-vola tile memory. 3rd 2nd 1st INV 3rd 2nd 1st INV 2nd 1st DATA INV 3rd 2nd 1st

3 Data entries +

Oldest entry (3 rd ) is marked Invalid Newest or 1st 1st entry becomes second newest entry 2nd newest entry becomes oldest data entry

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 26 Chapter /g5614/g561/g556/g561 RF /g561Module /g561Configuration The XBee Series 2 endpoint table operates similar to the binding table. Entries may be added, removed, or viewed using the E+, E-, and EV commands respectively. Some table entries are reserved for special purposes Command Endpoint The command endpoint is used to send or reply to various commands. This endpoint must exist in the application. Data Endpoint This endpoint is used to send serial data to other XBee Series 2 modules. It must always exist in the application. Tx-Explicit Endpoint This entry is used as needed to define the source endpoint that must be defined for a data transmission. If a transmit request is made, and the specified source endpoint does not exist, it will be created temporarily at this endpoint table index. User Endpoints User endpoints are controlled entirely by the application. These endpoints may be added, removed, or viewed in the API firmware using the following commandsSee the command descriptions for command formatting details. At present, changes to the endpoint table are saved to non-volatile memory when WR is issued.. 4.3. Advanced Network Features Network Mapping Network mapping has provisions to identify all devices on a PAN.There are currently two ways to do this either through the Node Discover (ND) Command or the API Child Joined Indicator. Both are explained below. Node Discover (ND) Command Issuing the ND command on a device sends a broadcast node discovery command throughout the PAN. All devices that receive the command will send a response that includes the device’s 64-bit and 16-bit addresses, along with the NI-string and other information. API Child Joined Indicator Routers and end devices can be configured to send a transmission after joining to alert the coordinator, or the entire network, that the device has joined the network. When this message is transmitted, the receiving device(s), if running API firmware, will send an advanced modem status indicator out the UART to indicate the 64-bit and 16-bit addresses of the joining device. Table /g5614/g55604. Endpoint Table Index Name Access

0 Command Endpoint Read-Only

1 Data Endpoint Read-Only

2 Tx-Explicit Endpoint Read-Write

3- 4 User Endpoints Read-Write Table /g5614/g55605. ZigBee /g561Data /g561Transmissions /g561Addressing /g561Fields Command Name Description E+ Add Endpoint Creates an endpoint entry at a specified user endpoint index. E- Remove Endpoint Removes an endpoint entry from a specified user endpoint index. EV View Endpoint Views one or more endpoints in the e ndpoint table.

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 27 Chapter /g5614/g561/g556/g561 RF /g561Module /g561Configuration 4.4. I.O. Line Configuration The XBee Series 2 modules support both analog input and digital IO line modes on several configurable pins. Configuring A/D and Digital Lines The following table lists the pin functions supported on the modules Setting the configuration command that corresponds to a particular pin will configure the pin. Parameters for the pin configuration commands typically include the following: Table /g5614/g55606. Module Pin Names Module Pin Numbers Configuration Command CD/DIO12 4 P2 PWM0/RSSI/DIO10 6 P0 PWM/DIO11 7 P1 SLEEP_RQ/DIO8 9 IO Configuration not supported DIO4 11 D4 CTS/DIO7 12 D7 ON_SLEEP/DIO9 13 IO Configuration not supported ASSOC/DIO5 15 D5 RTS/DIO6 16 D6 AD3/DIO3 17 D3 AD2/DIO2 18 D2 AD1/DIO1 19 DI AD0/DIO0 20 D0 Table /g5614/g55607. Pin Command Parameter Description

0 Unmonitored digital input

1 Reserved for pin-specific alternate functionalitie s

2 Analog input, single ended (A/D pins only)

3 Digital input, monitored

4 Digital output, default low

5 Digital output, default high

6-9 Alternate functionalities, where applicable

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 28 Chapter /g5614/g561/g556/g561 RF /g561Module /g561Configuration See the command table for more information. Pullup resistors for each digital input can be enabled using the PR command. Sampling A/D and Digital Input Lines The IS command can be used to read the current value of all enabled A/D and digital input lines. The format for the IS response is shown below. At the time, only one sample set is supported in this frame. The AT firmware returns a carriage return delimited list containing the above-listed fields. The API firmware returns an AT command response API frame with the IO data included in the command data portion of the packet. To convert the A/D reading to mV, do the following: AD(mV)= (ADIO reading/0x3FF)*1200mV The reading in the sample frame represent voltage inputs of 1144.9 and 342.5mV for ADIO0 and ADIO1 respectively. Bytes Name Description

1 Sample sets in packet Number of sample sets in the packet

2 Digital Channel Mask

Each bit in the digital channel mask corresponds to one digital IO line. The bits, from LSB to MSB, correspond to DOI0-DOI5 on the module. For example a digital channel mask of 0x002F means DIO0,1,2,3, and 5 are enabled as digital input lines.

1 Analog Channel Mask

Each bit in the analog channel mask corresponds to one analog channel. The bits from LSB to MSB correspond to AIN0-AIN7 on the module. For example, if the analog channel mask is 0x06, AINI and AIN3 are enabled as analog input lines. Var Sampled Data Set A sample set consisting of 1 sample for each enabled ADC and/or DIO channel. If any digital input lines are enabled, the first two bytes indicate the state of all enabled digital input lines. Each bit in these two bytes corresponds to one digital IO line, similar to the way each bit in the diglossia channel mask corresponds. Note: only the digital input line that are enabled in the detail channel mask have valid readings. Channels that are not enabled as digital input lines will return a 0 in the sampled data set. If no pins are configured as digital inputs, these 2 bytes will be omitted. Following the digital input data, if any, each enabled analog channel will return 2 bytes (10bits). The analog data is scaled such that 0 represents 0V, and 0x3FF=1.2V. The analog input lines cannot measure more than 1.2V. Information for each enabled analog channel is returned in order, starting with AIN0 and finishing with AIN4. Only enabled analog input channels will return data. Example Sample AT Response 0x01\\r [1 sample set] 0x0C0C\\r [Digital Inputs: DIO 2, 3, 10, 11 low] 0x03\\r [Analog Inputs: ADOP 0, 1] 0x0408\\r [Digital input states: DIO 3, 10 high, DIO 2, 11 low] 0x03D0\\r [Analog input ADIO 0= 0x3D0] 0x0124\\r [Analog input ADIO 1=0x120]

©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 29 5. /g561/g561 XBee /g561Series /g5612/g561Command /g561Reference /g561Tables Special Node /g561types/g561that/g561support/g561the /g561command:/g561C/g561=/g561Coordinator,/g561R/g561=/g561Router,/g561E/g561=/g561End /g561Device Addressing Table /g5615/g55608. Special /g561Commands AT /g3 Command Name and Description Node Type 1 Parameter Range Default WR Write . Write parameter values to non-volatile memory so that parameter modifications persist through subsequent resets. Note: Once WR is issued, no additional characters should be sent to the module until after the "OK\\r" response is received. CRE -- -- WB Write Binding Table: Writes the current binding table to non-volative memory. CRE -- -- RE Restore Defaults . Restore module parameters to factory defaults. RE command does not reset the ID parameter. CRE -- -- FR Software Reset . Reset module. Responds immediately with an “OK” t hen performs a reset ~2 seconds later. Use of the FR command will cause a network layer restart on the node if SC or ID were modified since the last reset. CRE -- -- NR Network Reset . Reset network layer parameters on one or more modules within a PAN. Responds immediately with an “OK” then causes a net work restart. All network configuration and routing information is consequently lost. If NR = 0 : Resets network layer parameters on the node issuing the command. If NR = 1 : Sends broadcast transmission to reset network layer parameters on all nodes in the PAN. CRE 0 - 1 -- Table /g5615/g55609. Addressing /g561Commands /g561(Sub /g556categories /g561designated /g561within /g561{brackets}) AT /g3 Command Name and Description Node Type

1 Parameter Range Default

Destination Address High . Set/Get the upper 32 bits of the 64-bit destination address. When combined with DL, it defines the destination address used for transmission. 0x000000000000FFFF is the broadcast address for the PAN. DH is not supported in API Mode. 0x0000000000000000 is the Coordinator’s 16-bit Network Address. CRE 0 - 0xFFFFFFFF 0 DL 2 Destination Address Low . Set/Get the lower 32 bits of the 64-bit destination address. When combined with DH, DL defines the destination address used for transmission. 0x000000000000FFFF is the broadcast address for the PAN. DL is not supported in API Mode. 0x0000000000000000 is the Coordinator’s 16-bit Network Address. CRE 0 - 0xFFFFFFFF 0xFFFF(Coordinator) 0 (Router/End Device) ZA 2 ZigBee Application Layer Addressing . Set/read the Zigbee application layer addressing enabled attribute. If enabled, data packets will use the SE, DE, and CI commands to address Zigbee application layer source and destination endpoints, and the cluster ID fields in all data transmissions. ZA is only supported in the AT firmware. CRE 0 - 1 0 SE 2 Source Endpoint . Set/read the ZigBee application layer source endpoint value. If ZigBee application layer addressing is enabled (ZA command), this value will be used as the source endpoint for all data transmissions. SE is only supported in AT firmware. The default value (0xE8) is the MaxStream data endpoint CRE 1 - 0xEF 0xE8 DE 2 Destination Endpoint . Set/read Zigbee application layer destination ID value. If ZigBee application layer addressing is enabled (ZA command), 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 MaxStream data endpoint. CRE 0 - 0xEF 0xE8 CI 2 Cluster Identifier . Set/read Zigbee application layer cluster ID value. If ZigBee application layer addressing is enabled (ZA command), this value will be used as the cluster ID for all data transmissions. CI is only supported in AT firmware.The default value (0x11) is the MaStream transparent data cluster ID. CRE 0 - 0xFF 0x11 BI 2 Binding Table Index . Set/read the binding table index value. If this value is set to a valid binding table index, the addressing information at that index in the binding table will be used for all data transmissions. BI is only supported in AT firmware CRE 0 - 0xFF 0xFF MY 16-bit Network Address. Get the 16-bit Network Address of the module. CRE 0 - 0xFFFE /g3 [read-only] 0xFFFE MP 16-bit Parent Network Address. Get the 16-bit parent Network Address of the module. E 0 - 0xFFFE /g3 [read-only] 0xFFFE SH Serial Number High . Read high 32 bits of the RF module's unique IEEE 64-bit address. 64-bit source address is always enabled. CRE 0 - 0xFFFFFFFF /g3 [read-only] factory-set SL Serial Number Low . Read low 32 bits of the RF module's unique IEEE 64-bit address. 64-bit source address is always enabled. CRE 0 - 0xFFFFFFFF /g3 [read-only] factory-set

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 30 Chapter /g5615/g561/g556/g561 XBee /g561Series /g5612/g561Command /g561Reference /g561Tables 1./g561Node /g561types/g561that/g561support/g561the /g561command:/g561C=Coordinator,/g561R=Router,/g561E=End /g561Device /g3 2./g561Command /g561supported /g561by /g561modules/g561using /g561AT /g561Command /g561firmware /g561only Networking & Security NI Node Identifier. Stores a string identifier. The register only accepts printable ASCII data. In AT Command Mode, a string can not start with a space. A carriage return ends the command. Command will automatically end when maximum bytes for the string have been entered. This string is returned as part of the ND (Node Discover) command. This identifier is also used with the DN (Destination Node) command. CRE 20-Byte printable /g3 ASCII string -- Table /g5615/g556010. Networking /g561Commands /g561(Sub /g556categories /g561designated /g561within /g561{brackets}) AT /g3 Command Name and Description Node Type CH Operating Channel . Read the channel number used for transmitting and receiving between RF modules. Uses 802.15.4 channel numbers. CRE 0, 0x0B-0x1A (XBee) 0 ID PAN ID . Set/Get the PAN (Personal Area Network) ID. /g3 Coordinator - Set the preferred Pan ID. Set (ID = 0xFFFF) to auto-select. /g3 Router / End Device - Set the desired Pan ID. When the device searches for a Coordinator, it attempts to only join to a parent that has a matching Pan ID. Set (ID = 0xFFFF) to join a parent operating on any Pan ID. Changes to ID should be written to non-volatile memory using the WR command. ID changes are not used until the module is reset (FR, NR or power-up). CRE 0 - 0x3FFF, 0xFFFF 0x0234 /g3 (291d) BH Broadcast Hops. Set/Read the maximum number of hops for each broadcast data transmission. Setting this to 0 will use the maximum number of hops. CRE 0 - 0x0F -- NT Node Discover Timeout. Set/Read the amount of time a node will spend discovering other nodes when ND or DN is issued. CRE 0 - 0xFC /g3 [x 100 msec] 0x3C (60d) ND Node Discover. Discovers and reports all RF modules found. The following information is reported for each module discovered. /g3 MY<CR> /g3 SH<CR> /g3 SL<CR> /g3 NI<CR> (Variable length) /g3 PARENT_NETWORK ADDRESS (2 Bytes)<CR> /g3 DEVICE_TYPE<CR> (1 Byte: 0=Coord, 1=Router, 2=End Device) /g3 STATUS<CR> (1 Byte: Reserved) /g3 PROFILE_ID<CR> (2 Bytes) /g3 MANUFACTURER_ID<CR> (2 Bytes) /g3 <CR> /g3 After (NT * 100) milliseconds, the command ends by returning a <CR>. ND also accepts a Node Identifier (NI) as a parameter (optional). In this case, only a module that matches the supplied identifier will respond. If ND is sent through the API, each response is returned as a separate AT_CMD_Response packet. The data consists of the above listed bytes without the carriage return delimiters. The NI string will end in a "0x00" null character. CRE optional 20-Byte /g3 NI or MY value -- DN Destination Node. Resolves an NI (Node Identifier) string to a physical address (case- sensitive). The following events occur after the destination node is discovered: <AT Firmware> /g3 1. DL & DH are set to the extended (64-bit) address of the module with the matching /g3 NI (Node Identifier) string. /g3 2. OK (or ERROR)\\r is returned. /g3 3. Command Mode is exited to allow immediate communication <API Firmware> /g3 1. The 16-bit network and 64-bit extended addresses are returned in an API /g3 Command Response frame. If there is no response from a module within (NT * 100) milliseconds or a parameter is not specified (left blank), the command is terminated and an “ERROR” message is returned. In the case of an ERROR, Command Mode is not exited. CRE up to 20-Byte printable ASCII string -- JN Join Notification . Set/read the join notification value. If enabled, the device will send a transmission after joining a PAN identifying itself to other devices in the PAN. CRE 0 - Join notification disabled 1 - Send notification only to coordinator after joining PAN 2 - Send notification as broadcast transmission after joining PAN Table /g5615/g55609. Addressing /g561Commands /g561(Sub /g556categories /g561designated /g561within /g561{brackets}) AT /g3 Command Name and Description Node Type

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 31 Chapter /g5615/g561/g556/g561 XBee /g561Series /g5612/g561Command /g561Reference /g561Tables RF Interfacing 1./g561Node /g561types/g561that/g561support/g561the /g561command:/g561C/g561=/g561Coordinator,/g561R/g561=/g561Router,/g561E/g561=/g561End /g561Device Serial Interfacing (I/O) SC Scan Channels . Set/Read the list of channels to scan. Coordinator - Bit field list of channels to choose from prior to starting network. Router/End Device - Bit field list of channels that will be scanned to find a Coordinator/ Router to join. Changes to SC should be written using WR command. SC changes are not used until the module is reset (FR, NR or power-up). Bit (Channel): 0 (0x0B) 4 (0x0F) 8 (0x13) 12 (0x17) /g3 1 (0x0C) 5 (0x10) 9 (0x14) 13 (0x18) /g3 2 (0x0D) 6 (0x11) 10 (0x15) 14 (0x19) /g3 3 (0x0E) 7 (0x12) 11 (0x16) 15 (0x1A) CRE 1 - 0xFFFF[bitfield] 0x1FFE SD Scan Duration . Set/Read the scan duration exponent. Changes to SD should be written using WR command. /g3 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. /g3 Router / End Device - Duration of Active Scan (on each channel) used to locate an available 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). Sample Scan Duration times (13 channel scan): /g3 If SD = 0, time = 0.200 sec /g3 SD = 2, time = 0.799 sec /g3 SD = 4, time = 3.190 sec /g3 SD = 6, time = 12.780 sec CRE 0 - 7 [exponent] 3 NJ 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. The time starts once the Coordinator or Router has started. The timer is reset on power-cycle or when NJ changes. CR 0 – 0x40, 0xFF /g3 [x 1 sec] 0xFF /g3 (always allows joining) AR Aggregate Routing Notification . Set/read time between consecutive aggregate route broadcast messages. If used, AR should be set on only one device to enable many-to- one routing to the device. Setting AR to 0 only sends one broadcast CR 0 - 0xFF 0xFF AI Association Indication . Read information regarding last node join request: 0x00 - Successful completion - Coordinator started or Router/End Device found and joined with a parent. /g3 0x21 - Scan found no PANs /g3 0x22 - Scan found no valid PANs based on current SC and ID settings /g3 0x23 - Valid Coordinator or Routers found, but they are not allowing joining (NJ expired) /g3 0x27 - Node Joining attempt failed /g3 0x2A - Coordinator Start attempt failed‘ /g3 0xFF - Scanning for a Parent CRE 0 - 0xFF /g3 [read-only] -- Table /g5615/g556011. RF /g561Interfacing /g561Commands AT /g3 Command Name and Description Node Type PL Power Level . Select/Read the power level at which the RF module transmits conducted power. CRE 0 - 4 (XBee ) /g3 0 = -10 / 10 dBm /g3 1 = -6 / 12 dBm /g3 2 = -4 / 14 dBm /g3 3 = -2 / 16 dBm /g3 4 = 0 / 18 dBm PM Power Mode . Set/read the power mode of the device. Enabling boost mode will improve the receive sensitivity by 1dB and increase the transmit power by 2dB CRE 0-1, /g3 0= -Boost mode disabled, 1= Boost mode enabled. 1 Table /g5615/g556012. Serial /g561Interfacing /g561Commands AT /g3 Command Name and Description Node Type API Enable . Enable API Mode. The AP parameter is only applicable when using modules that contain the following firmware versions:1.1xx (coordinator), 1.3xx (router/end device) CRE 1 - 2 /g3 1 = API-enabled /g3 2 = API-enabled /g3 (w/escaped control /g3 characters) Table /g5615/g556010. Networking /g561Commands /g561(Sub /g556categories /g561designated /g561within /g561{brackets}) AT /g3 Command Name and Description Node Type

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 32 Chapter /g5615/g561/g556/g561 XBee /g561Series /g5612/g561Command /g561Reference /g561Tables 1./g561Node /g561types/g561that/g561support/g561the /g561command:/g561C/g561=/g561Coordinator,/g561R/g561=/g561Router,/g561E/g561=/g561End /g561Device /g3 2./g561Command /g561supported /g561by /g561modules/g561using /g561API/g561firmware /g561only I/O Commands AO 2 API Options . Configure options for API. Current options select the type of API RF data receive frame that is used. CRE 0 - ZigBee Rx data indicator enabled (0x90) 1 - Explicit Rx data indicator API frame enabled (0x91) 2 - Binding Rx data indicator API frame enabled (0x92) BD Interface Data Rate . Set/Read the serial interface data rate for communication between the module serial port and host. Any value above 0x07 will be interpreted as an actual baud rate. When a value above 0x07 is sent, the closest interface data rate represented by the number is stored in the BD register. CRE 0 - 7 /g3 (standard baud rates) /g3 0 = 1200 bps /g3 1 = 2400 /g3 2 = 4800 /g3 3 = 9600 /g3 4 = 19200 /g3 5 = 38400 /g3 6 = 57600 /g3 7 = 115200 /g3 0x80 - 0x38400 /g3 (non-standard rates) RO Packetization Timeout . Set/Read number of character times of inter-character silence required before packetization. Set (RO=0) to transmit characters as they arrive instead of buffering them into one RF packet. CRE 0 - 0xFF /g3 [x character times] 3 D7 DIO7 Configuration . Select/Read options for the DIO7 line of the RF module. CRE 0 - 1 /g3 0 = Disabled /g3 1 = CTS Flow Control 3 = Digital input 4 = Digital output, low 5 = Digital output, high 6 = RS-485 transmit enable (low enable) 7 = RS-485 transmit enable (high enable) D6 DIO6 Configuration. Configure options for the DIO6 line of the RF module. CRE 0 - Disabled 1 - RTS Flow Control 0 DIO5 Configuration . Configure options for the DIO5 line of the RF module. /g3 Options include: Associated LED indicator (LED blinks 1x/sec when the module is powered and 2x/sec when module is associated to a Coordinator.). CRE 0 - 1 /g3 0 = Disabled /g3 1 = Associated /g3 indication LED 3 = Digital input Table /g5615/g556013. Serial /g561Interfacing /g561Commands AT /g3 Command Name and Description Node Type P0 PWM0 Configuration . Select/Read function for PWM0. CRE 0 - 1 /g3 0 = Disabled /g3 1 = RSSI PWM P1 DIO11 Configuration . Configure options for the DIO11 line of the RF module. CRE 0 - Unmonitored digital input 3- Digital input, monitored 4- Digital output, default low 5- Digital output, default low P2 DIO12 Configuration . Configure options for the DIO12 line of the RF module. CRE 0 - Unmonitored digital input 3- Digital input, monitored 4- Digital output, default low 5- Digital output, default low Table /g5615/g556012. Serial /g561Interfacing /g561Commands AT /g3 Command Name and Description Node Type

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 33 Chapter /g5615/g561/g556/g561 XBee /g561Series /g5612/g561Command /g561Reference /g561Tables Diagnostics 1./g561Node /g561types/g561that/g561support/g561the /g561command:C /g561=/g561Coordinator,/g561R/g561=/g561Router,/g561E/g561=/g561End /g561Device AT Command Options RP RSSI PWM Timer. Time RSSI signal will be output after last transmission. When RP = 0xFF, output will always be on. CRE 0 - 0xFF [x 100 ms] 0x28 (40d) IS Force Sample Forces a read of all enabled digital and analog input lines. CRE -- -- D0 AD0/DIO0 Configuration . Select/Read function for AD0/DIO0. CRE 0, 2-5 0 – Disabled 2 - Analog input, single ended 3 – Digital input 4 – Digital output, low 5 – Digital output, high D1 AD1/DIO1 Configuration . Select/Read function for AD1/DIO1. CRE 0, 2-5 0 – Disabled 2 - Analog input, single ended 3 – Digital input 4 – Digital output, low 5 – Digital output, high D2 AD2/DIO2 Configuration. Select/Read function for AD2/DIO2. CRE 0, 2-5 0 – Disabled 2 - Analog input, single ended 3 – Digital input 4 – Digital output, low 5 – Digital output, high D3 AD3/DIO3 Configuration. Select/Read function for AD3/DIO3. CRE 0, 2-5 0 – Disabled 2 - Analog input, single ended 3 – Digital input 4 – Digital output, low 5 – Digital output, high D4 DIO4 Configuration. Select/Read function for DIO4 . CRE 0, 3-5 0 – Disabled 3 – Digital input 4 – Digital output, low 5 – Digital output, high Table /g5615/g556014. Diagnostics /g561Commands AT /g3 Command Name and Description Node Type VR Firmware Version . Read firmware version of the module. CRE 0 - 0xFFFF [read-only] Factory-set HV Hardware Version . Read hardware version of the module. CRE 0 - 0xFFFF [read-only] Factory-set Table /g5615/g556015. AT /g561Command /g561Options /g561Commands AT /g3 Command Name and Description Node Type Command Mode Timeout. Set/Read the period of inactivity (no valid commands received) after which the RF module automatically exits AT Command Mode and returns to Idle Mode. CRE 2 - 0x028F [x 100 ms] 0x64 (100d) CN 2 Exit Command Mode. Explicitly exit the module from AT Command Mode. CR E -- -- GT 2 Guard Times . Set required period of silence before and after the Command Sequence Characters of the AT Command Mode Sequence (GT + CC + GT). The period of silence is used to prevent inadvertent entrance into AT Command Mode. CRE 1 - 0x0CE4 [x 1 ms] /g3 (max of 3.3 decimal sec) 0x3E8 /g3 (1000d) Table /g5615/g556013. Serial /g561Interfacing /g561Commands AT /g3 Command Name and Description Node Type

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 34 Chapter /g5615/g561/g556/g561 XBee /g561Series /g5612/g561Command /g561Reference /g561Tables 1./g561Node /g561types/g561that/g561support/g561the /g561command:/g561C/g561=/g561Coordinator,/g561R/g561=/g561Router,/g561E/g561=/g561End /g561Device /g3 2./g561Command /g561supported /g561by /g561modules/g561using /g561AT /g561Command /g561firmware /g561only Sleep Commands CC 2 Command Sequence Character . Set/Read the ASCII character value to be used between Guard Times of the AT Command Mode Sequence (GT + CC + GT). The AT Command Mode Sequence enters the RF module into AT Command Mode. CC command is only applicable when using modules that contain the following “AT Command” firmware versions: 8.0xx (Coordinator), 8.2xx (Router), 8.4xx (End Device) CRE 0 - 0xFF 0x2B /g3 (‘+’ ASCII) Table /g5615/g556016. Sleep /g561Commands AT /g3 Command Name and Description Node Type SM Sleep Mode Sets the sleep mode on the RF module RE 0-Sleep disabled 1-Pin sleep enabled 4-Cyclic sleep enabled Note: When SM=0, the device operates as a router. When SM changes to a non-zero value, the router leaves the network and rejoins as an end device. Only end devices can sleep SN Number of Sleep Periods. Sets the number of sleep periods to not assert the On/Sleep pin on wakeup if no RF data is waiting for the end device. This command allows a host application to sleep for an extended time if no RF data is present RE 1-0xFF 1 SP Sleep Period. This value determines how long the end device will sleep at a time, up to 28 seconds. (The sleep time can effectively be extended past 28 seconds using the SN command.) On the parent, this value determines how long the parent will buffer a message for the sleeping end device. It should be set at least equal to the longest SP time of any child end device. CRE 0x20 - 0xAF0 x 10ms (Quarter second resolution) 0x7D0 (20 seconds) ST Time Before Sleep Sets the time before sleep timer on an end device.The timer is reset each time serial or RF data is received. Once the timer expires, an end device may enter low power operation. Applicable for cyclic sleep end devices only. RE 1 - 0xFFFE (x 1ms) 0x1388 (5 seconds) Table /g5615/g556015. AT /g561Command /g561Options /g561Commands AT /g3 Command Name and Description Node Type

©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 35 6. /g561/g561 API /g561Operation As an alternative to Transparent Operation, API (Application Programming Interface) Operations are available. API operation requires that communication with the module be done through a structured interface (data is communicated in frames in a defined order). The API specifies how commands, command responses and module status messages are sent and received from the module using a UART Data Frame. 6.0.1. API Frame Specifications Two API modes are supported and both can be enabled using the AP (API Enable) command. Use the following AP parameter values to configure the module to operate in a particular mode:

  • AP = 1: API Operation
  • AP = 2: API Operation (with escaped characters) API Operation (AP parameter = 1) When this API mode is enabled (AP = 1), the UART data frame structure is defined as follows: Figure /g5616/g55606. UART /g561Data /g561Frame /g561Structure: MSB /g561=/g561Most/g561Significant/g561Byte,/g561LSB /g561=/g561Least/g561Significant/g561Byte Any data received prior to the start delimiter is silently discarded. If the frame is not received correctly or if the checksum fails, the module will reply with a module status frame indicating the nature of the failure. 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: Figure /g5616/g55607. UART /g561Data /g561Frame /g561Structure /g561/g556/g561 with /g561escape /g561control /g561characters: MSB /g561=/g561Most/g561Significant/g561Byte,/g561LSB /g561=/g561Least/g561Significant/g561Byte Escape characters . When sending or receiving a UART data frame, specific data values must be escaped (flagged) so they do not interfere with the data frame sequencing. To escape an interfering data byte, insert 0x7D and follow it with the byte to be escaped XOR’d with 0x20. Start Delimiter (Byte 1) Length (Bytes 2-3) Frame Data (Bytes 4-n) Checksum (Byte n + 1) 0x7E MSB LSB API-specific Structure 1 Byte Start Delimiter (Byte 1) Length (Bytes 2-3) Frame Data (Bytes 4-n) Checksum (Byte n + 1) 0x7E MSB LSB API-specific Structure 1 Byte Characters Escaped If Needed

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 36 Chapter /g5616/g561/g556/g561 API /g561Operation Data bytes that need to be escaped:

  • 0x7E – Frame Delimiter
  • 0x7D – Escape
  • 0x11 – XON
  • 0x13 – XOFF Note: In the above example, the length of the raw data (excluding the checksum) is 0x0002 and the checksum of the non-escaped data (excluding frame delimiter and length) is calculated as: /g3 0xFF - (0x23 + 0x11) = (0xFF - 0x34) = 0xCB. Checksum To test data integrity, a checksum is calculated and verified on non-escaped data. To calculate : Not including frame delimiters and length, add all bytes keeping only the lowest 8 bits of the result and subtract the result from 0xFF. To verify : Add all bytes (include checksum, but not the delimiter and length). If the checksum is correct, the sum will equal 0xFF. 6.0.2. API Types Frame data of the UART data frame forms an API-specific structure as follows: Figure /g5616/g55608. UART /g561Data /g561Frame /g561&/g561API /g556specific /g561Structure: The cmdID frame (API-identifier) indicates which API messages will be contained in the cmdData frame (Identifier-specific data). Refer to the sections that follow for more information regarding the supported API types. Note that multi-byte values are sent big endian. Modem Status API Identifier: 0x8A /g3 RF module status messages are sent from the module in response to specific conditions. Figure /g5616/g55609. /g561Modem /g561Status /g561Frames Example - Raw UART Data Frame (before escaping interfering bytes): /g3 0x7E 0x00 0x02 0x23 0x11 0xCB 0x11 needs to be escaped which results in the following frame: /g3 0x7E 0x00 0x02 0x23 0x7D 0x31 0xCB Length (Bytes 2-3) Checksum (Byte n + 1) MSB LSB 1 Byte Start Delimiter (Byte 1) 0x7E Frame Data (Bytes 4- n) API-specific Structure Identifier-specific Data cmdData API Identifier cmdID cmdData 0x8A Length Checksum Start Delimiter Frame Data Identifier-specific Data API Identifier MSB LSB 0x7E 1 Byte API-specific Structure Status (Byte 5) 0 = Hardware reset 1 = Watchdog timer reset 2 = Joined 3 = Unjoined 6 = Coordinator started

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 37 Chapter /g5616/g561/g556/g561 API /g561Operation Advanced Modem Status Frame (0x8C) API Identifier Name: Advanced Modem Status Frame /g3 API Identifier Value: 0x8C /g3 Product support: XBEE Series 2 0x7E API-specific Structure 1 Byte MSB LSB 0x8C cmdData Status ID Status ID Start deliminator Length Frame Data Checksum API Identifier Identifier specific data 64-bit Addr] + [16-bit Addr] + [Type] + [Join Actio n] Type 0 – Coordinator Type 1 – Router Type 2 – End Device [Bind Table Index] + [Bind Type] Bind Type 1 – Unicast Binding Bind Type 2 – Aggregation Binding Bind Type 3 – Multicast Binding Join Action 0 – Device left network Join Action 1 – Device joined network

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 38 Chapter /g5616/g561/g556/g561 API /g561Operation AT Command API Identifier Value: 0x08 /g3 Allows for module parameter registers to be queried or set. Figure /g5616/g55610. AT /g561Command /g561Frames Figure /g5616/g55611. Example: /g561API /g561frames /g561when /g561reading /g561the /g561NJ /g561parameter /g561value /g561of /g561the /g561module. Figure /g5616/g55612. Example: /g561API /g561frames /g561when /g561modifying /g561the /g561NJ /g561parameter /g561value /g561of /g561the /g561module. A string parameter used with the NI (Node Identifier), ND (Node Discover) and DH (Destination Address High) command is terminated with a 0x00 character. AT Command - Queue Parameter Value API Identifier Value: 0x09 /g3 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 AC (Apply Changes) command is issued. Register queries (reading parameter values) are returned immediately. Figure /g5616/g55613. AT /g561Command /g561Frames /g561/g3 (Note /g561that /g561frames /g561are /g561identical /g561to /g561the /g561“AT /g561Command” /g561API /g561type /g561except /g561for /g561the /g561API /g561identifier.) cmdData 0x08 Length Checksum Start Delimiter Frame Data Identifier-specific Data API Identifier MSB LSB 0x7E 1 Byte API-specific Structure Frame ID (Byte 5) Identifies the UART data frame for the host to correlate with a subsequent ACK (acknowledgement). If set to ‘0’, no response is sent. AT Command (Bytes 6-7) Command Name - Two ASCII characters that identify the AT Command. Parameter Value (Byte(s) 8-n) If present, indicates the requested parameter value to set the given register. If no characters present, register is queried. */g561Length /g561[Bytes] /g561=/g561API /g561Identifier /g561+/g561Frame /g561ID /g561+/g561AT /g561Command /g561“R” /g561value /g561was /g561arbitrarily /g561selected. Checksum 0x0D Byte 8 AT Command Bytes 6-7 Frame ID 0x52 (R) Byte 5 0x4E (N) 0x4A (J) API Identifier 0x08 Byte 4 Start Delimiter Byte 1 0x7E Length* Bytes 2-3 0x00 0x04 */g561Length /g561[Bytes] /g561=/g561API /g561Identifier /g561+/g561Frame /g561ID /g561+/g561AT /g561Command /g561+/g561Parameter /g561Value /g561“M” /g561value /g561was /g561arbitrarily /g561selected. Checksum 0xD2 Byte 9 AT Command Bytes 6-7 0x4E (N) 0x4A (J) Parameter Value 0x40 Bytes 8 Frame ID 0x4D (M) Byte 5 Length* Bytes 2-3 0x00 0x05 API Identifier 0x08 Byte 4 Start Delimiter Byte 1 0x7E cmdData 0x09 Length Checksum Start Delimiter Frame Data Identifier-specific Data API Identifier MSB LSB 0x7E 1 Byte API-specific Structure Frame ID (Byte 5) Identifies the UART data frame for the host to correlate with a subsequent ACK (acknowledgement). If set to ‘0’, no response is requested. AT Command (Bytes 6-7) Command Name - Two ASCII characters that identify the AT Command. Parameter Value (Byte(s) 8-n) If present, indicates the requested parameter value to set the given register. If no characters present, register is queried.

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 39 Chapter /g5616/g561/g556/g561 API /g561Operation AT Command Response API Identifier Value: 0x88 /g3 Response to previous command. 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). These commands will end by sending a frame with a status of ATCMD_OK and no cmdData. Figure /g5616/g55614. AT /g561Command /g561Response /g561Frames. ZigBee Transmit Request API Identifier Value: 0x10 /g3 A TX Request message will cause the module to send RF Data as an RF Packet.TX Packet Frames cmdData 0x88 Length Checksum Start Delimiter Frame Data Identifier-specific Data API Identifier MSB LSB 0x7E 1 Byte API-specific Structure Frame ID (Byte 5 ) Identifies the UART data frame being reported. Note: If Frame ID = 0 in AT Command Mode, no AT Command Response will be given. AT Command (Bytes 6-7) Command Name - Two ASCII characters that identify the AT Command. Status (Byte 8) 0 = OK 1 = ERROR Value (Byte(s) 9-n) The HEX (non-ASCII) value of the requested register 0x10 Length Checksum Start Delimiter Frame Data Identifier-specific Data API Identifier MSB LSB 0x7E 1 Byte API-specific Structure 16-bit Destination Network Address (Bytes 14-15) MSB first, LSB last. Set to 0xFFFE for Broadcast TX or if Network Address is not known 64-bit Destination Address (Bytes 6-13) MSB first, LSB last. Broadcast = 0x000000000000FFFF Broadcast Radius (Byte 16) Sets maximum number of hops a broadcast transmission can traverse. If set to 0, the TX radi us will be set to the network maximum hops value (10). Options (Byte 17) 0x01 = Disable ACK 0x02 = Disable Network Address Discovery All other bits must be set to 0. Frame ID (Byte 5) Identifies the UART data frame for the host to correlate with a subsequent ACK (acknowledgement). Setting Frame ID to ‘0' will disable response frame. cmdData RF Data (Byte(s) 18-n) Up to 72 Bytes per packet

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 40 Chapter /g5616/g561/g556/g561 API /g561Operation Explicit Addressing ZigBee Command Frame (0x11) API Identifier Name: Explicit Addressing ZigBee Command Frame /g3 API Identifier Value: 0x11 /g3 Product support: XBee Series 2 0x7E API-specific Structure 1 Byte MSB LSB Start delimiter Length Frame Data Checksum 0x11 cmdData API Identifier Identifier specific data Identifies the UART data frame for the host correlate with a subsequent ACK (acknowledgement). Setting Frame ID to ‘0’ will disable response frame. Frame ID (byte 5) 64-bit Destination Address (bytes 6-13) Destination 64-bit (extended) address. Set to 0xFFFF for broadcast. 16-bit Destination Network Address (byted 14-15) Destination network address (if known). Set to 0xFFFE for broadcast transmissions or if the destination network address is not known. Source endpoint (byte 16) Source endpoint for the transmission. Destination endpoint (byte 17) Destination endpoint for the transmission. Reserved (byte 18) Set to 0 Cluster ID (byte 19) Cluster ID used in the transmission Profile ID (bytes 20-21) Profile ID used in the transmission Broadcast Radius (byte 22) Sets the maximum number of hops a broadcast transmission can traverse. If set to 0, the transmission radius will be set to the network maximum hops value. Options (byte 23) Set to 0 RF Data (byte 24-n) Up to 72 bytes

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 41 Chapter /g5616/g561/g556/g561 API /g561Operation Binding Table ZigBee Command Frame (0x12) API Identifier Name: Binding Table ZigBee Command Frame /g3 API Identifier Value: 0x12 /g3 Product support: XBee Series 2 0x7E API-specific Structure 1 Byte MSB LSB Start delimiter Length Frame Data Checksum 0x12 cmdData API Identifier Identifier specific data Binding table index (byte 6) This field specifies an index in the binding table. Specifies the source endpoint for the transmission Source endpoint (bytes 7) Set to 0 Cluster ID the packet was addressed to Reserved (byte 9) Cluster ID (byte 10) Set to 0 Options (byte 11) Up to 72 bytes RF data (byte 12-n) Destination endpoint (byte 8) Frame ID (byte 5) Identifies the UART data frame for the host correlate with a subsequent ACK (acknowledgement). Setting Frame ID to ‘0’ will disable response frame. Destination endpoint for the transmission

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 42 Chapter /g5616/g561/g556/g561 API /g561Operation ZigBee Transmit Status API Identifier Value: 0x8B /g3 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. Figure /g5616/g55615. TX /g561Status /g561Frames ZigBee Receive Packet API Identifier Value: 0x90 /g3 When the module receives an RF packet, it is sent out the UART using this message type. Figure /g5616/g55616. RX /g561Packet /g561Frames cmdData 0x8B Length Checksum Start Delimiter Frame Data Identifier-specific Data API Identifier MSB LSB 0x7E 1 Byte API-specific Structure Remote Network Address (Bytes 6-7) 16-bit Network Address the packet was delivered to (if success). If not success, this address matches the Destination Network Address that was provided in the Transmit Request Frame. Transmit Retry Count (Byte 8) The number of application transmission retries that took place. Discovery Status (Byte 10) 0x00 = No Discovery Overhead 0x01 = Address Discovery 0x02 = Route Discovery 0x03 = Address and Route Discovery Delivery Status (Byte 9) 0x00 = Success 0x02 = CCA Failure 0x21 = Network ACK Failure 0x22 = Not Joined to Network 0x23 = Self-addressed 0x24 = Address Not Found 0x25 = Route Not Found Frame ID (Byte 5) Identifies UART data frame being reported. cmdData 0x90 Length Checksum Start Delimiter Frame Data Identifier-specific Data API Identifier MSB LSB 0x7E 1 Byte API-specific Structure bit 0 = Packet Acknowledged bit 1 = Broadcast Address bits 2-7 [reserved] Up to 72 Bytes per packet 64-bit Address (Bytes 5-12) Options (Byte 15) RF Data (Byte(s) 16-n) 16-bit Network Address (Bytes 13-14) MSB (most significant byte) first, LSB (least significant) last MSB (most significant byte) first, LSB (least significant) last

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 43 Chapter /g5616/g561/g556/g561 API /g561Operation ZigBee Explicit Rx Indicator (0x91) API Identifier Name: ZigBee Explicit RX Indicator /g3 API Identifier Value: 0x91 /g3 Product support: XBee Series 2 When the modem receives a ZigBee RF packet it is sent out the UART using this message type if the EXPLICIT_RECEIVE_OPTION bit is set in AO. 0x7E API-specific Structure 1 Byte MSB LSB 0x91 cmdData Start delimiter Length Frame Data Checksum AP Identifier Identifier specific data Destination 64-bit (extended) address. Set to 0xFFFF for broadcast. 64-bit Source address (bytes 5-12) Destination network address (if known). Set to 0xFFFE for broadcast transmissions or if the destination network address is not known. Endpoint of the source that initiated the transmission Endpoint of the destination the message is addressed to. Cluster ID the packet was addressed to. Profile ID the packet was addressed to. (Multiple profile IDs not yet supported.) Source endpoint (byte 15) Not yet defined Up to 72 bytes. 16-bit Source network address (13-14) Destination endpoint (byte 16) Cluster ID (byte 17-18) Profile ID (byte 19-20) Options (byte 21) RF data (byte 22-n)

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 44 Chapter /g5616/g561/g556/g561 API /g561Operation ZigBee Binding Rx Indicator (0x92) API Identifier Name: ZigBee Binding RX Indicator /g3 API Identifier Value: 0x92 /g3 Product support: XBee Series 2 When the modem receives a ZigBee RF packet it is sent out the UART using this message type if the BINDING_TABLE_INDEX_RECEIVE_OPTION bit is set in AO. 0x7E API-specific Structure 1 Byte MSB LSB Start delimiter Length Frame Data Checksum 0x92 cmdData AP Identifier Identifier specific data Binding table index (byte 5) Indicates the binding table index entry that was created. This index could be used to send a reply to the originator Endpoint of the destination the message is sent to Destination endpoint (byte 6) Cluster ID the packet was addressed to Cluster ID (byte 7-8) Not yet defined Options (byte 9) Up to 72 bytes RF data (byte 10-n)

©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 45 7. /g561/g561 Examples 7.0.1. Starting an XBee Network Start the coordinator Adding a Child (router) Transmit Data 1. Determine the operating channels list using the SC (Scan Channels) command and the PAN ID to operate using the ID (PAN ID) command. The default SD (Scan Duration) parameter value should suffice. If these values are changed from the defaults, they must be written to non-volatile memory using the WR (Write) command. 2. The Associate LED, if enabled using the D5 (DIO5 Configuration) parameter, will start blink- ing 1x per second once the coordinator has started. If API is enabled (AP parameter > 0): The API Modem Status “Coordinator Started” is sent out the UART. 3. The AI (Association Indication) parameter will b e 0 signifying a successful startup. 4. The MY (16-bit Source address) attribute is 0 /g3 (the 16-bit network address of a ZigBee coordinator). 5. After startup, the coordinator will allow joinin g based on its NJ (Node Join Time) value. 6. It is recommended that the coordinator be config ured with an NI-String identifier. This NI- String identifier should be written to non-volatile memory using the WR (Write) command to be preserved through power-loss. 1. Determine the operating channel list (SC) and th e desired PAN ID to join (ID) (0xFFFF - join any Pan). The default SD parameter should suffice. If these values are changed from the defaults, they must be written to non-volatile memory using the WR (Write) command. 2. The router, on power-up, will attempt to locate a parent to join according to its SC and ID parameters. 3. Once the router has joined a parent, the Associa te LED, if enabled (D5), will start blinking 2x per second. The ID and CH parameters will reflect the operating PAN ID and Channel. The MY parameter will reflect the 16-bit network address of the router. The MP command returns the 16-bit network address of the router’s parent (node it joined to). If API is enabled (AP parameter > 0): The API Modem Status “Joined” is sent out the UART. 4. If the router is not joining as expected, the AI (Association Indication) parameter can be read to determine the cause of failure. Verify the PAN contains a coordinator or nearby joined router that has matching Channel (SC, CH) and PAN ID (ID) settings and is allowing nodes to join to it (NJ parameter). 5. Once the router has joined a PAN, the router wil l allow joining based on the NJ parameter. 6. It is recommended that the router be configured with a unique NI-String identifier. This NI- String identifier should be written to non-volatile memory using the WR (Write) command to be preserved through power-loss. 1. Start a coordinator (refer to instructions above) . 2. Add one or more Child router(s) to the coordinato r (refer to instructions above). 3. Once the coordinator has started, all routers and End Devices should join to a parent and their Associate LED should blink 2x per second. 4. If any nodes have not joined, read the AI command to determine why. 5. Issue the ATND command on the coordinator to get a list of all nodes on the network. 6. Use the ‘Terminal’ tab of the X-CTU Software to send serial data between nodes. The data should be transmitted from the source to the destination node as specified by the DH & DL parameters. 7. (Optional) Change the Destination address on any node to one of the 64-bit addresses dis- covered using the ND command in step 5 (DH, DL Commands, or in the ‘ZigBee Transmit Request’ API Frame). Then repeat step 6 to transmit data.

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 46 Chapter /g5617/g561/g556/g561 Examples 7.0.2. AT Command Programming Examples Setup Sample Configuration: Modify RF Module Destination Address Sample Configuration: Restore RF Module Defaults The programming examples in this section require the installation of MaxStream's X-CTU Soft- ware and a serial connection to a PC. (MaxStream stocks RS-232 and USB boards to facilitate interfacing with a PC.) 1. Install MaxStream's X-CTU Software to a PC by dou ble-clicking the "setup_X-CTU.exe" file. (The file is located on the MaxStream CD and under the 'Software' section of the following web page: www.maxstream.net/support/downloads.php) 2. Mount the RF module to an interface board, then c onnect the module assembly to a PC. 3. Launch the X-CTU Software and select the 'PC Sett ings' tab. Verify the baud and parity set- tings of the Com Port match those of the RF module. NOTE: Failure to enter AT Command Mode is most commonly due to baud rate mismatch. Ensure the ‘Baud’ setting on the ‘PC Settings’ tab matches the interface data rate of the RF mod- ule. By default, the BD parameter = 3 (which corresponds to 9600 bps). Example: Utilize the X-CTU “Terminal” tab to change the RF module's DL (Destination Address Low) parameter and save the new address to non-volatile memory. After establishing a serial connection between the RF module and a PC [refer to the 'Setup' sec- tion above], select the “Terminal” tab of the X-CTU Software and enter the following command lines (‘CR’ stands for carriage return): Method 1 (One line per command) Send AT Command /g3 +++ /g3 ATDL <Enter> /g3 ATDL1A0D <Enter> /g3 ATWR <Enter> /g3 ATCN <Enter> System Response /g3 OK <CR> (Enter into Command Mode) /g3 {current value} <CR> (Read Destination Address Low)/g3 OK <CR> (Modify Destination Address Low) /g3 OK <CR> (Write to non-volatile memory) /g3 OK <CR> (Exit Command Mode) Method 2 (Multiple commands on one line) Send AT Command /g3 +++ /g3 ATDL <Enter> /g3 ATDL1A0D,WR,CN <Enter> System Response /g3 OK <CR> (Enter into Command Mode) /g3 {current value} <CR> (Read Destination Address Low)/g3 Example: Utilize the X-CTU “Modem Configuration” tab to restore default parameter values. After establishing a connection between the module and a PC [refer to the 'Setup' section above], select the “Modem Configuration” tab of the X-CTU Software. 1. Select the 'Read' button. 2. Select the 'Restore' button. Refer/g561to /g561the /g561‘X /g556CTU’ /g561sec /g556 tion /g561of /g561the /g561Develop /g556 ment /g561Guide /g561[Appendix /g561 B] /g561for /g561more /g561information /g561 regarding /g561the /g561X/g556CTU /g561 configuration /g561software.

©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 47 8. /g561/g561 Manufacturing /g561Support 8.1. Interoperability with other EM250 Devices The XBee module may integrate functionality to some extent with other EM250 based devices. The following should be considered when communicating between a MaxStream XBee module and another EM250-based device. 8.1.1. XBee Data Transmission and Reception The XBee firmware inserts 8 bytes at the beginning of the data payload that represent the 64-bit address of the source module. Custom devices that transmit to an XBee or receive data from an XBee should make provisions to manage these 8 address bytes in the payload. Data packets destined for an XBee module should include the source address of the sending device with the most significant byte copied first. 8.1.2. Customizing XBee Default Parameters Once module parameters are determined, MaxStream can manufacture modules with specific customer-defined configurations. These custom configurations can lock in a firmware version or set command values when the modules are manufactured, eliminating the need for customers to adjust module parameters on arrival. Contact MaxStream to create a custom configuration. 8.1.3. XBee Series 2 Custom Bootloader XBee Series 2 modules use a modified version of Ember’s boot loader. This version supports a custom entry mechanism. To invoke the boot loader, do the following: 1. Set DTR low (TTL 0V) and RTS high. 2. Send a serial break to the DIN pin and power cycle or reset the module. 3. When the module powers up, DTR and DIN should be low (TTL 0V) and RTS should be high. 4. Terminate the serial break and send a carriage return at 115200bps to the module. 5. If successful, the module will send the Ember boot loader menu out the DOUT pin at 115200bps. 6. Commands can be sent to the boot loader at 115200bps. Programming XBee Series 2 Modules Firmware on the XBee Series 2 modules can be upgraded using the MaxStream x-CTU program to interface with the DIN and DOUT serial lines, or with an InSight programmer device via InSight header.

©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 48 Appendix /g561A:Definitions Definitions Table /g561A/g55601. Terms /g561and /g561Definitions ZigBee Node Types Coordinator A node that has the unique function of f orming 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). -- One coordinator per PAN /g3 -- Establishes/Organizes PAN /g3 -- Can route data packets to/from other nodes /g3 -- Can be a data packet source and destination /g3 -- Mains-powered Refer to the XBee Series 2 coordinator section for more information. Router A node that creates/maintains network informa tion 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. A router can participate in routing packets and is intended to be a mains-powered node. -- Several routers can operate in one PAN /g3 -- Can route data packets to/from other nodes /g3 -- Can be a data packet source and destination /g3 -- Mains-powered Refer to the XBee Series 2 router section for more information. End device End devices must always interact with the ir parent to receive or transmit data. (See ‘joining definition.) They are intended to sleep periodically and therefore have no routing capacity. An end device can be a source or destination for data packets but cannot route packets. End devices can be battery-powered and offer low-power operation. -- Several end devices can operate in one PAN /g3 -- Can be a data packet source and destination /g3 -- All messages are relayed through a coordinator or router /g3 -- Lower power modes ZigBee Protocol PAN Personal Area Network - A data communication net work that includes a coordinator and one or more routers/end devices.

XBee /g561Series /g5612/g561OEM /g561RF /g561Modules /g561/g556/g561 ZigBee /g561/g556/g561 v1.x1x /g561[2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 49 Chapter /g561A/g561/g556/g561 Definitions Joining The process of a node becoming part of a Zig Bee 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). Network Address The 16-bit address assigned to a nod e after it has joined to another node. The coordinator always has a network address of 0. Operating Channel The frequency selected for data co mmunications between nodes. The operating channel is selected by the coordinator on power-up. Energy Scan A scan of RF channels that detects the a mount of energy present on the selected channels. The coordinator uses the energy scan to determine the operating channel. Route Request Broadcast transmission sent by a coord inator or router throughout the network in attempt to establish a route to a destination node. Route Reply Unicast transmission sent back to the or iginator of the route request. It is initiated by a node when it receives a route request packet and its address matches the Destination Address in the route request packet. Route Discovery The process of establishing a route to a destination node when one does not exist in the Routing Table. It is based on the AODV (Ad-hoc On-demand Distance Vector routing) protocol. ZigBee Stack ZigBee is a published specification set of high-level communication protocols for use with small, low-power modules. The ZigBee stack provides a layer of network functionality on top of the 802.15.4 specification. For example, the mesh and routing capabilities available to ZigBee solutions are absent in the 802.15.4 protocol. Table /g561A/g55601. Terms /g561and /g561Definitions

©/g5612007 /g561MaxStream, /g561Inc. /g561/g561/g561/g561/g561 50 Appendix /g561B:Migrating /g561from /g561the /g561802.15.4 /g561 Protocol This following are some of the differences in the ZigBee firmware assuming familiarity with the 802.15.4 application:

  • ZigBee Command Set
  • Address Assignment
  • API / AT Firmware Versions Also, refer to the “Getting Started” section for more information. ZigBee Command Set Modified Commands
  • CH - Read Only command that displays the operating channel that was selected from SC.
  • MY - Read Only command that displays the assigned 16-bit Network Address of the device.
  • AI - ZigBee definitions added to this command. See documentation.
  • A1, A2 and CE commands are not supported. New Commands
  • NJ (Node Join Time) - This value determines how long a Coordinator or Router will allow other devices to join to it. This command is supported on Coordinators & Routers only.
  • MP (16-bit Parent Network Address). This value represents the 16-bit parent Network Address of the module.
  • BH (Broadcast Hops). This value sets the maximum number of hops for each broadcast data transmission. Setting this to 0 will use the maximum number of hops. API / AT Firmware Versions The 802.15.4 firmware supports the AP command for setting the module into No API (AP=0), API without escaping (AP=1), or API with escaping (AP=2) modes. The first digit in the 802.15.4 firmware versions is a '1'. The ZigBee firmware comes in different versions to support the API interface (AP 1, 2 modes) or the AT command set (AP 0 mode). The first digit in the ZigBee firmware versions is an '8'. The following is a list of firmware versions:
  • 1.0xx - Coordinator, AT Command support (Transparent Mode)
  • 1.1xx - Coordinator, API support (AP 1, 2)
  • 1.2xx - Router, End Device, AT Command support (Transparent Mode)
  • 1.3xx - Router, End Device, API support (AP 1, 2)

©/g5612007 /g561MaxStream, /g561Inc. /g561/g561/g561/g561/g561 51 Appendix /g561C: /g561Agency /g561Certifications FCC, IC, and ETSI approvals pending.

©/g5612007 /g561Digi /g561International, /g561Inc. /g561 /g561/g561/g561/g561/g561 52 Appendix /g561D:Development /g561Guide XBee Series 2 Development Kits The XBee Series 2 Professional Development Kit includes the hardware and software needed to rapidly create long range wireless data links between nodes (XBee Series 2 Starter Kits that contain fewer modules and accessories are also available). Interfacing Options The development kit includes RS-232 and USB interface boards. The boards provide a connection to PC ports and therefore give access to the RF module registries. Parameters stored in the registry allow OEMs and integrators to customize the modules to suite the needs of their data radio systems. The following sections illustrate how to use the interface boards for development purposes. The MaxStream Interface board provides means for connecting the module to any node that has an available RS-232 or USB connector. Since the module requires signals to enter at TTL voltages, one of the main functions of the interface board is to convert signals between TTL levels and RS- 232 and USB levels. Table /g561D/g55601. Items /g561Included /g561in /g561the /g561Development /g561Kit Item Qty. Description Part # XBee Series 2 Module 5 (1) OEM RF Module, AT Coordinator with wire antenna (1) OEM RF Module, AT Router/End Device with wire antenna (1) OEM RF Module, AT Router/End Device with U.FL antenna (1) OEM RF Module, AT Router/End Device with chip antenna (1) OEM RF Module, AT Router/End Device with SMA antenna XB24-BWIt-002 XB24-BWIT-004 XB24-BUIT-004 XB24-BCIT-004 XB24-BSIT-004 RS-232 Development Board 4 Board for interfacing between modules and RS-232 nodes (Converts signal levels, displays diagnostic info, & more) XBIB-R USB Development Board 1 Board for interfacing between modules & USB nodes (Converts signal levels, displays diagnostic info, & more) XBIB-U RS-232 Cable (6’, straight-through) 1 Cable for connecting RS-232 interface board with DTE nodes (nodes that have a male serial DB-9 port - such as most PCs) JD2D3-CDS-6F USB Cable (6’) 1 Cable for connecting USB interface b oard to USB nodes JU1U2-CSB-6F Serial Loopback Adapter 1 [Red] Adapter for configuring the module assembly (module + RS-232 interface board) to function as a repeater for range testing JD2D3-CDL-A NULL Modem Adapter (male-to-male) 1 [Black] Adapter for connecting the module assembly (module + RS-232 interface board) to other DCE (female DB-9) nodes JD2D2-CDN-A NULL Modem Adapter (female-to-female) 1 [Gray] Adapter for connecting serial nodes. It allows users to bypass the radios to verify serial cabling is functioning properly. JD3D3-CDN-A Power Adapter (9VDC, 1 A) 1 Adapter for powering the RS-232 development board JP5P2-9V11-6F Battery Clip (9V) 1 Clip for remotely powering the RS -232 board w/ a 9V battery JP2P3-C2C-4I RPSMA Antenna 2 RPSMA half-wave dipole antenna (2.4 G Hz, 2.1 dB) A24-HASM-450 RF Cable Assembly 2 Adapter for connecting RPSMA ante nna to U.FL connector JF1R6-CR3-4I CD 1 Documentation and Software MD0030 Quick Start Guide 1 Step-by-step instruction on how to create wireless links & test range capabilities of the modules MD0026

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561 /g561/g561/g561/g561/g561 53 Development /g561Guide Note: In the following sections, an OEM RF Module mounted to an interface board will be referred to as a "Module Assembly". RS-232 Development Board External Interface B-01a. Reset Switch Figure /g561B/g55601. Front /g561View The Reset Switch is used to reset (re-boot) the RF module. This switch only applies when using the configuration tabs of MaxStream’s X-CTU Software. B-01b. I/O & Power LEDs LEDs indicate RF module activity as follows: Yellow (top LED) = Serial Data Out (to host) Green (middle) = Serial Data In (from host) Red (bottom) = Power/Association Indicator (Refer t o the D5 (DIO5 Configuration) parameter) B-01c. Serial Port Standard female DB-9 (RS-232) connector. B-01d. RSSI LEDs RSSI LEDs indicate the amount of fade margin present in an active wireless link. Fade margin is defined as the difference between the incoming signal strength and the module's receiver sensitivity.

3 LEDs ON = Very Strong Signal (> 30 dB fade margin)

2 LEDs ON = Strong Signal (> 20 dB fade margin)

1 LED ON = Moderate Signal (> 10 dB fade margin)

0 LED ON = Weak Signal (< 10 dB fade margin)

B-01e. Power Connector 5-14 VDC power connector B-02a. DIP Switch Figure /g561B/g55602. Back /g561View DIP Switch functions are not supported in this release. Future down- loadable firmware versions will support DIP Switch configurations. B/g55601a. Config /g561Switch B/g55601b. I/O /g561&/g561Power /g561LEDs B/g55601c. DB /g5569/g561Serial /g561Port B/g55601d RSSI /g561LEDs B/g55601e. Power /g561Connector B/g55602a. DIP /g561Switch

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561 /g561/g561/g561/g561/g561 54 Development /g561Guide RS-232 Pin Signals Figure /g561B/g55603. Pins /g561used /g561on /g561the /g561female /g561RS /g556232 /g561(DB /g5569) /g561Serial /g561Connector /g561/g561 */g561Functions /g561listed /g561in /g561the /g561implementation /g561column /g561may /g561not /g561be /g561available /g561at /g561the /g561time /g561of /g561release. Table /g561D/g55602. Pin /g561Assignments /g561and /g561Implementations DB-9 Pin RS-232 Name Description Implementation*

1 DCD Data-Carrier-Detect Connected to DSR (pin6)

2 RXD Receive Data Serial data exiting the module assembly

(to host)

3 TXD Transmit Data Serial data entering into the module assembly

(from host)

4 DTR Data-Terminal-Ready Can enable Power-Down on the module assembly

5 GND Ground Signal Ground

6 DSR Data-Set-Ready Connected to DCD (pin1)

7 RTS

/ CMD Request-to-Send / Command Mode Provides RTS flow control or enables Command Mode

8 CTS Clear-to-Send Provides CTS flow control

9 RI Ring Indicator Optional power input that is connected internally to

the positive lead of the front power connector

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561 /g561/g561/g561/g561/g561 55 Development /g561Guide Wiring Diagrams Figure /g561B/g55604. DTE /g561node /g561(RS /g556232, /g561male /g561DB /g5569/g561connector) /g561wired /g561to /g561a/g561DCE /g561Module /g561Assembly /g561(female /g561DB /g5569) /g561/g561 Figure /g561B/g55605. DCE /g561Module /g561Assembly /g561(female /g561DB /g5569/g561connector) /g561wired /g561to /g561a/g561DCE /g561node /g561(RS /g556232, /g561male /g561DB /g5569) /g561/g561 Sample Wireless Connection: DTE <--> DCE <--> DCE <--> DCE Figure /g561B/g55606. Typical /g561wireless /g561link /g561between /g561DTE /g561and /g561DCE /g561nodes

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561 /g561/g561/g561/g561/g561 56 Development /g561Guide Adapters The development kit includes several adapters that support the following functions:

  • Performing Range Tests
  • Testing Cables
  • Connecting to other RS-232 DCE and DTE nodes
  • Connecting to terminal blocks or RJ-45 (for RS-485/422 nodes) NULL Modem Adapter (male-to-male) Part Number: JD2D2-CDN-A (Black, DB-9 M-M) The male-to-male NULL modem adapter is used to connect two DCE nodes. A DCE node connects with a straight-through cable to the male serial port of a computer (DTE). Figure /g561B/g55607. Male /g561NULL /g561modem /g561adapter /g561and /g561pinouts Figure /g561B/g55608. Example /g561of /g561a/g561MaxStream /g561Radio /g561Modem /g561(DCE /g561node) /g561connecting /g561to /g561another /g561DCE /g561node) NULL Modem Adapter (female-to-female) Part Number: JD3D3-CDN-A (Gray, DB-9 F-F) The female-to-female NULL modem adapter is used to verify serial cabling is functioning properly. To test cables, insert the female-to-female NULL modem adapter in place of a pair of module assemblies (RS-232 interface board + XTend Module) and test the connection without the modules in the connection. Figure /g561B/g55609. Female /g561NULL /g561modem /g561adapter /g561and /g561pinouts Serial Loopback Adapter Part Number: JD2D3-CDL-A (Red, DB-9 M-F) The serial loopback adapter is used for range testing. During a range test, the serial loopback adapter configures the module to function as a repeater by looping serial data back into the radio for retransmission. Figure /g561D/g55601. Serial /g561loopback /g561adapter /g561and /g561pinouts

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561 /g561/g561/g561/g561/g561 57 Development /g561Guide USB Development Board External Interface B-11a. I/O & Power LEDs Figure /g561D/g55602. Front /g561View LEDs indicate RF module activity as follows: Yellow (top LED) = Serial Data Out (to host) Green (middle) = Serial Data In (from host) Red (bottom) = Power/Association Indicator (Refer t o the D5 (DIO5 Configuration) parameter) B-11b. RSSI LEDs RSSI LEDs indicate the amount of fade margin present in an active wireless link. Fade margin is defined as the difference between the incoming signal strength and the module's receiver sensitivity. B-11c. USB Port Standard Type-B OEM connector is used to communicate with OEM host and power the RF module. B-12a. DIP Switch Figure /g561D/g55603. Back /g561View DIP Switch functions are not supported in this release. Future down- loadable firmware versions will support the DIP Switch configurations. B-12b. Reset Switch The Reset Switch is used to reset (re-boot) the RF module. B/g55611a. I/O /g561&/g561Power /g561LEDs B/g55611b. RSSI /g561LEDs B/g55611c. USB /g561Port B/g55612a. DIP /g561Switch B/g55612a. Reset /g561Switch

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561 /g561/g561/g561/g561/g561 58 Development /g561Guide USB Pin Signals X-CTU Software X-CTU is a MaxStream-provided software program used to interface with and configure MaxStream RF Modules. The software application is organized into the following four tabs:

  • PC Settings tab - Setup PC serial ports for interfacing with an RF module
  • Range Test tab - Test the RF module's range and monitor packets sent and received
  • Terminal tab - Set and read RF module parameters using AT Commands
  • Modem Configuration tab - Set and read RF module parameters Figure /g561D/g55604. X /g556CTU /g561User /g561Interface /g561(PC /g561Settings, /g561Range /g561Test, /g561Terminal /g561and /g561Modem /g561Configuration /g561tabs) NOTE: PC Setting values are visible at the bottom of the Range Test, Terminal and Modem Configura- tion tabs. A shortcut for editing PC Setting values is available by clicking on any of the values. Install Double-click the "setup_X-CTU.exe" file and follow prompts of the installation screens. This file is located in the 'software' folder of the MaxStream CD and also under the 'Downloads' section of the following web page: www.maxstream.net/support/downloads.php Setup Serial Communications Software A terminal program is built into the X-CTU Software. Other terminal programs such as "HyperTerminal" can also be used. When issuing AT Commands through a terminal program interface, use the following syntax: Figure /g561D/g55605. Syntax /g561for /g561sending /g561AT /g561Commands Table /g561D/g55603. USB /g561signals /g561and /g561their /g561implantations /g561on /g561the /g561XBee/XBee /g556PRO /g561RF /g561Module Pin Name Description Implementation

1 VBUS Power Power the RF module

2 D- Transmitted & Received Data Transmit data to and from the RF module

3 D+ Transmitted & Received Data Transmit data to and from the RF module

4 GND Ground Signal Ground

To use the X-CTU software, a module assembly (An RF module mounted to an interface Board) must be connected to a serial port of a PC. The interface data rate and parity settings of the serial port ("PC Settings" tab) must match those of the module (BD (Baud Rate) and NB (Parity) parameters).

XBee/XBee /g556PRO /g561ZigBee /g561OEM /g561RF /g561Modules /g561v1.x1x /g561/g561 [2007.06.01] ©/g5612007 /g561Digi /g561International, /g561Inc. /g561 /g561/g561/g561/g561/g561 59 Development /g561Guide NOTE: To read a parameter value stored in a register, leave the parameter field blank. The example above issues the DL (Destination Address Low) command to change destination address of the module to "0x1F". To save the new value to the module’s non-volatile memory, issue WR (Write) command after modifying parameters.

©/g5612007 /g561Digi /g561International, /g561Inc. /g561/g561/g561/g561/g561 60 Appendix /g561E:Additional /g561Information 1-Year Warranty XBee Series 2 RF Modules from MaxStream, 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, MaxStream will repair or replace the defective product. For warranty service, return the defective product to MaxStream, shipping prepaid, for prompt repair or replacement. The foregoing sets forth the full extent of MaxStream's warranties regarding the Product. Repair or replacement at MaxStream's option is the exclusive remedy. THIS WARRANTY IS GIVEN IN LIEU OF ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, AND MAXSTREAM SPECIFICALLY DISCLAIMS ALL WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MAXSTREAM, ITS SUPPLIERS OR LICENSORS BE LIABLE FOR DAMAGES IN EXCESS OF THE PURCHASE PRICE OF THE PRODUCT, FOR ANY LOSS OF USE, LOSS OF TIME, INCONVENIENCE, COMMERCIAL LOSS, LOST PROFITS OR SAVINGS, OR OTHER INCIDENTAL, SPECIAL OR CONSE- QUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PRODUCT, TO THE FULL EXTENT SUCH MAY BE DISCLAIMED BY LAW. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES. THEREFORE, THE FOREGOING EXCLUSIONS MAY NOT APPLY IN ALL CASES. This warranty provides specific legal rights. Other rights which vary from state to state may also apply.

Ordering Information

Figure /g561E/g55601. /g561Divisions /g561of /g561the /g561XBee/XBee /g556PRO /g561RF /g561Module /g561Part /g561Numbers /g561 Contact MaxStream Free and unlimited technical support is included with every MaxStream Radio Modem sold. For the best in wireless data solutions and support, please use the following resources: MaxStream office hours are 8:00 am - 5:00 pm [U.S. Mountain Standard Time] Documentation: www.maxstream.net/support/downloads. php Technical Support: Phone. (866) 765-9885 toll-free U .S.A. & Canada /g3 (801) 765-9885 Worldwide Live Chat. www.maxstream.net E-Mail. rf-xperts@maxstream.net X B 2 4 - B I T - 0 0 Antenna Types S = RPSMA W = Wire Antenna C = Chip Antenna U = U.FL Connector Firmware versions 1 = Coordinator; API Operation 2 = Coordinator; Transparent Operation 3 = Router/End Device; API Operation 4 = Router/End Device, Transparent Operation