Home

XBee®/XBee-PRO® ZB OEM RF Modules

image

Contents

1. when AO 1 Figure 6 16 ZigBee Explicit Rx Indicators Start delimiter Length Frame Data Checksum MSB LSB API specific Structure 1 Byte API Identifier Identifier specific data 0x91 cmdData Cluster ID byte 17 18 64 bit Source address bytes 5 12 5 Custer ID the packet was addressed 1 to Destination 64 bit extended address Set to OxFFFF for broadcast Profile ID byte 19 20 2 _ 6 Profile ID the packet was 46 bit Source network address 13 14 ee addressed to Multiple profile IDs t yet ed Destination network address if known Set to OxFFFE for not yet supported broadcast transmissions or if the destination network address is not known Options byte 21 7 0x01 Packet Acknowedged Source endpoint byte 15 Lee 3 part byte 1 9 o is 0x02 Packet was a broadcast pd packet Endpoint of the source that initiated the transmission RF data byte 22 n 8 Destination endpoint byte 16 4 Ll Up to 72 bytes H H EE j Endpoint of the destination the message is addressed to 2008 Digi International Inc XBee X Bee PRO ZB OEM RF Modules ZigBee IO Data Sample Rx Indicator API Identifier Value 0x92 When the module receives an IO sample frame from a remote device it sends the sample out the UART using this frame type
2. Start Delimiter Length Frame Data Checksum Byte 1 Bytes 2 3 Bytes 4n Byten 1 Ox7E MSB LSB API specific Structure 1 Byte API Identifier Identifier specific Data cmdData The cmdID frame API identifier indicates which API messages will be contained in the cmdData frame Identifier specific data Note that multi byte values are sent big endian The XBee modules support the following API frames Table 6 016 API Frame Names and Values Modem Status AT Command 0x08 AT Command Queue Parameter Value 0x09 AT Command Response 0x88 Remote Command Request 0x17 Remote Command Response 0x97 ZigBee Transmit Request 0x10 Explicit Addressing ZigBee Command Frame 0x11 ZigBee Transmit Status 0x8B ZigBee Receive Packet AO 0 0x90 ZigBee Explicit Rx Indicator AO 1 0x91 ZigBee IO Data Sample Rx Indicator 0x92 XBee Sensor Read Indicator AO 0 0x94 Node Identification Indicator AO 0 0x95 2008 Digi International Inc 62 XBee X Bee PRO ZB OEM RF Modules 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 OxFF To verify Add all bytes include checksum but not the delimiter and length If the checksum is correct th
3. Ox7E MSB LSB API specific Structure 1 Byte Identifier Identifier specific Data 0x88 cmdData E Frame ID Byte 5 AT Command Bytes 6 7 Status Byte 8 s Value Byte s 9 n Identifies the UART data frame being reported Note If Frame ID 7 0 in AT Command Mode no AT Command Response will be given Command Name Two ASCII characters that identify the AT Command 0 OK 1 ERROR The HEX non ASCII value of the requested register 2 Invalid Command 3 Invalid Parameter Remote AT Command Request API Identifier Value 0x17 Allows for module parameter registers on a remote device to be queried or set Figure 6 10 Remote AT Command Request Start Delimiter Length Frame Data Checksum Ox7E MSB LSB API specific Structure 1 Byte API Identifier Identifier specific Data 0x17 cmdData Frame ID Byte 5 16 bit Destination Network Address bytes 14 15 Command Name bytes 17 18 Identifies the UART data frame for the host to correlate with a subsequent ACK acknowledgement If set to 0 no AT Command Response will be given Set to match the 16 bit network address of the destination MSB Name of the command first LSB last Set to OXFFFE for broadcast TX or if the network address is unknown 64 bit Destination Address
4. Part Number Type Description Gain Application aa Cable loss A24 Y6NF Yagi 6 element 8 8 dBi Fixed 2m NIA A24 Y7NF Yagi 7 element 9 0 dBi Fixed 2m NIA A24 Y9NF Yagi 9 element 10 0 dBi Fixed 2m N A A24 Y10NF Yagi 10 element 11 0 dBi Fixed 2m N A A24 Y12NF Yagi 12 element 12 0 dBi Fixed 2m N A A24 Y13NF Yagi 13 element 12 0 dBi Fixed 2m N A A24 Y15NF Yagi 15 element 12 5 dBi Fixed 2m N A A24 Y16NF Yagi 16 element 13 5 dBi Fixed 2m N A A24 Y16RM Yagi 16 element RPSMA connector 13 5 dBi Fixed 2m N A A24 Y18NF Yagi 18 element 15 0 dBi Fixed 2m N A Part Number Type Description Gain Application Eum Cable loss A24 C1 Surface Mount integral chip 1 5 dBi Fixed Mobile 20 cm NA A24 F2NF Omni directional Fiberglass base station 2 1 dBi Fixed Mobile 20 cm NA A24 F3NF Omni directional Fiberglass base station 3 0dBi Fixed Mobile 20 cm NA A24 F5NF Omni directional Fiberglass base station 5 0dBi Fixed Mobile 20 cm NA A24 F8NF Omni directional Fiberglass base station 8 0 dBi Fixed 2m NIA A24 FONF Omni directional Fiberglass base station 9 5 dBi Fixed 2m NIA A24 F10NF Omni directional Fiberglass base station 10 0 dBi Fixed 2m N A A24 F12NF Omni directional Fiberglass base station 12 0 dBi Fixed 2m N A A24 F15NF Omni directional Fiberglass base station 15 0 dBi Fixed 2m N A A24 WTNF Omni directional Base station T 2dBi Fixed 2m N A A24 M7NF Omni directional Mag mount base st
5. XBee X Bee PRO ZB OEM RF Modules Figure 3 05 ZigBee Layer Addressing Example ZigBee Device A ZigBee Device B Endpoint 1 Endpoint 40 41 2 adio B Endpoint 3 2 radio A Endpoint 42 Cluster ID TurnLightOff Data Transmission and Routing All data packets are addressed using both device and application layer addressing fields Data can be sent as a broadcast 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 Figure 3 06 Broadcast Data Transmission E Legend C Coordinator E R Router E End Device 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 bo 2008 Digi International Inc XBee X Bee PRO ZB OEM RF Modules not endlessly transmitted Each entry persists for 8 seconds The broadcast transmission table holds 8 entries For each broadcast transmission the ZigBee stack must reserve buffer space for a copy of the data packet This copy is us
6. Figure 6 17 IO Data Sample Rx Indicators ngin rrame vata atar venmner Le vnecksum 0 7 MSB LSB APl specific Structure 1 Byte API Identifier Identifier specific Data 0x92 cmdData Ml Ts COMM se CU T Digital Samples bytes 20 B NC igi imples bytes 20 me d ps o 21 if included 64 bit Address di Bytes 5 12 Receive Options Digital Channel Mask Byte 15 bytes 17 18 If the sample set includes any digital lO lines 0x01 Packet Acknowledged Bitmask field that indicates Digital Channel Mask gt 0 these two bytes MSB most significant byte first 0x02 Packet was a which digital IO lines on the contain samples for all enabled digital inputs LSB least significant last broadcast packet remote have sampling DIO lines that do not have sampling enabled enabled if any retum 0 Bits in these 2 bytes map the same as they do in the Digital Channels Mask field 16 bit Network Address Analog Channel Mask MEE bytes Bytes 13 14 Num Samples byte 16 byte 19 Number of sample sets Bitmask field that indicates MSB most significant byte first included in the payload which digital IO lines on the 1 LSB least significant last Always set to 4 remote have sampling If the sample set includes any analog input lines enabled if any Analog Channel Mask gt 0 each enabled analog input re
7. Fixed 2m 8 dB A24 Y9NF Yagi 9 element 10 0 dBi Fixed 2m 9 dB A24 Y10NF Yagi 10 element 11 0 dBi Fixed 2m 10 dB A24 Y12NF Yagi 12 element 12 0 dBi Fixed 2m 11 dB A24 Y13NF Yagi 13 element 12 0 dBi Fixed 2m 11 dB A24 Y15NF Yagi 15 element 12 5 dBi Fixed 2m 11 5 dB A24 Y16NF Yagi 16 element 13 5 dBi Fixed 2m 12 5 dB A24 Y16RM Yagi 16 element RPSMA connector 13 5 dBi Fixed 2m 12 5 dB A24 Y18NF Yagi 18 element 15 0 dBi Fixed 2m 14 dB Part Number Type Description Gain Application Min Separation Cable loss Required A24 C1 Surface Mount integral chip 1 5dBi Fixed Mobile 20 cm A24 F2NF Omni directional Fiberglass base station 2 1 dBi Fixed Mobile 20 cm A24 F3NF Omni directional Fiberglass base station 3 0dBi Fixed Mobile 20 cm 3 dB A24 F5NF Omni directional Fiberglass base station 5 0dBi Fixed Mobile 20 cm 2 3 dB A24 F8NF Omni directional Fiberglass base station 8 0 dBi Fixed 2m 5 3 dB A24 FONF Omni directional Fiberglass base station 9 5 dBi Fixed 2m 6 8 dB A24 F10NF Omni directional Fiberglass base station 10 0 dBi Fixed 2m 7 3 dB A24 F12NF Omni directional Fiberglass base station 12 0 dBi Fixed 2m 9 3dB A24 F15NF Omni directional Fiberglass base station 15 0 dBi Fixed 2m 12 3dB A24 WTNF Omni directional Base station T 2dBi Fixed 2m 4 5 dB A24 M7NF Omni directional Mag mount base station 12481 Fixed 2m 4 5 dB Part Number Type Description Gain Application vin Separati
8. Up to 72 Bytes per packet Broadcast Radius Byte 16 Sets maximum number of hops a braodcast transmission can traverse If set to 0 the TX raidus will be set to the maximum hop value 10 69 XBee X Bee PRO ZB OEM RF Modules Explicit Addressing ZigBee Command Frame API Identifier Value Ox11 Allows ZigBee application layer fields endpoint and cluster ID to be specified for a data transmission Figure 6 13 Explicit Addressing ZigBee Command Frame Start delimiter Length Frame Data Checksum Ox7E MSB LSB API specific Structure 1 Byte Identifier m Identifier specific data 0x11 cmdData _ om Frame ID byte 5 v p d pd Sue entifies the UART data frame for the m Cluster ID byte 18 19 host correlate with a subsequent ACK Br acknowledgement Setting Frame ID Cluster ID used in the transmission to 0 will disable response frame Profile ID bytes 20 21 64 bit Destination Address bytes 6 13 ssec 12112254 2 25 Destination 64 bit extended NE UB Broadcast Radius byte 22 address Set to OXFFFF for di Sets the maximum number of hops a broadcast transmission broadcast or to all 0 005 to send to can traverse If set to 0 the transmission radius will be set to the coordinator the network
9. mand table for details The following information is not shown in the API graphics e The 64 bit destination address can be set to 0 as an alternate address for the coordinator e The maximum broadcast radius is 32 e The NO command can be used to include the DD parameter in the Node Identification Indica tor 0x95 Modem Status API Identifier Value 0x8A RF module status messages are sent from the module in response to specific conditions Figure 6 04 Modem Status Frames Start Delimiter Length Frame Data Checksum Ox7E MSB LSB API specific Structure 1 Byte API Identifier Identifier specific Data 0 8 cmdData Status Byte 5 Hardware reset Watchdog timer reset Associated Disassociated Synchronization Lost Beacon enabled only Coordinator realignment Coordinator started AONO n n 1 m ou oc 2008 Digi International Inc 65 XBee X Bee PRO ZB OEM RF Modules AT Command API Identifier Value 0x08 Allows for module parameter registers to be queried or set Figure 6 5 AT Command Frames Start Delimiter Length Frame Data Checksum Ox7E MSB LSB APl specific Structure 1 Byte API Identifier Identifier specific Data 0x08 cmdData Frame ID Byte 5 AT Command Bytes 6 7 Parameter Value Byte s 8 n Identifies the UART data frame for the host to correlate with a su
10. 222x AT Router 232x API Router 282x AT End Device 292x API End Device The supported features of each firmware version are listed in the table below Allows Joining Channel Verification on Join JV Commissioning Button Commissioning Button 10 Sampling IS 1 Receives unicast traffic from devices in the network Receives broadcast traffic from devices in the network Responds to Remote Responds to Network Discovery RF data transmissions receptions are always routed through the parent Routes Data 2008 Digi International Inc XBee X Bee PRO ZB OEM RF Modules Sends Network Discovery ND Sends Network Reset NR1 Sleep Modes Sends Remote Commands 2008 Digi International Inc Appendix E Additional Information 1 Year Warranty XBee RF Modules from Digi Inc the Product are warranted against defects in materials and workmanship under normal use for a period of 1 year from the date of purchase In the event of a product failure due to materials or workmanship Digi will repair or replace the defective product For warranty service return the defective product to 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 WARR
11. 74 XBee X Bee PRO ZB OEM RF Modules Node Identification Indicator API Identifier Value 0x95 This frame is received on the coordinator when a module transmits a node identification message to identify itself to the coordinator when AO 0 The data portion of this frame is similar to a Node Discovery response frame see ND command Figure 6 1 613 Node Identification Indicator eee idertifier cpecito Data 64 05 Address bytes 5 12 1 NI String bytee 26 n Indicates the 64 bt address of Node identifier string on the remote module that the remote device The transmitted the node Ni String is terminated identification frame with a NULL byte 0x00 16 08 Network Address 2 13 14 7 Indicates the 16 bit address of the remotes parent or d OxFFFE if the remote has no the remote Set to parent OxFFFE if unknown Receive Options byte 15 Type 1 byte 3 8 0x01 Packet Acknowledged 0x02 Packet was a broadcast packet Source Action 1 byte 16 bit Network Addrees bytee 1617 4 1 Frame sent by node identification pushbutton event see DO command 9 2 Frame sent after joining Set to the 16 bit event occurred see JN network address of command the remote Set to OxFFFE if unknown Profile ID 2 byts 64 21 Address bytes bytas 18 25 5 10 ilndicates the 4 bit address of the remote module that transmitted the node identification frame Manufacture ID 2 bytes 11 Set to MaxStreamis
12. 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 OV and Ox3FF 1 2V The analog input lines cannot measure more than 1 2V Information for each enabled analog channel is returned in order starting with AINO and finishing with AIN4 Only enabled analog input channels will return data 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 Table 4 014 Ox01 r 1 sample set 2008 Digi International Inc 53 XBee X Bee PRO ZB OEM RF Modules Table 4 014 Ox0COC r Digital Inputs DIO 2 3 10 11 low Ox03 r Analog Inputs A D 0 1 0x0408 r Digital input states DIO 3 10 high DIO 2 11 low 0x03D0 r Analog input ADIO 0 0 300 0x0124 r Analog input ADIO 1 0 120 2008 Digi International Inc 54 5 Network Co
13. OxFFFE 16 bit destination address unknown 0x00 0x00 Source and destination endpoints ZDO 0x0031 LQI Request Cluster ID 0x0000 ZigBee Device Profile ID 0x00 Broadcast radius 0x00 Transmit options Data payload 0x32 Transaction sequence number arbitrarily selected 2008 Digi International Inc 40 XBee amp X Bee PRO ZB OEM RF Modules 0x00 Neighbor Table start index required field for LQI request command 0x21 Checksum See the ZigBee specification for ZDO formatting details Maximum RF Data Payloads The maximum RF data payload depends on the type of transmission and whether or not security is enabled The maximum data payload sizes are shown in the table below Broadcast no security Unicast no security Broadcast security Unicast security Sleeping End Devices XBee modules support sleep mode operation in the Router End Device firmware Sleep modes allow a ZigBee end device to enter a low power mode when idle and wake as needed to transmit or receive data End devices must join to a router or coordinator to become part of a network When the join occurs the end device becomes the child of the router or coordinator that allowed the join and the device that allowed the join becomes the end device s parent A router or coordinator can only allow up to 8 end devices to join to it Once 8 end devices have joined to a parent no additional end devices can join unt
14. 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 Figure 3 08 Sample Route Request Broadcast Transmission Where R3 is Trying to Discover a Route to R6t 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 2008 Digi International Inc 27 XBee X Bee PRO ZB OEM RF Modules Figure 3 09 Route Reply Sample Route Reply Unicast Where R6 Sends a Route Reply to R3 Legend First Route Reply Second Route Reply Note R6 could send multiple replies if it identifies a better route 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 destinatio
15. XBee PRO module to take an IO sample and transmit it to a remote device at a periodic rate The periodic sample rate is set by the IR command If IR is set to 0 periodic sampling is disabled For all other values of IR data will be sampled after IR milliseconds have elapsed and transmitted to a remote device The DH and DL commands determine the destination address of the IO samples DH and DL can be set to 0 to transmit to the coordinator or to the 64 bit address of the remote device SH and SL Only devices running API firmware can send IO data samples out their Uart Devices running AT firmware will discard received IO data samples A sleepy end device will transmit periodic IO samples at the IR rate until the ST timer expires and the device can resume sleeping See section 5 3 for more information on sleep Digital IO Change Detection Modules can be configured to transmit a data sample immediately whenever a monitored digital IO pin changes state The IC command is a bitmask that can be used to set which digital IO lines should be monitored for a state change If one or more bits in IC is set an IO sample will be transmitted as soon as a state change is observed in one of the monitored digital IO lines Figure xx below shows how edge detection can work with periodic sampling 2008 Digi International Inc 51 XBee X Bee PRO ZB OEM RF Modules Figure 4 018 Enabling Edge Detection Monitored Digital IO Line IO Sa
16. bytes 6 13 Set to match the 64 bit address of the destination MSB first LSB last Broadcast 0x000000000000FFFF Command Options byte 16 0x02 Apply changes on remote If not set AC command must be sent before changes will take effect All other bits must be set to 0 Command Data byte 19 n 2008 Digi International Inc If present indicates the requested parameter value to set the given register If no characters present the register is queried XBee X Bee PRO ZB OEM RF Modules Remote Command Response API Identifier Value 0x97 If a module receives a remote command response RF data frame in response to a Remote AT Command Request the module will send a Remote AT Command Response message out the UART Some commands may send back multiple frames for example Node Discover ND command Figure 6 11 Remote AT Command Response Start Delimiter Length Frame Data Checksum Ox7E MSB LSB API specific Structure 1 Byte API Identifier Identifier specific Data 0x97 cmdData Frame ID Byte 5 64 bit Responder 16 bit ponder Network Address Address bytes 6 13 14 15 dioc bytes Indicates the 64 bit address Set to the 16 bit network Identifies the UART data frame being reported of the remote module that is address of the remote Parere command
17. 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 6 8 AT Command Frames Note that frames are identical to the AT Command API type except for the API identifier Start Delimiter Length Frame Data Checksum Ox7E MSB LSB API specific Structure 1 Byte API Identifier Identifier specific Data 0x09 cmdData pe i Frame ID Byte 5 aes AT Command Bytes 6 7 Parameter Value Byte s 8n 022 Identifies the UART data frame for the host to correlate with a subsequent ACK acknowledgement If set to 0 no response is sent Command Name Two ASCII characters that identify the AT Command If present indicates the requested parameter value to set the given register If no characters present register is queried 2008 Digi International Inc 66 XBee X Bee PRO ZB OEM RF Modules AT Command Response API Identifier Value 0x88 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 Figure 6 9 AT Command Response Frames Start Delimiter Length Frame Data Checksum
18. Analog Input 1 or Digital I O 1 ADO DIO0 Commissioning Button Either Analog Input 0 Digital IO 0 or Commissioning Button Design Notes e Minimum connections VCC GND DOUT amp DIN e Minimum connections to support serial firmware upgrades VCC GND DIN DOUT RTS amp DTR e Signal Direction is specified with respect to the module e Module includes a 30k Ohm resistor attached to RESET Several of the input pull ups can be configured using the PR command e Unused pins should be left disconnected e Pin 20 can be connected to a push button pin grounded when closed to support the commissioning push button functionality See Commissioning Pushbutton and Associate LED for details 2008 Digi International Inc 9 XBee X Bee PRO ZB OEM RF Modules Electrical Characteristics Table 1 03 DC Characteristics of the XBee PRO VCC 3 0 3 4 VDC Input Low Voltage All Digital Inputs 0 2 VCC Input High Voltage All Digital Inputs 0 8 VCC Output Low Voltage lo 2 mA VCC gt 2 7 V 0 18 VCC Output High Voltage lop 2 mA VCC gt 27 V 0 82 VCC Input Leakage Current Vin VCC or GND all inputs per pin 2008 Digi International Inc 10 2 RF Module Operation Serial Communications The XBee OEM RF Modules interface to a host device through a logic level asynchronous serial port Through its serial port the module can communicate w
19. Furthermore the manufacturer must maintain a copy of the XBee user manual documentation and ensure the final product does not exceed the specified power ratings antenna specifications and or installation requirements as specified in the user manual If any of these specifications are exceeded in the final product a submission must be made to a notified body for compliance testing to all required standards OEM Labeling Requirements The CE marking must be affixed to a visible location on the OEM product Figure B 01 CE Labeling Requirements The CE mark shall consist of the initials CE taking the following form e If the CE marking is reduced or enlarged the proportions given in the above graduated draw ing must be respected e The CE marking must have a height of at least 5mm except where this is not possible on account of the nature of the apparatus e The CE marking must be affixed visibly legibly and indelibly Restrictions Power Output The power output of the XBee RF Module must not exceed 10 dBm The power level is set using the PL command and the PL parameter must equal 0 10 dBm France France imposes restrictions on the 2 4 GHz band Go to www art telecom Fr or contact MaxStream for more information Norway Norway prohibits operation near Ny Alesund in Svalbard More information can be found at the Norway Posts and Telecommu
20. Manufacturer ID 2008 Digi International Inc 75 7 XBee Command Reference Tables Special Table 7 01 Special Commands 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 The WR command should be used sparingly The EM250 supports a limited number of write cycles CRE RE Restore Defaults Restore module parameters to factory defaults RE command does not reset the ID parameter CRE FR NR Software Reset Reset module Responds immediately with an OK then 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 Network Reset Reset network layer parameters on one or more modules within a PAN Responds immediately with an OK then causes a network 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 Node types that support the command C Coordinator R Router E End Device Addressing Table 7 02 Addressing Commands Destination Address High Set Get the upper 32 bits of the 64 bit desti
21. 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 contains the current 16 bit network address of the remote The ND and DN commands 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 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 Table 4 04 Sample table mapping 64 bit Addresses to 16 bit Network Addresses 0013 A200 4000 0001 1234 0013 A200 4000 0002 5678 0013 A200 4000 01A0 A479 0013 A200 4000 0220 FFFE unknown 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 Issue the DN Destination Node command using
22. NJ setting Coming up from Reset Once the router or end device has joined on a PAN ID and channel it retains that information through power cycle or reset events When the router or end device comes up from a reset or power cycle it checks its operating channel and PAN ID against the network configuration commands SC and EI It also verifies the applied security policy against the security configuration commands EE KY LK If the device s operating channel PAN ID or security policy does not match the configuration commands it will leave its current channel and PAN ID and attempt to join a new network based on its SC EI and EE parameter values This is shown in the figure below Router End Device Network verification coming up from reset CH OE Security Policy Valid lt Check for validity against Read Network Configuration Settings parameter values Note that if EI SC or EE change such that the last channel security or PAN ID settings are no longer valid the router or end device will go through the join process again and could potentially select a different PAN ID or channel This is possible if EI SC or EE values are changed from their defaults and not saved WR not issued or if a command is issued to change EI SC or EE after the device has joined a network A router or end device can be forced to leave its current channel or PAN ID by issuing the NR command Channel Verification The
23. 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 0 Sleep disabled 1 Pin sleep enabled 4 Cyclic sleep enabled Note When 5 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 1 OxFFFF 0x20 OxAFO x 10ms Quarter second resolution 0x2B ASCII 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 Sleep Options Configure options for sleep Unused option bits should be set to 0 Sleep options include SO 0x02 Always wake for ST time Command 0x04 Sleep entire SN SP time Sleep options should not be used for most applications See Sleep Mode chapter for more information 2008 Digi International Inc 1 OxFFFE x 1ms 0x1388 5 seconds 83 8 Manufacturing Support Customizing XBee Default Parameters Once module parameters are determined Digi can manufacture modules with specific customer defined configurations These custom configurations can lock in
24. a firmware version or set command values when the modules are manufactured eliminating the need for customers to adjust module parameters on arrival Contact Digi to create a custom configuration XBee EM250 Pin Mappings The following table shows how the GPIO pins on the EM250 map to pins on the XBee module Table 8 011 2008 Digi International Inc 84 XBee X Bee PRO ZB OEM RF Modules TET is This figure shows the orientation of the insight port header N 10 Custom Bootloader XBee modules use a modified version of Ember s boot loader This bootloader version supports a custom entry mechanism that uses module pins DIN pin 3 DTR SLEEP RQ pin 9 and RTS pin 16 To invoke the boot loader do the following 1 Set DTR SLEEP RQ low TTL OV 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 SLEEP RQ and DIN should be low TTL OV 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 Note Hardware flow control should be disabled when entering and communic
25. and asserted low upon waking Pin Sleep Pin sleep puts the module to sleep and wakes it from sleep according to the state of Sleep_RQ pin 9 Pin sleep is enabled by setting SM to 1 When Sleep_RQ is asserted high the module will finish any transmit or receive operations and then enter a low power state If the module has not joined a network and Sleep_RQ is asserted 2008 Digi International Inc 44 XBee X Bee PRO ZB OEM RF Modules the module will sleep once the current join attempt completes ie scanning for a valid network to join While asleep the module will not respond to serial or RF activity To wake a module operating in pin sleep de assert Sleep_RQ pin 9 The module will wake when Sleep_RQ is de asserted and is ready to transmit or receive when the CTS line is low If the module has not joined a network it will scan for a network to join when it wakes When a joined end device wakes from pin sleep it sends a poll request to its parent to see if the parent has buffered data for the end device The end device will continue to send poll requests every 100ms while it remains awake Figure 4 014 Demonstration of Pin Sleep Sleep RQ pin9 Sleep RQ TransmitingPoll Request Cyclic Sleep Cyclic sleep allows modules to wake periodically to check for RF data and sleep when idle When the SM parameter is set to 4 or 5 the module operates in cyclic sleep mode Setting SM to 5
26. child If the parent has data for the end device the end device will continue polling Parent Behavior The parent of an end device remains awake and can receive data packets intended for any of its end device children Since the end device child may be sleeping the parent buffers any received RF data that is destined for an end device child until the end device asks for it or until a timeout occurs This timeout is settable using the SP command The actual timeout is calculated as 2 5 SP not exceeding 30 seconds nd Device Sleep Configuration Configuration parameters exist to customize the mechanisms for entering sleep and defining sleep and wake times The XBee modules support both pin sleep and cyclic sleep modes The sleep mode is settable using the SM command If SM 0 sleep mode is disabled and the device operates as a router If SM changes from 0 to a non zero value the router leaves the ZigBee network and attempts to rejoin as an end device For this change to be successful the end device must be able to join a nearby router or coordinator that is allowing end device joins See Add Reference Here for details The On Sleep pin pin 13 provides a hardware indication of whether the module is asleep or not On Sleep is de asserted low when the module enters sleep and asserted high when the module wakes If CTS flow control is disabled D7 command the CTS pin is also de asserted high when entering sleep
27. coordinator when it starts the PAN Routers and end devices become a part of the PAN and inherit the coordinator s PAN ID when they join a PAN ZigBee supports mesh routing in the network allowing data packets to traverse multiple nodes multiple hops in order to reach the destination node This allows ZigBee nodes to be spread out over a large region and still support communications among all devices in the network All devices in a ZigBee network receive a 16 bit address network address when they join a PAN The 16 bit address of the coordinator is always 0 Starting a PAN Since the coordinator is responsible for starting a ZigBee network all ZigBee networks must have a coordinator present initially To start a PAN the coordinator performs a series of scans to discover the level of RF activity on different channels energy scan and to discover any nearby operating PANs PAN scan Energy Scan When a coordinator comes up for the first time it performs an energy scan on multiple channels frequencies to detect energy levels on each channel Channels with excessive detected energy levels are removed from its list of potential channels to start on Figure 3 02 Potential Channels List of Potential Channels Performing an energy scan allows the coordinator to avoid starting on channels with high energy levels 2008 Digi International Inc 19 XBee X Bee PRO ZB OEM RF Modules Wh
28. is compatible with the ZigBee 2007 specification while the ZNet 2 5 firmware is based on Ember s proprietary designed for ZigBee mesh stack EmberZNet 2 5 ZB and ZNet 2 5 firmware are similar in nature but not over the air compatible Devices running ZNet 2 5 firmware cannot talk to devices running the ZB firmware 2008 Digi International Inc 4 XBee amp X Bee PRO ZB OEM RF Modules Key Features High Performance Low Cost Low Power Indoor Urban up to 300 100 m XBee PRO e Outdoor line of sight up to 1 mile 1 6 km e TX Current 295 mA 83 3 V e Transmit Power Output 100 mW 20 dBm RX Current 45 mA 93 3 V EIRP Power down Current 1 25 C Receiver Sensitivity 102 dBm NS ind Easy to Use RF Data Rate 250 000 bps f No configuration necessary for out of box Advanced Networking amp Security RF communications Retries and Acknowledgements AT and API Command Modes for DSSS Direct Sequence Spread Spectrum configuring module parameters Each direct sequence channel has over Small form factor 65 000 unique network addresses available Extensive command set Point to point point to multipoint Free X CTU Software and peer to peer topologies supported Testing and configuration software Self routing self healing and fault tolerant Free amp Unlimited Technical Support mesh networking Worldwide Acceptance FCC Approval USA Refer to Appendix A p50 for FCC Req
29. not allowing joining NJ expired 0x27 Node Joining attempt failed typically due to incompatible security settings Ox2A Coordinator Start attempt failed OxFF Scanning for a Parent 0 2 Checking for an existing coordinator CRE 0 OxFF read only Security Table 7 04 Security Commands Encryption Enable Set Read the encryption enable setting 0 Encryption disabled 1 Encryption enabled Encryption Options Configure options for encryption Unused option bits should be set to 0 Options include 0x01 Send the security key unsecured over the air during joins 0x02 Use trust center 0 OxFF LK Encryption Key Set the 128 bit AES encryption key This command is read only KY cannot be read Link Key Set the 128 bit AES link key This command is write only LK cannot be read Setting LK to 0 will cause the coordinator to transmit the network key in the clear to joining devices and will cause joining devices to acquire the network key in the clear when joining CRE 0 OxFFFFFFFFFFFFFFFF 0 OxFFFFFFFFFFFFFFFF RF Interfacing Table 7 05 RF Interfacing Commands XBee boost mode disabled 0 8 dBm 1 4 dBm 2 2 dBm Power Level Select Read the power level at which the RF module transmits conducted 2S 0 dBm PE power CRE 4 2dBm XBee PRO 4 17 dBm XBee PRO International Variant 4 10dBm Power Mode Set read the power mode of
30. off the ZigBee 2007 specification This chapter describes how to configure the module networking addressing and security parameters to create operational ZigBee networks XBee ZigBee Network Formation To create a ZigBee network a coordinator must be started on a channel and PAN ID 64 bitand 16 bit Once the coordinator has started routers and end devices can join thenetwork Network formation is governed by the EI extended PAN ID SC scan channels and SD scan duration commands Starting a secure network with AES encryption also requires using the EE encryption enable KY network key LK link key and EO encryption options commands See the Secure Networks section later in this chapter for secure network considerations Starting an XBee Coordinator To form a network a coordinator must select an unused operating channel and PAN ID The XBee modules support user settable commands to control the process of selecting a channel and PAN ID Table 4 02 Commands that affect coordinator channel and PAN ID selection See the command table for details El Used to specify the extended PAN ID Setting El to 0 allows a random extended PAN ID to be used SC Selects a list of channels to scan for the energy and PAN scans SD Determines the duration of time to scan on each of the SC channels for the energy and PAN scans EE Determines if the coordinator should start a secure network using AES encryption If the
31. read the configuration settings of any device in the network Device Placement For a mesh network installation to be successful the installer must be able to determine where to place individual XBee devices to establish reliable links throughout the mesh network Link Testing A good way to measure the performance of a mesh network is to send unicast data through the network from one device to another to determine the success rate of many transmissions To simplify link testing the modules support a loopback cluster ID 0x12 on the data endpoint OxE8 Any data sent to this cluster ID on the data endpoint will be transmitted back to the sender This is shown in the figure below 2008 Digi International Inc on XBee X Bee PRO ZB OEM RF Modules Figure 5 019 Link Quality in a Mesh Network 27 Se LC bs me remote device receives data on MeshNetwork the loopback cluster ID and data N endpoint N p Transmit data to the loopback cluster ID 0x12 and data endpoint OxE8 on a remote device Source Device Remote Device lt 2 p bw 2 Remote transmits the Source receives loopback transmission T ee received packet back to the and sends received data packet out the Da 2 T al sender UART Demonstration of how the loopback cluster ID and data endpoint can be used to measure the link quality in a mesh network The configuration steps to send data to the loopback cluster ID depend on th
32. router will allow a new device to join depends upon two things its permit joining attribute if joins are allowed the number of end device children it already has Permit Joining Attribute 2008 Digi International Inc XBee X Bee PRO ZB OEM RF Modules The coordinator and all routers have a permit joining attribute This attribute on a coordinator and any joined routers can be configured to always allow joins allow joins for a short time or to not allow any more joins In order for a new device to join the network this attribute must be set on a nearby device such that joins are enabled End Device Children Since end devices rely on their parent router or coordinator to buffer incoming RF packets the coordinator and each router can support a finite number of end device children Once that number of end devices has joined a particular router or coordinator the device can no longer allow end devices to join to it Security If security is enabled the coordinator will start up using a 128 bit AES encryption key Only devices that have the same security key can communicate on the PAN Routers and end devices that will join a secure PAN must obtain the correct security key The security key can be obtained in one of two ways e pre installation e key is received over the air in the clear during joining XBee ZB defines a network key and a link key trust center link key Both keys are 128 bits and are used to
33. the device Enabling boost mode will improve 0 1 PM the receive sensitivity by 1dB and increase the transmit power by 2dB CRE 0 Boost mode disabled Note Enabling boost mode on the XBee PRO will not affect the output power Boost 1 Boost mode enabled mode imposes a slight increase in current draw See section 1 2 for details Received Signal Strength This command reports the received signal strength of the DB last received RF data packet The DB command only indicates the signal strength of the last hop It does not provide an accurate quality measurement for a multihop link DB can be set to 0 to clear it 1 Node types that support the command C Coordinator R Router E End Device O 2008 Digi International Inc XBee XBee PRO ZB OEM RF Modules Serial Interfacing I O Table 7 06 Serial Interfacing Commands 1 2 API Enable Enable API Mode 1 APl enabled AP The AP parameter is only applicable when using modules that contain the following CRE 2 APl enabled 1 firmware versions 1 1xx coordinator 1 3xx router end device w escaped control characters 0 Default receive API API Options Configure options for API Current options select the type of receive API indicators enabled AQ frame to send out the Uart for received RF data packets CRE 1 Explicit Rx data 0 indicator API frame enabled 0x91 0 7 standard baud rates 0 1200 bps Interface D
34. the matching 64 bit address When this response is received the initiator can then transmit data Route Discovery ZigBee employs mesh routing to establish a route between the source device and the destination Mesh routing allows data packets to traverse multiple nodes hops in a network to route data from a source to a destination Routers and coordinators can participate in establishing routes between source and destination devices using a process called route discovery The Route discovery process is based on the AODV Ad hoc On demand Distance Vector routing protocol Figure 3 07 Sample Transmission Through a Mesh Network 2008 Digi International Inc 26 XBee X Bee PRO ZB OEM RF Modules AODV Ad hoc On demand Distance Vector Routing Algorithm Routing under the AODV protocol is accomplished using tables in each node that store 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 Table 3 01 Node Destination Address Next Hop Address R3 Router 6 Coordinator C Router 6 Router 5 R5 Router 6 Router 6 When a source node must discover a route to a destination node it sends a broadcast route request command
35. 00 Coordinator s address can be replaced with coordinator s actual 64 bit address if known OxFFFE 16 bit Destination Address 0x02 Apply Changes Remote Command Options 0x4431 AT command D1 0x03 Command Parameter the parameter could also be sent as 0x0003 or 0x00000003 0x70 Checksum Supporting the API Applications that support the API should make provisions to deal with new API frames that may be introduced in future releases For example a section of code on a host microprocessor that handles received serial API frames sent out the module s DOUT pin might look like this 2008 Digi International Inc 64 XBee X Bee PRO ZB OEM RF Modules void XBee HandleRxAPIFrame apiFrameUnion papiFrame switch papiFrame gt api_id case RX DATA FRAME process received RF data frame break case RX IO SAMPLE FRAME process IO sample frame break case NODE IDENTIFICATION FRAME process node identification frame break default Discard any other API frame types that are not being used break API Frames The following sections illustrate the types of frames encountered while using the API Note The following information is missing or incorrect in the API graphics e Transmit option 0x08 is not supported The maximum RF data payload in an API transmit frame is not 72 bytes several images are incorrect The maximum RF data payload can be read using the NP command See the com
36. 0x22 2 blinks occur If the commissioning push button is pressed once and the device has joined a network the device transmits a broadcast node identification packet If the Associate LED functionality is enabled D5 command a device that receive this transmission will blink its Associate pin rapidly for 1 second The following figures demonstrate these behaviors Figure 5 022 AI 0x22 Device not joined ADO DIOO SL mnm A single commissioning button press when the device has not joined a network th causes the associate pin to blink to indicate the Al Code where Al blinks 0x2 In this example Al 0x22 2008 Digi International Inc 59 XBee amp X Bee PRO ZB OEM RF Modules Figure 5 023 Broadcast Node Identification Transmission 2 S 0551 ADO DIOO Pin Remote Device A single button press on a remote device causes a broadcast node identification transmission to be sent All devices that receive this transmission blink their associate pin rapidly for one second if the associate LED functionality is enabled D5 1 2008 Digi International Inc 60 6 API Operation 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
37. AD1 DIO1 1 Analog Channel Mask bit 2 AD2 DIO2 e bit 3 AD3 DIO3 e bit 7 Supply Voltage A sample set consisting of 1 sample for each enabled ADC and or DIO channel which has voltage inputs of 1143 75 and 342 1875mV If any digital IO lines are enabled the first two bytes of the data set indicate the state of all enabled digital IO Only digital channels that are enabled in the Digital Channel Variable Sampled Data Set Mask bytes have any meaning in the sample set If no digital IO are enabled on the device these 2 bytes will be omitted Following the digital IO data if any each enabled analog channel will return 2 bytes The data starts with AINO and continues sequentially for each enabled analog input channel up to AIN3 and the supply voltage if enabled at the end The sampled data set will include 2 bytes of digital IO data only if one or more IO lines on the device are configured as digital IO If no pins are configured as digital IO these 2 bytes will be omitted The digital IO data is only relevant if the same bit is enabled in the digital IO mask as shown in the following figure Analog samples are returned as 10 bit values The analog reading is scaled such that 0x0000 represents OV and Ox3FF 1 2V The analog inputs on the module cannot read more than 1 2V Analog samples are returned in order starting with AINO and finishing with AIN3 and the supply voltage Only enabled analog input channels return data as sho
38. ANTIES EXPRESS OR IMPLIED AND DIGI SPECIFICALLY DISCLAIMS ALL WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE IN NO EVENT SHALL DIGI 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 CONSEQUENTIAL 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 Contact Digi Free and unlimited technical support is included with every Digi Radio Modem sold For the best in wireless data solutions and support please use the following resources Technical Support Phone 866 765 9885 toll free U S A amp Canada 801 765 9885 Worldwide Live Chat www digi com Online Support http www digi com support eservice login jsp Digi s office hours are 8 00 am 5 00 pm U S Mountain Time 2008 Digi International Inc 98
39. Adapters Monitor and manage your network securely from remote locations with Connectware Manager software We encourage you to contact our technical representatives for consideration implementation or design review of your product for interoperability with Digi s Drop in Networking solutions 2008 Digi International Inc 87 Appendix A Definitions Definitions Table A 01 Terms and Definitions ZigBee Node Types Coordinator A node that has the unique function of forming a network The coor dinator 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 par ticipate in routing packets and be a source or destination for data packets One coordinator per PAN Establishes Organizes PAN Can route data packets to from other nodes Can be a data packet source and destination Mains powered Refer to the XBee coordinator section for more information Router A node that creates maintains network information and uses this information to determine the best route for a data packet A router must join a network before it can allow other routers and end devices to join to it A router can participate in routing packets and is intended to be a mains powered node Several routers can ope
40. D7 commands CTS Flow Control If CTS flow control is enabled D7 command when the serial receive buffer is 17 bytes away from being full the module de asserts CTS sets it high to signal to the host device to stop sending serial data CTS is re asserted after the serial receive buffer has 34 bytes of space 2008 Digi International Inc 12 XBee X Bee PRO ZB OEM RF Modules RTS Flow Control If RTS flow control is enabled D6 command data in the serial transmit buffer will not be sent out the DOUT pin as long as RTS is de asserted set high The host device should not de assert RTS for long periods of time to avoid filling the serial transmit buffer If an RF data packet is received and the serial transmit buffer does not have enough space for all of the data bytes the entire RF data packet will be discarded Serial Interface Protocols The XBee modules support both transparent and API Application Programming Interface serial interfaces Transparent Operation When operating in transparent mode the modules act as a serial line replacement All UART data received through the DIN pin is queued up for RF transmission When RF data is received the data is sent out through the DOUT pin The module configuration parameters are configured using the AT command mode interface Data is buffered in the serial receive buffer until one of the following causes the data to be packetized and transmitted No ser
41. Duo Matches the Frame ID of the Remote Command ASCII characters that A responding to the Remote Set to OxFFFE if Request the remote is responding to AT Command request dikro identify the AT command Status byte 18 0 OK 1 Error 2 Invalid Command 3 Invalid Parameter Command Data byte 19 n The value of the requested register ZigBee Transmit Request API Identifier Value 0x10 A TX Request message will cause the module to send RF Data as an RF Packet TX Packet Frames 2008 Digi International Inc 68 ZB OEM RF Modules Figure 6 12 ZigBee Transmit Request Start Delimiter Length Frame Data API specific Structure API Identifier 16 bit Destination Frame ID Byte 5 MSB first LSB last Identifies the UART data frame for the host to Set to OxFFFE for correlate with a subsequent ACK acknowledgement Setting Fi ID to 0 will frame ing Frame ID to 0 will disable response frame Address S not Inm 64 bit Destination Address Bytes 6 13 MSB first LSB last Broadcast 0x000000000000FFFF 2008 Digi International Inc Identifier specific Data Network Address Bytes 14 15 Broadcast TX or if Network Checksum Options Byte 17 RF Data Byte s 18 n 0x08 Send multicast transmission Unicast set if not sent All other bits must be set to 0
42. F data API frames indicate the source address address Advanced ZigBee API transmit and receive frames can expose ZigBee addressing fields including source and addressing Support destination endpoints cluster ID and profile ID This makes it easy to support ZDO commands and public profile traffic Advanced networking API frames can provide indication of IO samples from remote devices and node identification diagnostics messages Set read configuration commands be sent to remote devices to configure them as needed Remote Configuration using the API As a general rule of thumb API firmware is recommended when a device e sends RF data to multiple destinations sends remote configuration commands to manage devices in the network receives IO samples from remote devices e receives RF data packets from multiple devices and the application needs to know which device sent which packet e must support multiple ZigBee endpoints cluster IDs and or profile IDs e uses the ZigBee Device Profile services If the above conditions do not apply i e a sensor node router or a simple application then AT firmware might be suitable 2008 Digi International Inc 14 X Bee X Bee PRO ZB OEM RF Modules Modes of Operation 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
43. ICES 003 If it contains an XBee PRO OEM Module the clearly visible label on the outside of the final product enclosure must display the following text Contains Model XBee PRO Radio IC 1846A XBEEPRO2 The integrator is responsible for its product to comply with IC ICES 003 amp FCC Part 15 Sub B Unintentional Radiators ICES 003 is the same as FCC Part 15 Sub B and Industry Canada accepts FCC test report or CISPR 22 test report for compliance with ICES 003 Transmitters for Detachable Antennas This device has been designed to operate with the antennas listed in table A 3 and having a maximum of 17 5 dB Antennas not included in this list or having a gain greater than 17 5 dB are strictly prohibited for use with this device The required antenna impedance is 50 Q Detachable Antenna To reduce potential radio interference to other users the antenna type and gained shuold be so chosen that the equivaleny istropically radiated power e i r p is not more than permitted for successful communication 2008 Digi International Inc 94 Appendix C Migrating from ZNet 2 5 to XBee ZB The following paragraph contains the significant differences in XBee ZB compared to its predecessor ZNet 2 5 Command Set Firmware Versions New Features Command Set The following ZNet 2 5 commands have changed for XBee ZB ID Set read the 16 bit PAN ID This has been replaced by EI set read the 64 bit extended
44. IO5 Pin 15 9 On Sleep DIO9 Pin 13 10 DIO12 Pin 4 11 PWMO RSSI DIO10 Pin 6 12 PWM1 DIO11 Pin 7 RSSI PWM Timer Time RSSI signal will be output after last transmission When RP RP ed sii MEER CRE 0 OxFF x 100 ms 0x28 40d Commissioning Pushbutton This command can be used to simulate commissioning CB button presses in software The parameter value should be set to the number of button CRE presses to be simulated For example sending the ATCB1 command will execute the action associated with 1 commissioning button press See DO command Diagnostics Table 7 08 Diagnostics Commands VR Firmware Version Read firmware version of the module CRE 0 OxFFFF read only Factory set HV Hardware Version Read hardware version of the module CRE 0 OxFFFF read only Factory set Supply Voltage Reads the voltage on the Vcc pin To convert the reading to a mV reading divide the read value by 1023 and multiply by 1200 A V reading of 0x8FE 2302 decimal represents 2700mV or 2 70V 1 Node types that support the command C Coordinator R Router E End Device AT Command Options Table 7 09 AT Command Options Commands 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 CRE 2 0x028F x 100 ms 0x64 100d to Idle Mode CN2 Exit Comm
45. 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 The radius of the DN command is set by the BH command up to 20 Byte printable ASCII string 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 Bit Channel 0 0x0B 4 Ox0F 8 0x13 1 0x0C 5 0x10 9 0x14 2 0x0D 6 0x11 10 0x15 3 0 0 7 0x12 11 0x16 12 0x17 13 0x18 14 0x19 15 0 1 Note Setting SC to include more than 12 continuous channels could cause data to be received on incorrect frequencies due to crosstalk issues with the EM250 at certain power levels See Appendix E for details Changing SC may result in not being able to communicate with long range PRO modules from Digi XBee 1 OxFFFF bitfield XBee PRO 1 Ox3FFF bitfield bits 14 15 not allowed Scan Duration Set Read the scan duration exponent Changes to SD should be written using WR command Coordinator Duration of the Active and Energy Scans on each channel that are used to determine an acceptable channel and Pan ID for the Coordinator to star
46. Mode 15 1Receive Mode 16 1Command Mode 16 1 Sleep Mode 17 3 ZigBee Networks 18 ZigBee Network Formation 18 ZigBee PANs 19 1Starting a PAN 19 Joining a PAN 21 1Allowing Joining 21 1Security 22 ZigBee Network Communications 24 1ZigBee Device Addressing 24 1ZigBee Application layer Addressing 24 1Data Transmission and Routing 25 4 XBee ZigBee Networks 30 XBee ZigBee Network Formation 30 1Starting an XBee Coordinator 30 1Joining a ZB Router or End Device 32 1Channel Verification 34 1Resetting Network Parameters 35 Secure Networks 35 1Using a Trust Center 35 1Managing Security Keys 35 XBee ZB Addressing 36 1Device Addressing 36 1Application layer Addressing 38 1ZigBee Device Objects 39 1Maximum RF Data Payloads 41 Sleeping End Devices 41 1End Device Operation 41 1Parent Operation 42 1End Device Behavior 44 1Parent Behavior 44 1End Device Sleep Configuration 44 Remote Configuration Commands 48 1Sending a Remote Command 48 1Applying Changes on Remote 48 1Remote Command Responses 48 IO Line Monitoring 48 11O Samples 49 1Queried Sampling 50 1Periodic IO Sampling 51 1Digital IO Change Detection 51 1Voltage Supply Monitoring 52 I O Line Configuration 52 5 Network Commissioning and Diagnostics 55 Device Discovery 55 Device Configuration 55 Device Placement 55 iLink Testing 55 1RSSI Indicators 56 Commissioning Pushbutton and Associate LED 56 1Commissioning Pushbutton 57 1Associate LED 58 6 A
47. PAN ID KY Set the 128 bit security network encryption key KY is now only settable on the coordi nator LK must be set on all devices to deploy a very secure network where the network key is not transmitted in the clear ZA Set read the ZigBee Addressing enable command This command was required in ZNet 2 5 to enable application level addressing commands SE DE CI XBee ZB does not support ZA The SE DE and CI values always determine the application level addressing values AI Read the association status AI now includes several new values Firmware Versions ZNet 2 5 supported coordinator and router end device targets Due to flash constraints XBee ZB split the router end device target into 2 different targets router and end device There is not a router end device target New Features ZB offers many new and improved features over ZNet 2 5 including e Data transmissions are directly resolved to APS unicasts This provides the ability to send and receive ZDO commands NH command configures the unicast transmission timeout This command can extend the number of unicast hops dramatically over the 6 8 hop limit that existed in ZNet 2 5 e ZS command allows ZigBee stack profile to be set as required 2008 Digi International Inc 95 Appendix D XBee ZB Firmware Matrix Overview of Features The XBee ZB firmware supports the following versions 202x AT Coordinator e 212x API Coordinator
48. PI Operation 61 1API Frame Specifications 61 1API Examples 63 1Supporting the API 64 1API Frames 65 7 XBee Command Reference Tables 76 8 Manufacturing Support 84 Customizing XBee Default Parameters 84 XBee EM250 Pin Mappings 84 XBee Custom Bootloader 85 Programming XBee Modules 85 Developing Custom Firmware 87 Design Considerations for Digi Drop in Net working 87 2008 Digi Internaitonal Inc Co XBee amp XBee PROG ZB OEM RF Modules Contents Appendix A Definitions 88 Appendix B Agency Certifications 90 Appendix C Migrating from ZNet 2 5 to XBee ZB 95 Appendix D XBee ZB Firmware Matrix 96 Overview of Features 96 Appendix E Additional Information 98 2008 Digi Internaitonal Inc 1 Overview The XBee XBee PRO ZB OEM RF Modules are designed 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 and are compatible with the following e XBee RS 232 Adapter e RS 232 PH Power Harvester Adapter e XBee RS 485 Adapter XBee Analog I O Adapter XBee Digital I O Adapter XBee Sensor Adapter e XBee USB Adapter e XStick e ConnectPort X Gateways e XBee Wall Router The XBee XBee PRO ZB firmware release can be installed on XBee modules This firmware
49. XBee XBee PRO ZB OEM RF Modules ZigBeeOEM RF Modules by Digi Interna tional Firmware Versions 20xx Coordinator AT Transparent Operation 21xx Coordinator API Operation 22xx Router AT Transparent Operation 23xx Router API Operation Interchanges is 28xx End Device AT Transparent Operation 29xx End Device API Operation Digi International Inc 11001 Bren Road East q p e Minnetonka MN 55343 Y 877 912 3444 or 952 912 3444 http www digi com 90000976_A 4 14 2008 XBee X Bee PRO ZB OEM RF Modules 2008 Digi International Inc All rights reserved No part of the contents of this manual may be transmitted or reproduced in any form or by any means without the written permission of Digi International Inc ZigBee B is a registered trademark of the ZigBee Alliance XBee XBee PRO is a registerd trademark of Digi International Inc Technical Support Phone 801 765 9885 Live Chat www digi com 2008 Digi International Inc ZB OEM RF Modules Contents 1 Overview 4 Key Features 5 1Worldwide Acceptance 5 Specifications 5 Mechanical Drawings 7 Mounting Considerations 8 Pin Signals 9 Electrical Characteristics 10 2 RF Module Operation 11 Serial Communications 11 1UART Data Flow 11 1Serial Buffers 11 1Serial Flow Control 12 1Serial Interface Protocols 13 Modes of Operation 15 1Idle Mode 15 1Transmit
50. XBee Sensor Sample Forces a sample to be taken on XBee Sensor device This RE command can only be issued to an XBee sensor device using remote command 10 Sample Rate Set Read the IO sample rate to enable periodic sampling For periodic IR sampling to be enabled IR must be set to a non zero value and at least one module pin R 0 OxFFFF ms 0 must have analog or digital IO functionality enabled see 00 08 2 commands The sample rate is measured in milliseconds 10 Digital Change Detection Set Read the digital IO pins to monitor for changes in the 10 state IC works with the individual pin configuration commands 00 08 2 If a pin is enabled as a digital input output the IC command can be used to force an immediate IO sample transmission when the DIO state changes IC is a bitmask that can be used to enable or disable edge detection on individual channels Unused bits IC should be set to 0 R 0 OxFFFF 0 Bit IO pin 0 0100 4 0104 8 0108 1 DIO1 5 DIO5 9 DIO9 2 DIO2 6 DIO6 10 DIO10 3 DIO3 7 0107 11 01011 2008 Digi International Inc XBee XBee PRO ZB OEM RF Modules Table 7 07 I O Commands 0 Disabled 15 RSSI PWM 3 Digital input monitored 4 Digital output default low 5 Digital output default high 0 Unmonitored digital input 3 Digital input monitored 0 4 Digital output default low 5 Digital output default hi
51. ZB firmware supports channel verification behavior for both routers and end devices through the JV command If channel verification is enabled routers will communicate with the coordinator and end devices will monitor their communications with their parent to determine if they are on a valid channel Router Channel Verification When a router comes up from a power cycle if JV 1 the router will send a 64 bit address discovery transmission to the coordinator to discover its 64 bit address If the coordinator does not respond after 3 request attempts the router will leave the current network and attempt to join a new network based on its SC EI and EE command values see section 4 1 2 If channel verification is enabled the router will not consider itself joined until the coordinator response is received This means the Associate LED will not blink the modem status Joined frame will not be sent out the UART and AI will not be set to 0 until after the coordinator response is received Router channel verification is not recommended for use in large networks End Device Channel Verification If JV 1 on an end device the end device tracks the status of its poll requests communications with its parent If the end device s parent does not send an acknowledgment for 3 consecutive 2008 Digi International Inc 34 XBee X Bee PRO ZB OEM RF Modules poll requests 3 consecutive no acknowledgments the end device will leav
52. a conflict is detected Forcing the initial 16 bit PAN ID is especially useful if one coordinator will be replaced with a new coordinator The II command initial PAN ID can be used to force a new coordinator to come up on a fixed 16 bit PAN ID The II command value is not saved through power cycle or reset Note Due to advanced security in ZB the II command cannot be used to install a replacement coordinator into a secure network The ZS command can be used and written to set the stack profile ID for the coordinator The default ZS value 0 means the coordinator and the entire XBee network operates on a private network If ZS is set to a non zero value on the coordinator all router and end devices that should join the coordinator must also have their ZS command parameter written to the same value The coordinator can be forced to leave its current channel or PAN ID by issuing the NR command Joining a ZB Router or End Device Before a router or end device can participate in a ZigBee network it must locate a nearby coordinator or another router that has already joined and attempt to join to it The commands listed in table 4 03 govern the joining behavior of routers and end devices Table 4 03 Commands that affect router end device PAN discovery during joining See the command table for details EI Used to specify the extended PAN ID Setting El to 0 allows the device to join any extended PAN ID SC Selects a list of ch
53. acket Again this value only indicates the quality of the last hop This pin could potentially be connected to an LED to indicate if the link is stable or not Commissioning Pushbutton and Associate LED The XBee modules support a set of commissioning and LED behaviors to aid in device deployment and commissioning These include the commissioning push button definitions and associate LED behaviors These features can be supported in hardware as shown below 2008 Digi International Inc 56 XBee XBee PRO ZB OEM RF Modules Figure 5 020 Commissioning Pushbutton and Associate LED Functionalities Push button 20 Q TEM XBee 15 R Associate Ay tee A pushbutton and an LED can be connected to module pins 20 and 15 respectively to support the commissioning pushbutton and associate LED functionalities Commissioning Pushbutton The commissioning pushbutton definitions provide a variety of simple functions to aid in deploying devices in a network The commissioning button functionality on pin 20 is enabled by setting the DO command to 1 enabled by default Table 5 015 e Wakes an end device for 30 seconds 1 Sends a node identifica tion broadcast transmis sion e Wakes an end device for 30 seconds e Blinks a numeric error code on the Associate pin indicating the cause of join failure see section 6 4 2 e Sends a broadcast trans mission to enable joining on the coord
54. allows the module to be awakened from sleep on a high to low transition on Sleep RQ pin 9 Setting SM to 4 disables the pin wake option In cyclic sleep mode if serial or RF data is received the module will start an inactivity timer and remain awake until this timer expires The inactivity time is settable with the ST command While the module is awake it will continue to send poll request transmissions to its parent to check for buffered data every 100ms The timer will be restarted anytime serial or RF data is received The module will resume sleep when the timer expires This behavior is shown in the following figure 2008 Digi International Inc 45 XBee amp XBee PROG ZB OEM RF Modules DIN Figure 4 015 Cylic Sleep ST Time Awake On Sleep 1 1 1 1 0 10101 A cyclic sleep end device enters sleep mode when no serial or RF data is received for ST time Legend On Sleep Transmitting Poll Request In cyclic sleep the time the module sleeps for is dependent on several configuration commands SP SN and SO With SO set to 0 no sleep options default the sleep period is defined as SP SN Since the parent can only buffer data up to 30 seconds SP is settable up to 28 seconds After SP expires the module wakes to send a poll request transmission to the parent to c
55. and Mode Explicitly exit the module from AT Command Mode CRE 2008 Digi International Inc 82 XBee XBee PRO ZB OEM RF Modules Table 7 09 AT Command Options Commands 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 1 OxOCE4 x 1 ms max of 3 3 decimal sec Ox3E8 1000d 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 1 Node types that support the command C Coordinator R Router E End Device 2 Command supported by modules using AT Command firmware only Sleep Commands Table 7 010 Sleep Commands Sleep Mode Sets the sleep mode on the RF module 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 Sleep Period This value determines how long the end device will sleep at a time up to 28 seconds
56. annels to scan for the energy and PAN scans SD Determines the duration of time to scan on each of the SC channels for the energy and PAN scans EE Determines the security policy of the joining device If a router or end device has not joined a network it performs a PAN scan on each of the SC channels looking for a coordinator or router operating on a valid PAN ID that is allowing joins In order to successfully join a network a new router or end device must find a device that meets the following requirements The extended PAN ID of the discovered device is valid based on the EI setting of the joining device 2008 Digi International Inc 32 XBee X Bee PRO ZB OEM RF Modules The discovered device is allowing joins NJ time has not expired The discovered device is operating on one of the SC channels If the joining device is an end device the discovered device has room for at least one more end device NC command The security policy of the discovered device is compatible with the security policy on the join ing device EE LK EO The discovered device is operating on the same stack profile ZS as the joining device If a device is discovered during the PAN scan that meets all the above requirements the joining device will send a join request to the device and attempt to join the PAN If the joining device receives a join response then the device is considered joined to the PAN The joini
57. apply AES encryption to RF packets Network Security Key The coordinator selects a network security key when it forms the network Joining routers and end devices obtain the key when they join the network The network key can be transmitted securely to joining devices if they have a pre installed link key that is shared by the coordinator Otherwise the coordinator will transmit the network key unencrypted to joining devices The network security key is used to apply 128 bit AES encryption to the payload portion of all network level transmissions This includes APS headers and data including route requests route replies APS commands ZDO commands application data packets etc All network layer packets are encrypted and authenticated using AES 128 A 4 byte message integrity code MIC is appended to the end of the packet Network security supports a 32 bit frame counter The counter is incremented for each transmission sent by the device Each device maintains the last received frame counter value for all of its neighbors The frame counter cannot wrap to 0 If a packet is received from a neighbor with a frame counter less than or equal to the last received frame counter the packet is dropped The frame counter is reset to 0 when the network key is updated Network layer security is applied on a hop by hop basis As each node along a route receives an encrypted packet it decrypts and authenticates the packet before processing it When forwa
58. at was provided in the Transmit Request Frame The number of application transmission retries that took place 0x02 CCA Failure 0x15 Invalid destination endpoint 0x21 Network ACK Failure 0x22 Not Joined to Network 0x23 Self addressed 0x24 Address Not Found 0x25 Route Not Found 0x00 No Discovery Overhead 0x01 Address Discovery 0x02 Route Discovery 0x03 Address and Route Discovery ZigBee Receive Packet API Identifier Value 0x90 When the module receives an RF packet it is sent out the UART using this message type Figure 6 15 RX Packet Frames Start Delimiter Length Frame Data Checksum 0 7 MSB LSB API specific Structure 1 Byte API Identifier Identifier specific Data 0x90 cmdData 64 bit Address Bytes 5 12 16 bit Network Address Bytes 13 14 RF Data Byte s 16 n Options Byte 15 0x01 Packet Acknowledged 0x02 Packet was a broadcast packet MSB most significant byte first LSB least significant last MSB most significant byte first LSB least significant last Up to 72 Bytes per packet 2008 Digi International Inc XBee X Bee PRO ZB OEM RF Modules ZigBee Explicit Rx Indicator API Identifier Value 0x91 When the modem receives a ZigBee RF packet it is sent out the UART using this message type
59. ata Rate Set Read the serial interface data rate for communication between 5 the module serial port and host 3 Hen BD Any value above 0x07 will be interpreted as an actual baud rate When a value above CRE 3 4 19200 0x07 is sent the closest interface data rate represented by the number is stored in the 5 38400 BD register 6 57600 7 115200 0x80 0x38400 non standard rates 0 No parity 1 Even parity NB Serial Parity Set Read the serial parity setting on the module CRE 2 Odd parity 0 3 Mark parity Packetization Timeout Set Read number of character times of inter character silence 0 OxFF RO required before packetization Set RO 0 to transmit characters as they arrive instead of x character times 3 buffering them into one RF packet 0 Disabled 1 CTS Flow Control 3 Digital input 4 Digital output low D7 DIO7 Configuration Select Read options for the DIO7 line of the RF module CRE 5 Digital output high 1 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 Gre 0 9 1 RTS Flow Control 1 Node types that support the command C Coordinator R Router E End Device 2 Command supported by modules using API firmware only I O Commands Table 7 07 I O Commands IS Force Sample Forces a read of all enabled digital and analog input lines CRE 18
60. ating with the EM250 bootloader Programming XBee Modules Firmware on the XBee modules can be upgraded using the Digi X CTU program to interface with the DIN and DOUT serial lines or with an InSight programmer device via InSight header An external application can upload firmware to the XBee modules by doing the following 1 Enter bootloader mode as described in section 9 4 2 The application should look for the bootloader BL gt prompt to be sent out the UART to ensure the bootloader is active 3 Send an ascii 1 to initiate a firmware update 4 After sending a 1 the EM250 waits for an XModem CRC upload of an ebl image over the serial line The ebl file must be sent to the EM250 in order 2008 Digi International Inc 85 ZB OEM RF Modules If no transaction is initiated within 60 seconds the bootloader times out and returns to the menu If the upload is interrupted with a power cycle or reset event the EM250 will detect an invalid application image and enter bootloader mode The entire ebl image should be uploaded again to recover If an error occurs while uploading the EM250 bootloader returns an error code from the following table Table 8 012 The bootloader encountered an error while trying to parse the Start of Header SOH character in the XModem frame The bootloader detected an invalid checksum in the XModem frame The bootloader encountered an error whi
61. ation T 2dBi Fixed 2m NIA Part Number Type Description Gain Application ey Sa Cable loss A24 P8SF Flat Panel 8 5 dBi Fixed 2m NIA A24 P8NF Flat Panel 8 5 dBi Fixed 2m NIA A24 P13NF Flat Panel 13 0 dBi Fixed 2m N A A24 P14NF Flat Panel 14 0 dBi Fixed 2m N A A24 P15NF Flat Panel 15 0 dBi Fixed 2m N A A24 P16NF Flat Panel 16 0 dBi Fixed 2m N A A24 P19NF Flat Panel 19 0 dBi Fixed 2m 1 5 dB 2008 Digi International Inc XBee amp X Bee PRO ZB OEM RF Modules Table A 02 antennas approved for use with the XBee PRO RF Modules If using the RF module in a portable application For example If the module is used in a handheld device and the antenna is less than 20cm from the human body when the device is in operation The integrator is responsible for passing additional SAR Specific Absorption Rate testing based on FCC rules 2 1091 and FCC Guidelines for Human Exposure to Radio Frequency Electromagnetic Fields OET Bulletin and Supplement C The testing results will be submitted to the FCC for approval prior to selling the integrated unit The required SAR testing measures emissions from the module and how they affect the person RF Exposure Part Number Type Description Gain Application 2 E Cable loss A24 Y6NF Yagi 6 element 8 8 dBi Fixed 2m T 8dB A24 YTNF Yagi 7 element 9 0 dBi
62. ation layer addressing information depending on the AO parameter Some endpoint values are reserved for use by the XBee modules and should not be used Please refer to the following tables for these values The following cluster IDs are supported on the data endpoint OxE8 Table 4 05 XBee Endpoint allocation 0 ZigBee Device Objects endpoint Reserved for ZigBee stack 2008 Digi International Inc 38 XBee X Bee PRO ZB OEM RF Modules Table 4 05 XBee Endpoint allocation 0x01 OxDB 219 Available endpoints OxDC 220 OxEE 238 Reserved for Digi Use OxE6 230 Command Endpoint OxE8 232 Data Endpoint OxEF 239 OxFO 240 Reserved for Ember Use Table 4 06 Supported Cluster IDs on the Data Endpoint This is the default cluster ID used to transmit serial data Data received on this cluster ID Serial loopback data is transmitted back to the sender Transparent serial data 10 samples are transmitted to a remote on this cluster ID An XBee sensor device XBee sensor sample data transmits sensor readings on this cluster ID A single press on the commissioning button sends a broadcast transmission to this cluster ID sample data Node identification ZigBee Device Objects ZigBee reserved endpoint 0 for ZigBee Device Objects ZDO This endpoint supports many discovery and management services Each ZDO service has a unique cluster ID Some of the m
63. 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 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 2008 Digi International Inc 24
64. bsequent ACK acknowledgement If set to 0 no response is sent Command Name Two ASCII characters that identify the AT Command If present indicates the requested parameter value to set the given register If no characters present register is queried Figure 6 6 Example API frames when reading the NJ parameter value of the module Byte 1 Bytes 2 3 Byte 4 Byte 5 Bytes 6 7 Byte 8 Ox7E 0x00 0x04 0x08 0x52 R Ox4E N Ox4A J 0 Start Delimiter Length API Identifier Frame ID AT Command Checksum Length Bytes API Identifier Frame ID AT Command R value was arbitrarily selected Figure 6 7 Example API frames when modifying the NJ parameter value of the module Byte 1 Bytes 2 3 Byte 4 Byte 5 Bytes 6 7 Bytes 8 Byte 9 Ox7E 0x00 0x05 0x08 Ox4D M Ox4E N Ox4A J 0x40 0 2 Start Delimiter Length API Identifier Frame ID AT Command Parameter Value Checksum Length Bytes API Identifier Frame ID AT Command Parameter Value M value was arbitrarily selected 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 This API type allows module parameters to be queried or set In contrast to the
65. cate the orientation the module should be mounted 2008 Digi International Inc 8 XBee XBee PRO ZB OEM RF Modules Pin Signals Figure 1 04 XBee XBee PRO ZB RF Module Pin Number top sides shown shields on bottom i i E 1 Table 1 02 Pin Assignments for the XBee PRO Modules Low asserted signals are distinguished with a horizontal line above signal name VCC Power supply DOUT Output UART Data Out DIN CONFIG Input UART Data In DIO12 Either Digital 10 12 RESET Input Module Reset reset pulse must be at least 200 ns PWMO RSSI DIO10 Either PWM Output 0 RX Signal Strength Indicator Digital IO PWM DIO11 Either Digital 1 0 11 reserved 5 Do not connect DTR 5 RQ 0108 Either Pin Sleep Control Line or Digital IO 8 GND Ground DIO4 Either Digital 1 0 4 CTS 0007 Either Clear to Send Flow Control or Digital 1 0 7 ON SLEEP DIO9 Output Module Status Indicator or Digital 1 0 9 Not used on this module For compatibility with other XBee modules we recommend connecting this pin to a voltage reference if Analog sampling is desired Otherwise connect to GND olo N oao om AJ VREF Input Associate DIO5 Either Associated Indicator Digital I O 5 RTS DIO6 Either Request to Send Flow Control Digital I O 6 AD3 DIO3 Either Analog Input or Digital I O AD2 DIO2 Either Analog Input 2 or Digital I O 2 AD1 DIO1 Either
66. ce has successfully joined a network it can transmit and receive data Routers can also route data and allow other devices to join the network Routers and end devices save their channel and PAN ID settings into non volatile memory so this information will persist through power cycles Example Joining a PAN 1 Set SC and EI to the desired scan channels and PAN ID values The defaults should suffice 2 If SC or EI is changed from the default issue the WR command to save the changes 3 If SC or EI is changed from the default apply changes make SC and EI changes take effect either by sending the AC command or by exiting AT command mode 4 The Associate LED will start blinking once the router or end device has joined a PAN 5 If the Associate LED is not blinking the AI command can be read to determine the cause of join failure 6 Once the router or end device has joined the OE OP and CH commands will indicate the extended PAN ID 16 bit PAN ID and operating channel of the network it joined 7 The MY command will reflect the 16 bit address that the device received when it joined 2008 Digi International Inc XBee X Bee PRO ZB OEM RF Modules 8 The MP command will reflect the 16 bit address of the end device s parent end devices only 9 The API Modem Status frame Joined is sent out the UART API firmware only 10 A joined router will allow other devices to join for a time based on its
67. coordinator has not already selected an operating PAN ID and channel it performs an energy scan and PAN scan The energy and PAN scans use the SC and SD values to determine the channels to scan and how long to scan on each channel The EI command is used to determine what extended PAN ID the coordinator should start on An EI value of 0 allows the coordinator to start on a random extended PAN ID The coordinator will select a random 16 bit PAN ID After completing the energy and PAN scans the coordinator uses the results from the scans to select an operating channel and PAN ID for the network If security is enabled EE command the coordinator will apply the security policy to the network The coordinator startup process is outlined in the figure below 2008 Digi International Inc 30 XBee X Bee PRO ZB OEM RF Modules Coordinator Startup SC SD EI Network Configuration Commands Commands Energy Channel Scan Select a channel and PAN Scan PAN ID for the network Apply Security Policy EE Command CH OE OP Commands As soon as the XBee coordinator has formed the network on a PAN ID and channel it Allows joining for a time NJ command e Starts blinking the Associate LED D5 LT commands e Sends a Modem Status API frame coordinator started out the UART API firmware only The NJ parameter specifies the coordinator s permit join time See section 3 3 1 Allowing Joins for details T
68. ctor device would have to support a large routing table to store reverse routes for each device in the network If the routing table were smaller than the number of remotes the collector could not store enough routes and would have to perform regular route discoveries To work around this potential problem ZigBee includes provisions to support many to one transmissions where many devices in a network can all transmit data to a central gateway or collector device without causing a flood of route discoveries To accomplish this the collector device sends a periodic broadcast transmission identifying itself as a collector device All other devices that receive this broadcast transmission create a reverse routing table entry back to the collector When the remote devices transmit data to the collector they first transmit a route record frame that records the entire route from the remote to the collector before transmitting the data The route record frame provides the collector with the entire route to each remote it receives data from The collector can use the information in the route record frames to store return routes This process effectively establishes routes between the collector and all devices in the network using a single broadcast transmission instead of many route discoveries ZigBee many to one routing can support one or more collector devices 2008 Digi International Inc 29 4 XBee ZigBee Networks The XBee modules are based
69. dule is no longer receiving RF data 2 If the module is transmitting an RF data packet the module may need to discover the desti nation address or establish a route to the destination After transmitting the data the module may need to retransmit the data if an acknowledgment is not received or if the transmission is a broadcast These issues could delay the processing of data in the serial receive buffer Serial Transmit Buffer When RF data is received the data is moved into the serial transmit buffer and sent out the UART 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 Cases in which the serial transmit buffer may become full resulting in dropped RF packets 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 Ifthe 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 Flow Control The RTS and CTS module pins can be used to provide RTS and or CTS flow control CTS flow control provides an indication to the host to stop sending serial data to the module RTS flow control allows the host to signal the module to not send data in the serial transmit buffer out the uart RTS and CTS flow control are enabled using the D6 and
70. dule was tested and approved with 15 dBi antenna gain with 1 dB cable loss EIRP Maimum of 14 dBm Any Omni Directional type antenna with 14 dBi gain or less can be used with no cable loss Antenna Type Flat Panel RF module was tested and approved with 19 dBi antenna gain with 4 8 dB cable loss EIRP Maimum of 14 2 dBm Any Flat Panel type antenna with 14 2 dBi gain or less can be used with no cable loss XBee RF Module The following antennas have been tested and approved for use with the embedded XBee RF Module Dipole 2 1 dBi Omni directional Articulated RPSMA Digi part number A24 HABSM Chip Antenna 1 5 dBi Attached Monopole Whip 1 5 dBi XBee PRO RF Module The following antennas have been tested and approved for use with the embedded XBee PRO RF Module Dipole 2 1 dBi Omni directional Articulated RPSMA Digi part number A24 HABSM Chip Antenna 1 5 dBi Attached Monopole Whip 1 5 dBi Canada IC Labeling Requirements Labeling requirements for Industry Canada are similar to those of the FCC A clearly visible label on the outside of the final product enclosure must display the following text Contains Model XBee Radio IC 4214A XBEE2 The integrator is responsible for its product to comply with IC ICES 003 amp FCC Part 15 Sub B Unintentional Radiators ICES 003 is the same as FCC Part 15 Sub B and Industry Canada accepts FCC test report or CISPR 22 test report for compliance with
71. e X Bee PRO ZB OEM RF Modules 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 It is possible in rare circumstances for the destination to receive a data packet but for the source to not receive the network acknowledgment In this case the source will retransmit the data which could cause the destination to receive the same data packet multiple times The XBee modules do not filter out duplicate packets The application should include provisions to address this potential issue See Data Transmission and Routing in chapter 3 for more information Receive Mode If a valid RF packet is received the data is transferred to the serial transmit buffer 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 in Chapter 7 for an alternate means of configuring modules AT Command Mode To Enter 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 Default AT C
72. e used to send commands to a remote module to read or set command parameters The API firmware has provisions to send configuration commands set or read to a remote module using the Remote Command Request API frame see chapter 8 Remote commands can be issued to read or set command parameters on a remote device Sending a Remote Command To send a remote command the Remote Command Request frame should be populated with the 64 bit address and the 16 bit address if known of the remote device the correct command options value and the command and parameter data optional If a command response is desired the Frame ID should be set to a non zero value Applying Changes on Remote Devices When remote commands are used to change command parameter settings on a remote device parameter changes do not take effect until the changes are applied For example changing the BD parameter will not change the actual serial interface rate on the remote until the changes are applied Changes can be applied using remote commands in one of three ways e Set the apply changes option bit in the API frame Issue AC command to the remote device Issue a WR FR command to the remote device to save changes and reset the device Remote Command Responses If the remote device receives a remote command request transmission and the API frame ID is non zero the remote will send a remote command response transmission back to the device that sent th
73. e firmware type AT Firmware To send data to the loopback cluster ID on the data endpoint of a remote device set the ZA command to 1 and set the CI command value to 0x12 The SE and DE commands should be set to OxE8 default value The DH and DL commands should be set to the address of the remote 0 for the coordinator or the 64 bit address of the remote After exiting command mode any received serial characters will be transmitted to the remote device and returned to the sender API Firmware Send an Explicit Addressing ZigBee Command API frame 0x11 using 0x12 as the cluster ID and OxE8 as the source and destination endpoint Data packets received by the remote will be echoed back to the sender RSSI Indicators It is possible to measure the received signal strength on a device using the DB command DB returns the RSSI value measured in dBm of the last received packet However this number can be misleading The DB value only indicates the received signal strength of the last hop If a transmission spans multiple hops the DB value provides no indication of the overall transmission path or the quality of the worst link it only indicates the quality of the last link and should be used sparingly The DB value can be determined in hardware using the RSSI PWM module pin pin 6 If the RSSI PWM functionality is enabled PO command when the module receives data the RSSI PWM is set to a value based on the RSSI of the received p
74. e its current channel and PAN and attempt to join a network based on its SC EI and EE command values see section 4 1 2 Resetting Network Parameters Once a coordinator has started or a router or end device has joined a network the device will continue to operate on the same channel and PAN ID even through power cycle or reset until one of the following occurs The PAN ID changes EI command such that the current operating PAN ID EO is invalid The scan channels mask changes SC such that the current operating channel is not valid One of the security parameters is changed EE EO KY LK e After a reset or power cycle with JV 1 a router does not receive a 64 bit address discovery response from the coordinator e An end device with JV 1 does not receive poll acknowledgments from its parent for 3 consec utive polls e The NR1 or NRO command is issued to force a device to leave If any of the above conditions occur on a coordinator it will leave its current operating channel and PAN ID and attempt to start a new PAN as described in section 4 1 1 If any of the above conditions occur on a router or end device it will leave its current operating channel and PAN ID and attempt to find a new PAN to join as described in section 4 1 2 Note that with the exception of NR any command parameter changes do not take effect until the changes are applied Secure Networks If EE 1 on the coordinator then it will apply a securit
75. e remote command When a remote command response transmission is received a device sends a remote command response API frame out its UART The remote command response indicates the status of the command success or reason for failure and in the case of a command query it will include the register value The device that sends a remote command will not receive a remote command response frame if The destination device could not be reached The frame ID in the remote command request is set to 0 IO Line Monitoring XBee modules support analog inputs and digital IO Analog and digital IO can be set or read The XBee supports the following IO functions Table 4 07 Module Pin Names Module Pin Numbers Configuration Command CD DIO12 4 P2 PWMO RSSIM DIO10 6 PO PWM DIO11 T P1 SLEEP RQ DIO8 9 10 Configuration not supported DIO4 11 D4 CTS DIO7 12 D7 ON_SLEEP DIO9 13 10 Configuration not supported 2008 Digi International Inc 48 ZB OEM RF Modules Table 4 07 Module Pin Names Module Pin Numbers Configuration Command 550 0105 15 05 RTS DIO6 16 D6 AD3 DIO3 17 D3 AD2 DIO2 18 D2 AD1 DIO1 19 DI ADO DIOO 20 DO Setting the configuration command that corresponds to a particular pin will configure the pin IO line command settings include the following Table 4 08 a 0 Unmonitored digital input 1 Reserved for
76. e sum will equal OxFF API Examples Example Create an API AT command frame to configure an XBee to allow joining set NJ to OxFF The frame should look like Ox7E 0x00 0x05 0x08 0 01 Ox4E Ox4A OxFF 5F Where 0x0005 length 0x08 AT Command API frame type 0x01 Frame ID set to non zero value Ox4E4A AT Command NJ OxFF value to set command to Ox5F Checksum The checksum is calculated as OxFF 0x08 0x01 Ox4E Ox4A OxFF Example Send a transmission to a module with destination address 0x0013A200 40014011 payload TxDataiB If escaping is disabled AP 1 the frame should look like Ox7E 0x00 0x16 0x10 0x01 0x00 0x13 OxA2 0x00 0x40 0 0x01 0x27 OxFF OxFE 0x00 0x00 0x54 0x78 0x44 0x61 0x74 0x61 0x30 0x41 0x13 Where 0x16 length 22 bytes excluding checksum 0x10 ZigBee Transmit Request API frame type 0 01 0x0013A200400A0127 64 bit Destination Address OxFFFE 16 bit Destination Address Frame ID set to non zero value 0x00 Broadcast radius 0x00 Options 0x5478446174613041 Data payload TxData0A 0x64 Checksum If escaping is enabled AP 2 the frame should look like Ox7E 0x00 0x16 0x10 0x01 0x00 Ox7D 0x33 OxA2 0x00 0x40 0 0 01 0x27 OxFF OxFE 0x00 0x00 0x54 0x78 0x44 0x61 0x74 0x61 0x30 0x41 Ox7D 0x33 The checksum is calculated on all non escaped bytes as OxFF sum of all bytes from API frame type through data payload Example Send a transmission to the coordinator wi
77. ed to retransmit the packet as needed Large broadcast packets will require more buffer space Since broadcast transmissions are retransmitted by each device in the network broadcast messages should be used sparingly 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 address that corresponds to a known 64 bit address and route discovery to establish a route 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
78. ee PRO XBee amp XBee PRO top view top view side views PIN 1 iN 00000000 PIN 10 e Figure 1 02 Mechanical Drawings for the RPSMA Variant XBee 210 SHORTER THAN XBee PRO 0 960 0 866 ae a 0 375 PIN 11 PIN 10 1 297 0 257 LIN PIN 1 14797 L 3 3 0 435 0 500 0 304 0 239 0 113 0 031 2008 Digi International Inc XBee X Bee PRO ZB OEM RF Modules Mounting Considerations The XBee modules were designed to mount into a receptacle socket and therefore does not require any soldering when mounting it to a board The XBee PRO Development Kits contain RS 232 and USB interface boards which use two 20 pin receptacles to receive modules Figure 1 03 XBee PRO Module Mounting to an RS 232 Interface Board The receptacles used on Digi development boards are manufactured by Century Interconnect Several other manufacturers provide comparable mounting solutions however Digi currently uses the following receptacles e Through hole single row receptacles Samtec P N MMS 110 01 L SV or equivalent e Surface mount double row receptacles Century Interconnect P N CPRMSL20 D 0 1 or equivalent e Surface mount single row receptacles Samtec P N SMM 110 02 SM S Digi also recommends printing an outline of the module on the board to indi
79. en the energy scan completes the coordinator scans the remaining quiet channels found in the energy scan for existing PANs To do this the coordinator sends a broadcast one hop beacon request Any nearby coordinators and routers will respond to the beacon request by sending a beacon frame back to the coordinator The beacon frame contains information about the PAN the sender is on including the PAN identifier PAN ID and whether or not the device is allowing joining The PAN scan is more commonly called an active scan or a beacon scan PAN Scan Figure 3 03 PAN Scans PAN Scan Beacon Request 4 omm Beacon Request X d Beacon Request a gt New ES aoe i OO aon s 23 EP A PAN Scan allows the coordinator to detect nearby PAN IDs to avoid duplicating existing PAN IDs 2008 Digi International Inc 20 X Bee X Bee PRO ZB OEM RF Modules Once the coordinator has completed the energy and PAN scans it parses all received beacons and attempts to start on an unused PAN ID and channel When the coordinator starts a PAN it can then allow routers and or end devices to join the PAN A coordinator retains the channel and PAN ID attributes through power cycle or reset events Joining a PAN Router and end device types must discover and join a ZigBee PAN To do this they first issue a PAN scan just like the coordinator does when it starts a PAN From the PAN scan the rout
80. er or end device receives a list of beacons from nearby ZigBee devices The router or end device parses this list to find a valid ZigBee network to join Routers and end devices can be configured to join any ZigBee PAN or to only join a PAN with a certain PAN ID However they must always find a coordinator or router that is allowing joins Figure 3 04 Joining a PAN Beacon Request P i M 24 7 ES 2220 7 P 2 Pd 2 M 2 ye pe Beacon EN d N 8 4 wo Bom gt 2 4 7 M 1 di i P d y Td pe l 740 di j bw di i N Coordinator 1 d A 1 Bea y y 4 5 Each beacon contains Association Request the following attributes PAN ID xx Allow join 7 true false Association Response A router or end device sends a beacon request to discover nearby Zigbee networks If a device is found that is operating on a valid Zigbee network that is allowing joins the router or end device sends an association request to that device to attempt to join the network Once a joining device router or end device discovers a device operating on a valid ZigBee network that is allowing joining it attempts to join the PAN by sending an association request to that device Allowing Joining The coordinator and all routers can allow new routers and end devices to join to them Whether or not a particular coordinator or
81. es occur only as needed 2008 Digi International Inc 42 XBee X Bee PRO ZB OEM RF Modules Device in mesh network Figure 4 012 Determining the End Device Route Network Address Request Parent Source Network Address Response Route Request a Route Reply A Data end device Child sleeping end device Destination To talk to an end device a source device in a mesh network must talk to the parent to determine the address and the route of the end device The source device then sends data to the parent 2008 Digi International Inc X Bee X Bee PRO Z B OEM RF Modules Figure 4 013 End Device Sending Data to Parente Network Address Request lt Device mesh network Network Address Response Route Request Route Reply Data Destination An end device sends data to its parent to route to the correct destination node The Parent Data A parent performs all of the necessary addressing and route discoveries before forwarding the data Child sleeping end device Source nd Device Behavior An end device child retrieves RF data from its parent through polling When the end device wakes from sleep it sends a poll request to its parent notifying the parent that it is awake and requesting any data the parent has received that was addressed to the end device
82. ettings baud rate parity start bits stop bits data bits Serial Buffers The XBee modules maintain small buffers to collect received serial and RF data which is illustrated in the figure below 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 2008 Digi International Inc 11 XBee X Bee PRO ZB OEM RF Modules Figure 2 03 Internal Data Flow Diagram Serial Receive Buffer Serial HH Receiver l RF TX Transmitter Buff Buffer Bi RF Switch LN Antenna Processor P ee Lo 2 Port Serial Transmit RF RX Reddi Buffer Buffer eceiver When serial data enters the RF module through the DIN Pin pin 3 the data is stored in the serial receive buffer until it can be processed Under certain conditions the module may not be able to process data in the serial receive buffer immediately If large amounts of serial data are sent to the module CTS flow control may be required to avoid overflowing the serial receive buffer Cases in which the serial receive buffer may become full and possibly overflow 1 If the module is receiving a continuous stream of RF data the data in the serial receive buffer will not be transmitted until the mo
83. for DIO4 CRE 3 Digital input 0 4 Digital output low 5 Digital output high D3 2008 Digi International Inc 81 XBee X Bee PRO ZB OEM RF Modules Table 7 07 I O Commands 0 Disabled 1 7 Associated indication LED D5 DIO5 Configuration Configure options for the DIOS line of the RF module CRE 3 Digital input 1 4 Digital output default low 5 Digital output default high Assoc LED Blink Time Set Read the Associate LED blink time If the Associate LED functionality is enabled D5 command this value determines the on and off blink times 0x14 OxFF 200 2550 LT for the LED when the module has joined a network If LT 0 the default blink rate will be CRE ms 0 used 500ms coordinator 250ms router end device For all other LT values LT is measured in 10ms 0 3 5 0 Disabled D8 DIO8 Configuration Set Read function for DIO8 This command is not yet supported CRE 3 Digital input 4 Digital output low 5 Digital output high Set read the bit field that configures the internal pull up resistor status for the I O lines 1 specifies the pull up resistor is enabled 0 specifies no pullup 30k pull up resistors Bits 0 DIO4 Pin 11 1 AD3 DIO3 Pin 17 2 AD2 DIO2 Pin 18 3 AD1 DIO1 Pin 19 4 ADO DIOO Pin 20 PR 5 RTS DIO6 i to CRE 0 0Ox1FFF 0 Ox1FFF 6 DTR Sleep Request DIO8 Pin 9 7 DIN Config Pin 3 8 Associate D
84. for the pin configuration commands typically include the following Table 4 012 0 Unmonitored digital input Reserved for pin specific alternate functionalities Analog input single ended A D pins only 6 9 Digital input monitored Digital output default low Digital output default high Alternate functionalities where applicable 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 sample the current value of all enabled A D and digital input lines Table 4 013 Sample sets in packet Number of sample sets in the packet Digital Channel Mask Analog Channel Mask Each bit in the digital channel mask corresponds to one digital IO line The bits from LSB to MSB correspond to 0010 0015 on the module For example a digital channel mask of 0x002F means 0100 1 2 3 and 5 are enabled as digital input lines Each bit in the analog channel mask corresponds to one analog channel The bits from LSB to MSB correspond to AINO AIN7 on the module For example if the analog channel mask is 0x06 AINI and AIN3 are enabled as analog input lines 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
85. gh 0 Unmonitored digital input 3 Digital input monitored P2 DIO12 Configuration Configure options for the DIO12 line of the RF module CRE 4 Digital output default 0 low 5 Digital output default high PO PWM0 Configuration Select Read function for PWMO CRE P1 DIO11 Configuration Configure options for the DIO11 line of the RF module CRE 0 3 5 0 Disabled 3 Digital input 4 Digital output low 5 Digital output high 0 5 0 Disabled 1 Node identification button enabled DO ADO DIOO Configuration Select Read function for ADO DIOO CRE 2 Analog input single 1 ended 3 Digital input 4 Digital output low 5 Digital output high 0 2 5 0 Disabled AD1 DIO1 Configuration Select Read function for AD1 DIO1 Sis SDN input single 3 Digital input 4 Digital output low 5 Digital output high 0 2 5 0 Disabled 2 Analog input single AD2 DIO2 Configuration Select Read function for AD2 DIO2 CRE ended 3 Digital input 4 Digital output low 5 Digital output high P3 DIO13 Configuration Set Read function for DIO13 This command is not yet CRE supported D1 D2 0 2 5 0 Disabled 2 Analog input single AD3 DIO3 Configuration Select Read function for AD3 DIO3 CRE ended 0 3 Digital input 4 Digital output low 5 Digital output high 0 3 5 0 Disabled D4 DIO4 Configuration Select Read function
86. he Associate LED will blink at a rate based on the LT command The default rate LT 0 for a coordinator is 1 blink per second After the coordinator has successfully started it behaves similar to a router it can allow devices to join the network and it can transmit route and receive data The coordinator saves the selected channel and PAN ID settings into non volatile memory so this information will persist through power cycles Example Starting a Coordinator 1 Set SC and EI to the desired scan channels and PAN ID values The defaults should suffice 2 If SC or EI is changed from the default issue the WR command to save the changes 3 If SC or EI is changed from the default apply changes make SC and EI changes take effect either by sending the AC command or by exiting AT command mode 4 The Associate LED will start blinking once the coordinator has selected a channel and PAN ID 5 The API Modem Status frame Coordinator Started is sent out the UART API firmware only 6 Reading the AI command association status will return a value of 0 indicating a successful startup 7 Reading the MY command 16 bit address will return a value of 0 the ZigBee defined 16 bit address of the coordinator 8 After startup the coordinator will allow joining based on its NJ value Coming up from Reset Once the coordinator has selected a PAN ID and channel it retains that information throughpower cycle or reset events When t
87. he coordinator comes up from a reset or power cycle it checks its operating channel and PAN ID against the network configuration commands SC and EI It also verifies the applied security policy against the security configuration commands EE KY LK If the coordinator s operating channel PAN ID or security policy does not match the configuration commands the coordinator will leave its current channel and PAN ID and attempt to form a new network based on its SC EI and EE parameter values This is shown in the figure below 2008 Digi International Inc 31 XBee X Bee PRO ZB OEM RF Modules Coordinator Network verification coming up from reset CH OE Security Policy Valid 23 Check for validity against Read Network Configuration Settings parameter values Note that if EI SC or EE change such that the last channel security or PAN ID settings are no longer valid the coordinator will go through the startup process again and could selecta different PAN ID or channel This is possible if EI SC or EE values are changed from theirdefaults and not saved WR not issued or if a command is issued to change EI SC or EE after the network has been formed Advanced Coordinator Startup Commands In some cases an application may wish to configure the initial 16 bit PAN ID Under normal operating conditions the 16 bit PAN ID should not be changed since the ZigBee PRO stack can change it at anytime if
88. heck for data This helps ensure the end device can receive RF data transmissions that were sent to it In many cases the On Sleep pin can be used to wake an external microprocessor or peripheral device when the module wakes from sleep If the end device wakes and finds that its parent had no data there may be no need to wake the external device The SN command is a multiplier of the SP time that determines how often to set the On Sleep pin when waking For example if the end device sleeps for 20 seconds but the On Sleep pin should only be set high on every 3rd poll once per minute SN can be set to 3 The On Sleep pin will be set high anytime RF data is received regardless of SN This is shown in the figure below In some applications the end device may transmit data at a very slow rate once an hour once a day etc and will only receive data in response to its transmission In such cases the SO command can be used to cause an end device to sleep for the entire SP SN duration This is shown below 2008 Digi International Inc 46 XBee X Bee PRO ZB OEM RF Modules Figure 4 016 Polling for Data without Asserting On Sleep On Sleep pud ote 5 5 2t SP SN pex I Transmitting poll request to parent Transmitting poll request to parent tz SP SP Setting SN gt 1 allows the XBee to silently poll for data without asserting On Sleep If RF data is received when polling O
89. hen an end device joins a ZigBee PAN it becomes a child of the coordinator or router device it joined to and the device that allowed the join becomes the end device s parent Thereafter the parent will manage RF data packets for the end device If the parent receives an RF packet destined for the end device it will store the data packet until one of the following occurs The parent runs out of storage space and cannot store a new packet A packet has been stored for a period of time timeout The destination end device child sends a poll request transmission to request the data packet When the parent stores a packet destined for an end device child it stores the packet for a maximum time set by SP The actual storage time is computed as SP 2 5 not exceeding 30 seconds If end devices implement cyclic sleep SP should be set the same on a parent as it is on their sleeping end device children In the case of pin sleep where RF data could be received the end device should wake within SP time to ensure incoming RF data is not lost The parent can only store one broadcast packet the most recently received for its end device children The parent is also responsible for performing any route or address discoveries to forward data sent by its end device child ren into the mesh network The parent s interactions with the mesh network in behalf of its end device child ren are shown in the figure below Note address and route discoveri
90. ial characters are received for the amount of time determined by the RO Packetization Timeout parameter If RO 0 packetization begins when a character is received e The Command Mode Sequence GT CC GT is received Any character buffered in the serial receive buffer before the sequence is transmitted The maximum number of characters that will fit in an RF packet is received RF modules that contain the following firmware versions will support Transparent Mode 1 0xx coordinator and 1 2xx router end device API Operation API operation is an alternative to transparent operation The frame based API extends the level to which a host application can interact with the networking capabilities of the module 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 e RF received data frame Command response e 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 f
91. ice This frame counter is incremented after each transmission and cannot wrap to O If a neighbor receives a transmission with a frame counter that is less than or equal to the last received frame counter the packet will be discarded To prevent an eventual lockup where the frame counter on a device reaches OxFFFFFFFF the network key should be periodically updated changed on all devices in the network To update the network key in the network the coordinator should issue the KY command with a new security key This will send a broadcast transmission throughout the network causing the frame counters on all devices to reset to 0 and causing devices to begin using the new network key All devices will also retain the previous key for a short time until everyone has switched to the new key XBee ZB Addressing XBee modules support both ZigBee device addressing and application layer addressing Device addressing provides a simple means of sending data from one device to another by hiding the application layer addressing information ZigBee endpoints and cluster IDs If a device will support multiple endpoints or cluster IDs application addressing can be used to include endpoint and cluster ID information in the transmission Device addressing supports transmissions to a destination 64 bit address a destination NI string e the ZigBee PAN coordinator all devices on the PAN broadcast Application layer addressing supports transmi
92. il a network reset condition occurs on the parent End Device Operation ZigBee end devices rely on a parent router or coordinator to remain awake and receive any data packets destined for the end device When the end device wakes from sleep it sends a transmission poll request to its parent asking if the parent has received any RF data destined for the end device The parent upon receipt of the poll request will send an RF response and the buffered data if present If the parent has no data for the end device the end device may return to sleep depending on its sleep mode configuration settings The following figure demonstrates how the end device uses polling to receive RF data through its parent 2008 Digi International Inc 41 XBee X Bee PRO ZB OEM RF Modules Device in a Mesh Network Source When RF data If the end device is awake with the ST timer running SM 4 or if Sleep_RQ is de asserted SM 1 the end device will send poll requests every 100ms to ensure it receives any new RF data from its parent Figure 4 011 RF Data Sent to Sleeping End Device gt Child TX Poll sleeping d Data Poll Destination 1 1 Parent k end device is sent to a sleeping end device the end device s parents buffers the data until the end device polls for the data or a timeout occurs Parent Operation W
93. inator and all devices in the network for 2 1 minute If joining is permanently enabled on a device NJ OxFF this action has no effect on that device e Causes the device to leave the PAN e Issues ATRE to restore module parameters to 4 default values including ID and SC The device attempts to join a network based on its ID and SC settings N A e Issues ATRE to restore module parameters to default values including ID and SC The device attempts to join a network based on its ID and SC settings 2008 Digi International Inc 57 XBee X Bee PRO ZB OEM RF Modules Button presses may be simulated in software using the ATCB command ATCB should be issued with a parameter set to the number of button presses to execute i e sending ATCB1 will execute the action s associated with a single button press The node identification frame is similar to the node discovery response frame it contains the device s address node identifier string NI command and other relevant data All API devices that receive the node identification frame send it out their Uart as an API Node Identification Indicator frame 0x95 Associate LED The Associate pin pin 15 can provide indication of the device s network status and diagnostics information To take advantage of these indications an LED can be connected to the Associate pin as shown in the figure above The Associate LED functiona
94. ith any logic and voltage compatible UART or through a level translator to any serial device For example Through a Digi proprietary RS 232 or USB interface board 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 2 01 System Data Flow Diagram in a UART interfaced environment Low asserted signals distinguished with horizontal line over signal name CMOS Logic 2 8 3 4V 7 _ CMOS Logic 2 8 3 4V DIN data in 5 DIN data in XBee P 29 15 Ais i XBee 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 2 02 UART data packet 0x1F decimal number 31 as transmitted through the RF module Example Data Format is 8 N 1 bits parity of stop bits Least Significant Bit first NN 1 Idle high 1 1 1 1 9 y UART Signal Signal 0 VDC Voltage f Start Bit low Stop Bit high Time gt 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 s
95. l to the last received frame counter the packet will be discarded To prevent an eventual lockup where the frame counter on a device reaches OxFFFFFFFF the network key should be periodically updated changed on all devices in the network 2008 Digi International Inc bo Go XBee X Bee PRO ZB OEM RF Modules 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 a message type field called a Cluster ID ZigBee Device Addressing The 802 15 4 protocol upon which the ZigBee protocol is built specifies two address types e 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 1 If an end device cannot communicate with its parent it may need to leave the network and rejoin to find a new parent 2 If the device type changes from router to end device or vice versa the device will leave the network and rejoin as the new device type ZigBee requires that data be sent to the 16
96. labeling requirements FCC notices and antenna usage guidelines is required To fufill FCC Certification the OEM must comply with the following regulations 1 The system integrator must ensure that the text on the external label provided with this device is placed on the outside of the final product Figure A 01 2 XBee RF Module may only be used with antennas that have been tested and approved for use with this module refer to the antenna tables in this section OEM Labeling Requirements requirements are met This includes a clearly visible label on the outside of the final WARNING The Original Equipment Manufacturer OEM must ensure that FCC labeling product enclosure that displays the contents shown in the figure below Required FCC Label for OEM products containing the XBee RF Module Contains FCC ID OUR XBEE2 The enclosed device complies with Part 15 of the FCC Rules Operation is subject to the following two conditions 7 this device may not cause harmful interference and ii this device must accept any interference received including interference that may cause undesired operation Required FCC Label for OEM products containing the XBee PRO RF Module Contains FCC ID MCQ XBEEPRO2 The enclosed device complies with Part 15 of the FCC Rules Operation is subject to the following two conditions i this device may not cause harmful interference and ii this device must accept any interference received inc
97. le trying to parse the high byte of the CRC in the XModem frame The bootloader encountered an error while trying to parse the low byte of the CRC in the XModem frame The bootloader encountered an error in the sequence number of the current XModem frame The frame that the bootloader was trying to parse was deemed incomplete some bytes missing or lost The bootloader encountered a duplicate of the previous XModem frame No ebl header was received when expected Header failed CRC File failed CRC Unknown tag detected in ebl image Invalid ebl header signature Trying to flash odd number of bytes Indexed past end of block buffer Attempt to overwrite bootloader flash Attempt to overwrite SIMEE flash Flash erase failed Flash write failed End tag CRC wrong length Received data before query request response 2008 Digi International Inc 86 XBee X Bee PRO ZB OEM RF Modules Developing Custom Firmware Designers can implement custom firmware projects on the XBee module and upload the firmware using X CTU or one of Ember s programming tools The X CTU can upload firmware onto an XBee as long as the original bootloader is not erased see section 8 4 For some applications it may be necessary to determine if the board is an XBee or an XBee PRO flavor The GPIO1 pin is used to identify the module type it is grounded on the XBee and unc
98. lication 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 Cl is only supported in AT firmware The default CRE eee 0x11 value0x11 Transparent data cluster ID NP Maximum RF Payload Bytes This value returns the maximum number of RF payload CRE 0 OXFFFF read only bytes that can be sent in a unicast transmission 1 Node types that support the command C Coordinator R Router E End Device 2 Command supported by modules using AT Command firmware only Networking Table 7 03 Networking Commands Operating Channel Read the channel number used for transmitting and receiving between RF modules Uses 802 15 4 channel numbers A value of 0 means the device has not joined a PAN and is not operating on any channel 0 0x0B 0x1A XBee 0 0x0B 0x18 XBee PRO read only Extended PAN ID Set read the 64 bit extended PAN ID If set to 0 the coordinator will select a random extended PAN ID and the router end device will join any extended PAN ID Changes to El should be written to non volatile memory using the WR command 0 OxFFFFFFFFFFFFFFFF Operating Extended PAN ID Read the 64 bit extended PAN ID The OE value reflects the operating extended PAN ID that the module is running on If El gt 0 OE will equal El 0x01 OxFFFFFFFFFFFFFFFF read only Maximum Unicast Hops Set
99. lity is enabled by setting the D5 command to 1 enabled by default If enabled the Associate pin is configured as an output and will behave as described in the following sections Joined Indication The Associate pin indicates the network status of a device If the module is not joined to a network the Associate pin is set high Once the module successfully joins a network the Associate pin blinks at a regular time interval This is shown in the following figure 2008 Digi International Inc 58 XBee X Bee PRO ZB OEM RF Modules Associate Figure 5 021 Joined Status of a Device Device Not Joined Device has joined a network The associate pin can indicate the joined status of a device Once the device has joined a network the associate pin toggles state at a regular At The time can be set by Associate D5 1 using the LT command The LT command defines the blink time of the Associate pin If set to 0 the device uses the default blink time 500ms for coordinator 250ms for routers and end devices Diagnostics Support The Associate pin works with the commissioning pushbutton to provide additional diagnostics behaviors to aid in deploying and testing a network If the commissioning push button is pressed once and the device has not joined a network the Associate pin blinks a numeric error code to indicate the cause of join failure The number of blinks is equal to AI value 0x20 For example if AIZ
100. low the RF module to enter states of low power consumption when not in use The XBee OEM RF modules support both pin sleep sleep mode entered on pin transition and cyclic sleep module sleeps for a fixed time XBee sleep modes are discussed in detail in section 5 3 2008 Digi International Inc 17 3 ZigBee Networks ZigBee Network Formation ZigBee networks are called personal area networks or PANs Each network is defined with a unique PAN identifier PAN ID XBee ZB supports both a 64 bit extended PAN ID and a 16 bit PAN ID The 16 bit PAN ID is used in all data transmissions The 64 bit PAN ID is used during joining and to resolve 16 bit PAN ID conflicts that may occur ZigBee defines three different device types coordinator router and end devices An example of such a network is shown below Figure 3 01 Node Types Sample of a Basic ZigBee Network Topology Coordinator One per PAN Establishes Organizes a PAN lt gt Mains powered Router d 4 or A 1 Optional Several can be in a PAN Mains powered End Device Several can be in a PAN E Low power A coordinator has the following characteristics it e Selects a channel and PAN ID both 64 bit and 16 bit to start the network e Can allow routers and end devices to join the network e Can assist in routing data Cannot sleep should be mains powered A router has the following characteristics it Must join a ZigBee PAN before it can tran
101. luding interference that may cause undesired operation FCC Notices IMPORTANT The XBee and XBee PRO RF Module have been certified by the FCC for use with other products without any further certification as per FCC section 2 1091 Modifications not expressly approved by Digi could void the user s authority to operate the equipment IMPORTANT OEMs must test final product to comply with unintentional radiators FCC section 15 107 amp 15 109 before declaring compliance of their final product to Part 15 of the FCC Rules IMPORTANT The RF module has been certified for remote and base radio applications If the module will be used for portable applications the device must undergo SAR testing This equipment has been tested and found to comply with the limits for a Class B digital device pursuant to Part 15 of the FCC Rules These limits are designed to provide reasonable protection against harmful interference in a residential installation This equipment generates uses and can radiate radio frequency energy and if not installed and used in accordance with the instructions may cause harmful interference to radio communications However there is no guarantee that interference will not occur in a particular installation If this equipment does cause harmful interference to radio or television reception which can be determined by turning the equipment off and on the user is encouraged to try to correct the interference by one or
102. maximum hops value 9 Options byte 23 16 bit Destination Network Address byted 14 15 DEM Set to 0 Destination network address if known Set to 9 P di 10 OxFFFE for broadcast transmissions or if the i RF Data byte 24 n destination network address is not known RF data size must be less than or Source endpoint byte 16 4 d equal to the maximum number of pd RF data bytes NP command Source endpoint for the transmission d Destination endpoint byte 17 5 pu Destination endpoint for the transmission 2008 Digi International Inc ZB OEM RF Modules ZigBee Transmit Status API Identifier Value Ox8B 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 6 14 TX Status Frames Start Delimiter Length Frame Data Checksum Ox7E MSB LSB API specific Structure 1 Byte API Identifier Identifier specific Data 0x8B cmdData eee Frame ID Byte 5 Remote Network Address Bytes 6 7 Transmit Retry Count Byte 8 Delivery Status Byte 9 Discovery Status Byte 10 0x00 Success 16 bit Network Address the Identifies UART data frame being reported packet was delivered to if success If not success this address matches the Destination Network Address th
103. mmissioning and Diagnostics Network commissioning is the process whereby devices in a mesh network are discovered and configured for operation The XBee modules include several features to support device discovery and configuration In addition to configuring devices a strategy must be developed to place devices to ensure reliable routes To accommodate these requirements the XBee modules include various features to aid in device placement configuration and network diagnostics Device Discovery The node discovery command can be used to discover all modules that have joined a network Issuing the ND command sends a broadcast node discovery command throughout the network All devices that receive the command will send a response that includes the device s addressing information node identifier string see NI command and other relevant information This command is useful for generating a list of all module addresses in a network When a device receives the node discovery command it waits a random time before sending its own response The maximum time delay is set on the ND sender with the NT command The ND originator includes its NT setting in the transmission to provide a delay window for all devices in the network Large networks may need to increase NT to improve network discovery reliability The default NT value is 6 seconds Device Configuration API devices can send configuration commands to remote modules to set or
104. more of the following measures Re orient or relocate the receiving antenna Increase the separation between the equipment and receiver Connect equipment and receiver to outlets on different circuits or Consult the dealer or an experienced radio TV technician for help 2008 Digi International Inc 90 XBee X Bee PRO ZB OEM RF Modules FCC Approved Antennas 2 4 GHz The XBee and XBee PRO RF Module can be installed utilizing antennas and cables constructed with standard connectors Type N SMA TNC etc if the installation is performed professionally and according to FCC guidelines For installations not performed by a professional non standard connectors RPSMA RPTNC etc must be used The modules are FCC approved for fixed base station and mobile applications on channels OxOB Ox1A for Xbee Series2 and on channels OxOB 0x18 for Xbee ZNet PRO 2 5 If the antenna is mounted at least 20cm 8 in from nearby persons the application is considered a mobile application Antennas not listed in the table must be tested to comply with FCC Section 15 203 Unique Antenna Connectors and Section 15 247 Emissions XBee RF Modules XBee RF Modules have been tested and approved for use with all the antennas listed in the tables below Cable loss IS required when using gain antennas as shown below Table A 01 antennas approved for use with the XBee RF Modules
105. mple Transmissions IR gt 0 IC 0 oR t lt l A IO Sample Transmissions IR gt 0 IC gt 0 e TIR l l Enabling Edge Detection will force an immediate sample of all monitored digital IO lines if any digital IO lines change state Voltage Supply Monitoring The voltage supply threshold is set with the V command If the measured supply voltage falls below or equal to this threshold the supply voltage will be included in the IO sample set V is set to 0 by default do not include the supply voltage I O Line Configuration The XBee 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 Table 4 011 Module Pin Names Module Pin Numbers Configuration Command CD DIO12 4 P2 PWMO RSSI DIO10 6 PO PWM DIO11 7 P1 SLEEP RQ DIO8 9 10 Configuration not supported DIO4 11 D4 CTS DIO7 12 D7 ON_SLEEP DIO9 13 10 Configuration not supported ASSOC DIO5 15 D5 RTS DIO6 16 D6 AD3 DIO3 17 D3 AD2 DIO2 18 D2 2008 Digi International Inc 52 X Bee X Bee PRO ZB OEM RF Modules Table 4 011 AD1 DIO1 19 DI ADO DIOO 20 DO Setting the configuration command that corresponds to a particular pin will configure the pin Parameters
106. n 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 2008 Digi International Inc 28 XBee X Bee PRO ZB OEM RF Modules Figure 3 010 Unicast Data Transmission Legend S Data Transmission One Network ACK Destination to Source et ace Many to One Transmissions Since ZigBee unicast transmissions may require some combination of broadcast network address discovery and or route discovery having large numbers of devices unicasting data to a single gateway or collector device may not scale well to large networks For example if many devices send route discoveries simultaneously a large network could become flooded with broadcast transmissions In addition the colle
107. n Sleep will immediately assert Legend Sleep RQ Transmitting Poll Request Figure 4 017 Transmitting Poll Request to Parent On Sleep SO 4 t SP SN Transmitting Poll Request to Parent SO 4 t SP SN 5 1 Setting SO 4 will cause the end device to sleep for the entire SP SN time This should only be used if the end device will not receive RF data while sleeping Since a parent can only buffer data up to 30 seconds an end device should only sleep for more than 30 seconds if it will not receive RF data when sleeping The ST parameter can be set to keep the end device awake after transmitting data to receive RF data The commissioning push button can be used to force the end device to wake for 30 seconds See section 6 4 for details Transmitting Data to End Devices To reliably transmit data to an end device SP should be set the same on the end device the end device s parent and on the device that is initiating a transmission to the end device SP determines the transmission timeout on the sender the time to buffer the received packet on the parent and the time to sleep on the end device 2008 Digi International Inc XBee X Bee PRO ZB OEM RF Modules Remote Configuration Commands The API firmware has provisions to send configuration commands to remote devices using the Remote Command Request API frame see Chapter 7 API Operation This API frame can b
108. nation 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 CRE 0 OxFFFFFFFF 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 0 OxFFFFFFFF OxFFFF Coordinator 0 Router End Device 16 bit Network Address Get the 16 bit network address of the module 0 OxFFFE read only OxFFFE 16 bit Parent Network Address Get the 16 bit parent network address of the module 0 OxFFFE read only OxFFFE Number of Remaining Children Read the number of end device children that can join the device If NC returns 0 then the device cannot allow any more end device children to join 0 10 read only Serial Number High Read high 32 bits of the RF module s unique IEEE 64 bit address 64 bit source address is always enabled 0 OXFFFFFFFF read only factory set Serial Number Low Read low 32 bits of the RF module s unique IEEE 64 bit address 64 bit source address is always enabled 0 OxFFFFFFFF read only factory se
109. ng process is illustrated in the following figure Representation of the steps to join a ZigBee network Router End Device Joining SEC SD LEI Joining Commands Commands Search list of discovered devices for a valid PAN lt lt Attempt to joina CH OE OP AI Commands valid PAN if found The status of the last PAN scan and join attempt is recorded into the AI command When a router or end device successfully joins a network AI is set to 0 Once an XBee router or end device has joined a network on a PAN ID and channel it Allows joining for a time NJ command routers only e Start blinking the Associate LED D5 LT commands e Sends a Modem Status API frame joined out the UART API firmware only e Sends a broadcast node identification transmission JN The NJ parameter specifies the permit join time on the router See chapter 3 for details on allowing joins The Associate LED will blink at a rate based on the LT command The default rate LT 0 for a router or end device is 2 blinks per second The broadcast join notification command is sent on a join event or power cycle event This broadcast rapidly blinks the Associate LED on all recipients for 1 second In addition all recipients running API firmware send a Node Identification API frame 0x95 out their UART This behavior is useful for identifying which network a device has joined but it is not recommended for large networks After a router or end devi
110. nications site www npt no Declarations of Conformity Digi has issued Declarations of Conformity for the XBee RF Modules concerning emissions EMC and safety Files are located in the documentation folder of the Digi CD Important Note Digi does not list the entire set of standards that must be met for each country Digi customers assume full responsibility for learning and meeting the required guidelines for each country in their distribution market For more information relating to European compliance of an OEM product incorporating the XBee RF Module contact Digi or refer to the following web sites CEPT ERC 70 03E Technical Requirements European restrictions and general requirements Available at www ero dk R amp TTE Directive Equipment requirements placement on market Available at www ero dk Approved Antennas When integrating high gain antennas European regulations stipulate EIRP power maximums Use the following guidelines to determine which antennas to design into an application XBee OEM Module The following antennas types have been tested and approved for use with the XBee Module Antenna Type Yagi RF module was tested and approved with 15 dBi antenna gain with 1 dB cable loss EIRP Maimum of 14 dBm Any Yagi type antenna with 14 dBi gain or less can be used with no cable loss 2008 Digi International Inc 93 XBee X Bee PRO ZB OEM RF Modules Antenna Type Omni Directional RF mo
111. o 0x0000000000000000 Broadcast Addressing Broadcast transmissions are sent using a 64 bit address of OxOOOOFFFF 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 Set the Destination Addresses of the transmitting module as shown below AT Firmware DL Destination Low Address 0x0000FFFF DH Destination High Address 0x00000000 API Firmware Set the 64 bit destination address field in the API transmit frame to 0x000000000000FFFF Since broadcast transmissions are repeated by all devices in the network broadcasts should be used sparingly 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 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 applic
112. of 0 The frequency selected for data communications between nodes The operating channel is selected by the coordinator on power up Energy Scan A scan of RF channels that detects the amount 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 coordinator or router throughout the network in attempt to establish a route to a destination node Route Reply Unicast transmission sent back to the originator 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 2008 Digi International Inc 89 Appendix B Agency Certifications United States FCC The XBee RF Module complies with Part 15 of the FCC rules and regulations Compliance with the
113. ommand Mode Sequence for transition to Command Mode e No characters sent for one second GT Guard Times parameter 0x3E8 e Input three plus characters within one second CC Command Sequence Character parameter Ox2B e No characters sent for one second GT Guard Times parameter 0x3E8 Once the AT command mode sequence has been issued the module sends an OK r out the DOUT pin The OK r characters can be delayed if the module has not finished transmitting received serial data When command mode has been entered the command mode timer is started CT command and the module is able to receive AT commands on the DIN pin 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 By default the BD Baud Rate parameter 3 9600 bps To Send AT Commands Send AT commands and parameters using the syntax shown below Figure 2 05 Syntax for sending AT Commands AT ASCII Space Parameter Carriage Prefix Command Optional Optional HEX Return LE td Example ATDT 1F lt CR gt 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 Ox1F To store the new value to non volatile long term memory subsequently send the WR Write command 2008 Digi Inte
114. on Cable loss Required A24 P8SF Flat Panel 8 5dBi Fixed 2m 8 2 dB A24 P8NF Flat Panel 8 5dBi Fixed 2m 82 dB A24 P13NF Flat Panel 13 0 dBi Fixed 2m 12 7 dB A24 P14NF Flat Panel 14 0 dBi Fixed 2m 13 7 dB A24 P15NF Flat Panel 15 0 dBi Fixed 2m 14 7 dB A24 P16NF Flat Panel 16 0 dBi Fixed 2m 15 7 dB A24 P19NF Flat Panel 19 0 dBi Fixed 2m 18 7 dB A WARNING To satisfy FCC RF exposure requirements for mobile transmitting devices a separation distance of 20 cm or more should be maintained between the antenna of this device and persons during device operation To ensure compliance operations at closer than this distance are not recommended The antenna used for this transmitter must not be co located in conjunction with any other antenna or transmitter The preceding statement must be included as a CAUTION statement in OEM product manuals in order to alert users of FCC RF Exposure compliance Europe ETSI The XBee RF Module has been certified for use in several European countries For a complete list refer to www digi com If the XBee RF Modules are incorporated into a product the manufacturer must ensure compliance of the final product to the European harmonized EMC and low voltage safety standards A Declaration of Conformity must be issued for each of these standards and kept on file as described in Annex II of the R amp TTE Directive 2008 Digi International Inc XBee X Bee PRO ZB OEM RF Modules
115. onnected on the XBee PRO To determine if a module is an XBee or an XBee PRO do the following e GPIO DIRCLRL GPIO 1 Set GPIO1 as an input e GPIO PUL GPIO 1 Enable GPIO1 pullup resistor e ModuleIsXBee Pro GPIO INL amp GPIO 1 Read GPIO1 If high XBee PRO If low XBee Custom applications should call emberSetTxPowerMode with the appropriate parameters to configure the RF path correctly e Applications running on the XBee should callemberSetTxPower Mode EMBER TX POWER MODE DEFAULT or emberSetTxPower Mode EMBER TX POWER MODE BOOST Applications running on the XBee PRO should call emberSetTxPower Mode EMBER TX POWER MODE ALTERNATE or emberSetTxPower Mode EMBER TX POWER MODE BOOST AND ALTERNATE Design Considerations for Digi Drop in Networking XBee XBee PRO embedded RF modules contain a variety of features that allow for interoperability with Digi s full line of Drop in Networking products Interoperability with other DIN products can offer these advantages Add IP connectivity to your network via Cellular Ethernet or WiFi with a ConnectPort X Gate way Extend the range of your network with the XBee Wall Router e Make deployment easy by enabling the Commissioning Pushbutton pin 20 and Associate LED pin 15 to operate with the Network Commissioning Tool software e Interface with standard RS 232 USB Analog amp Digital I O RS 485 and other industrial devices using XBee
116. ore common ZDO services and their cluster IDs are listed below The Explicit API frame 0x11 can be used to send ZDO commands to a remote device To send a ZDO command the source and destination endpoints should be set to 0 the profile ID should be set to 0x0000 and the cluster ID should be set to the value that corresponds to the ZDO command being sent The data payload field should be populated with a 1 byte sequence number followed by the required data for the ZDO command All multi byte values should be sent using little endian format 2008 Digi International Inc 39 ZB OEM RF Modules Used to discover the 16 bit network address of a device based on its 64 bit address Sent in response to a Network Address Request by the device whose 64 bit address matches the address in the request Used to discover the 64 bit address of a device based on its 16 bit address Sent in response to an IEEE Address Request by the device whose 16 bit address matches the address in the request Used to obtain a simple descriptor on a specified device and Sent by a remote device in response to a simple descriptor Sent by a remote device in response to an active endpoint Reports the neighbor table list of a remote device along with Network Address Request Network Address Response IEEE 64 bit Address Request IEEE 64 bit Address Response Simple Descriptor Request Simple Descriptor Re
117. pin specific alternate functionalities 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 For example sending the command ATD23 will configure AD2 DIO2 pin 18 as a digital input Pullup resistors can be set for each digital input using the PR command IO Samples When an IO sample is taken the collected data is assembled into a packet and either sent out the uart or transmitted to a remote device The IO sample is formatted in the following manner Table 4 09 1 Sample Sets Number of sample sets in the packet Always set 0 1 2008 Digi International Inc 49 ZB OEM RF Modules Table 4 09 Indicates which digital IO lines have sampling enabled Each bit corresponds to one digital IO line on the module bit 0 ADO DIOO e bit 1 AD1 DIO1 bit 2 AD2 DIO2 bit 3 AD3 DIO3 e bit 4 DIO4 e bit 5 ASSOC DIO5 2 Digital Channel Mask e bit 6 RTS DIO6 bit 7 CTS GPIO7 e bit 8 N A e bit 9 N A bit 10 RSSI DIO10 bit 11 PWM DIO11 bit 12 CD DIO12 For example a digital channel mask of 0x002F means 0100 1 2 3 and 5 are enabled as digital IO Indicates which lines have analog inputs enabled for sampling Each bit in the analog channel mask corresponds to one analog input channel bit 0 ADO DIOO e bit 1
118. rames 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 gt Transmitting data to multiple destinations without entering Command Mode gt Receive success failure status of each transmitted RF packet gt Identify the source address of each received packet RF modules that contain the following firmware versions will support API operation 1 1xx coordinator and 1 3xx router end device 2008 Digi International Inc 13 ZB OEM RF Modules A Comparison of Transparent and API Operation The following table compares the advantages of transparent and API modes of operation Simple Interface All received serial data is transmitted unless the module is in command mode Easy to support It is easier for an application to support transparent operation and command mode Transmitting RF data to multiple remotes only requires changing the address in the API frame This Easy to manage data process is much faster than in transparent operation where the application must enter AT command transmissions to multiple mode change the address exit command mode and then transmit data destinations Each API transmission can return a transmit status frame indicating the success or reason for failure Received data frames indicate the sender s All received R
119. rate in one PAN Can route data packets to from other nodes Can be a data packet source and destination Mains powered Refer to the XBee router section for more information End device End devices must always interact with their 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 Can be a data packet source and destination All messages are relayed through a coordinator or router Lower power modes ZigBee Protocol PAN Personal Area Network A data communication network that includes a coordinator and one or more routers end devices 2008 Digi International Inc 88 XBee X Bee PRO ZB OEM RF Modules Table A 01 Terms and Definitions Joining Network Address The process of a node becoming part of a ZigBee PAN A node becomes part of a network by joining to a coordinator or a router that has previously joined to the network During the process of joining the node that allowed joining the parent assigns a 16 bit address to the joining node the child The 16 bit address assigned to a node after it has joined to another Operating Channel node The coordinator always has a network address
120. rating Current Receive 40mA 3 3 V boost mode enabled 38mA 3 3 V boost mode disabled 45 mA 3 3 V Idle Current Receiver off 15mA 15mA Power down Current General Operating Frequency Band 1uA 25 C ISM 2 4 GHz 1 uA 25 C ISM 24 GHz Dimensions 0 960 x 1 087 2 438cm x 2 761cm 0 960 x 1 297 2 438cm x 3 294cm Operating Temperature 40 to 85 C industrial 40 to 85 C industrial Antenna Options Networking amp Security Integrated Whip Chip RPSMA or U FL Connector Integrated Whip Chip RPSMA or U FL Connector Supported Network Topologies Point to point Point to multipoint Peer to peer and Mesh Point to point Point to multipoint Peer to peer and Mesh Number of Channels 16 Direct Sequence Channels 13 Direct Sequence Channels Addressing Options Agency Approvals PAN ID and Addresses Cluster IDs and Endpoints optional PAN ID and Addresses Cluster IDs and Endpoints optional United States FCC Part 15 247 FCC ID OUR XBEE2 FCC ID MCQ XBEEPRO2 Industry Canada IC Europe CE IC 4214A XBEE2 ETSI IC 1846A XBEEPRO2 ETSI RoHS Compliant 2008 Digi International Inc Compliant XBee amp X Bee PRO ZB OEM RF Modules Mechanical Drawings Figure 1 01 Mechanical drawings of the XBee XBee PRO ZB OEM RF Modules antenna options not shown XBee XB
121. rding the packet to the next hop the node re encrypts the packet with its own network security parameters source address and frame counter Because of the hop by hop overhead to decrypt authenticate and re encrypt data transmitting data in a secure network has added latency over transmissions in an unsecured network Also due to the additional bytes required to for secure data transmissions the maximum data packet size is reduced when security is enabled APS Link Key The ZigBee APS layer provides end to end security between source and destination devices using a link key that is only known between the two devices APS security encrypts the APS payload which includes the data payload and authenticates the APS header APS security header and the APS payload A 4 byte message integrity code MIC is appended to the end of the APS data After encrypting and authenticating a transmission at the APS layer the packet is passed to the network layer for processing APS security is only encrypted by the source and decrypted by the destination not by each hop 2008 Digi International Inc 22 ZB OEM RF Modules Network Key Updates As mentioned previously network security requires a 32 bit frame counter be maintained by each device This frame counter is incremented after each transmission and cannot wrap to 0 If a neighbor receives a transmission with a frame counter that is less than or equa
122. re used to apply AES encryption to RF packets The network and link keys are write only commands they can be written but not read The coordinator selects a network security key using the KY command If KY is set to 0 default a random network key is chosen Otherwise the network key is set to the KY value Similarly the coordinator must also specify a link key using the LK command If LK 0 default a random link key is selected 2008 Digi International Inc 295 XBee X Bee PRO ZB OEM RF Modules When a device joins a secure network it must obtain the network key from the coordinator The coordinator will either transmit the network key in the clear or it can encrypt the network key using a pre installed link key If the EO option bit is set to transmit the network key unencrypted or if the LK command value is set to 0 on the coordinator select a random link key the coordinator will transmit the network key in the clear unencrypted Otherwise if the EO option bit is not set and LK gt the coordinator will encrypt the network key with the link key and transmit the network key encrypted to any joining devices If a joining device does not have the right preconfigured link key and the network key is being sent encrypted then the joining device will not be able to join the network Network Key Updates As mentioned in chapter 3 network security requires a 32 bit frame counter be maintained by each dev
123. read the maximum hops limit This limit sets the maximum broadcast hops value BH and determines the unicast timeout The timeout is computed as 50 NH 100 ms The default unicast timeout of 1 6 seconds NH 0x1E is enough time for data and the acknowledgment to traverse about 8 hops 0 OxFF 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 0 0x20 Operating PAN ID Read the PAN Personal Area Network ID The OP value reflects the operating PAN ID that the module is running on If ID OxFFFF OP will equal ID Node Discover Timeout Set Read the amount of time a node will spend discovering 0 read only NE other nodes when ND or DN is issued CRE 0x20 OxFF x 100 msec 0x3C 60a Network Discovery options Set Read the options value for the network discovery command The options bitfield value can change the behavior of the ND network discovery command and or change what optional values are returned in any received NO ND responses or API node identification frames Options include CRE 0 0x03 bitfield 0 0x01 Append DD value to ND responses or API node identification frames 002 Local device sends ND response frame when ND is issued Node Discover Discovers and reports all RF modules found The following information is reported for each module discovered MY lt CR gt SH lt CR gt SL l
124. rent channel even if a coordinator is not detected Join Notification Set read the join notification setting If enabled the module will transmit a broadcast node identification packet on power up and when joining This JN action blinks the Associate LED rapidly on all devices that receive the transmission and RE 0 1 1 sends an API frame out the UART of API devices This feature should be disabled for large networks to prevent excessive broadcasts Aggregate Routing Notification Set read time between consecutive aggregate route AR broadcast messages If used AR should be set on only one device to enable many to CR 0 OxFF OxFF one routing to the device Setting AR to 0 only sends one broadcast 2008 Digi International Inc 78 XBee X Bee PRO ZB OEM RF Modules Table 7 03 Networking Commands Association Indication Read information regarding last node join request 0x00 Successful completion Coordinator started or Router End Device found and joined with a parent OxAB Attempted to join a device that did not respond OxAC Secure join error network security key received unsecured OxAD Secure join error network security key not received Al OxAF Secure join error joining device does not have the right preconfigured link key 0x21 Scan found no PANs 0x22 Scan found no valid PANs based on current SC and ID settings 0x23 Valid Coordinator or Routers found but they are
125. responses and module status messages are sent and received from the module using a UART Data Frame Please note that Digi may add new API frames to future versions of firmware so please build into your software interface the ability to filter out additional API frames with unknown API identifiers 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 6 01 UART Data Frame Structure Start Delimiter Length Frame Data Checksum Byte 1 Bytes 2 3 Bytes 4 n Byte n 1 Ox7E MSB LSB API specific Structure 1 Byte MSB Most Significant Byte LSB Least Significant Byte 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 6 02 UART Data Frame Structure with escape control characters Start Delimiter Length Frame Da
126. rnational Inc 16 XBee X Bee PRO ZB OEM RF Modules For modified parameter values to persist in the module s registry after a reset changes must be saved to non volatile memory using the WR Write Command Otherwise parameters are restored to previously saved values after the module is reset Command Response When a command is sent to the module the module will parse and execute the command 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 Applying Command Changes Any changes made to the configuration command registers through AT commands will not take effect until the changes are applied For example sending the BD command to change the baud rate will not change the actual baud rate until changes are applied Changes can be applied in one of the following ways e The AC Apply Changes command is issued AT command mode is exited To Exit AT Command Mode 1 Send the ATCN Exit Command Mode command followed by a carriage return 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 For an example of programming the RF module using AT Commands and descriptions of each config urable parameter refer to the Examples and XBee Command Reference Tables chapters Sleep Mode Sleep modes al
127. smit receive or route data e After joining can allow routers and end devices to join the network e After joining can assist in routing data Cannot sleep should be mains powered A end device has the following characteristics it Must join a ZigBee PAN before it can transmit or receive data e Cannot allow devices to join the network Must always transmit and receive RF data through its parent Cannot route data Can enter low power modes to conserve power and can be battery powered In ZigBee networks the coordinator must select a PAN ID 64 bit and 16 bit and channel to start a network After that it behaves essentially like a router The coordinator and routers can allow other devices to join the network and can route data After an end device joins a router or coordinator it must be able to transmit or receive RF data through that router or coordinator The router or coordinator that allowed an end device to join becomes the parent of the end device Since the end device can sleep the parent must be able to buffer or retain incoming data packets destined for the end device until the end device is able to wake and receive the data 2008 Digi International Inc 18 XBee X Bee PRO ZB OEM RF Modules ZigBee PANs ZigBee networks are formed when a coordinator first selects a channel and PAN ID After the coordinator has started the PAN routers and end devices may join the PAN The PAN ID is selected by the
128. smit Request frame To send a packet to an RF module using its 64 bit Address Transparent Mode 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 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 small table to store some 64 bit addresses and their corresponding 16 bit addresses 64 bit Addressing API To send a packet to an RF module using its 64 bit Address API Mode Use the ZigBee Transmit Request API frame to set 64 bit destination address of the source node to match the 64 bit Address SH Serial Number High and SL Serial Number Low parameters of the destination node e If the 16 bit address of the destination node is not known set 16 bit destination network address to OxFFFE To send an API transmission to a Coordinator using its 16 bit network address e Set the 64 bit Destination Address field to all O s API
129. sponse Active Endpoint Request Requests a list of endpoints on a specified device Active Endpoint Response LAI Request Sent by a remote device in response to a LOI Request Requests a device leave the network LAI Response Leave Request Leave Response x0034 Instructs a remote device to allow or disallow joining for a Sent by a remote device in response to a Permit Joining Permit Joining Request 8 lg le lg lf le Is o c o co j oc co o jo e o o o o o o o e If wiw joo oO o o o amp ole e jo je o e Permit Joining Response To receive API ZDO response frames the AO command must be set to enable the Explicit Rx API frame 0x91 All ZDO command responses are received on endpoint 0 and profile ID 0x0000 multi byte values in the API ZDO responses are sent in little endian byte order All Example Send an LQI Request using the explicit API frame to obtain the neighbor table from a remote 64 bit address 0x0013A200 404A210C For the ZDO LQI response to be received AO must be set to enable the Explicit Rx Indicator API frame See the command table for details Send the API frame Ox7E 00 16 11 01 00 13 A2 00 40 4A 21 OC FF FE 00 00 00 31 00 00 00 00 32 00 21 where 0x0016 API fame length Ox11 Explicit API transmit frame 0x01 Frame ID arbitrarily chosen value 0x0013A200 404A210C 64 bit destination address
130. ssions to all of the above device addressing destinations e specific endpoints on a destination device e specific cluster IDs on a destination device Device Addressing All XBee modules can be identified by their unique 64 bit addresses or a user configurable ASCII string identifier The 64 bit address of a module can be 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 Note The Ember stack only delivers broadcast transmissions to end devices if the stack profile is set to 2 See the ZS command This will be fixed in a future stack version 64 Bit Addressing Transparent To address a node by its 64 bit address the destination 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 2008 Digi International Inc 36 XBee X Bee PRO ZB OEM RF Modules address In the API firmware the destination 64 bit address is set in the ZigBee Tran
131. t 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 20 Byte printable ASCII string ASCII space character 0x20 Device Type Identifier Stores a device type value This value can be used to differentiate multiple XBee based products 0 OxFFFFFFFF read only 0x30000 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 OxE8 Data endpoint is the Digi data endpoint 0 OxFF OxE8 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 OxE8 is the Digi data endpoint 2008 Digi International Inc XBee X Bee PRO ZB OEM RF Modules Table 7 02 Addressing Commands Cluster Identifier Set read Zigbee app
132. t CR gt NI lt CR gt Variable length PARENT_NETWORK ADDRESS 2 Bytes lt CR gt DEVICE_TYPE lt CR gt 1 Byte 0 Coord 1 Router 2 End Device STATUS lt CR gt 1 Byte Reserved tional 20 Byt ND PROFILE_ID lt CR gt 2 Bytes CRE gpuona 2 ayie MANUFACTURER ID CR 2 Bytes CR 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 The radius of the ND command is set by the BH command NI or MY value 2008 Digi International Inc 77 X Bee X Bee PRO ZB OEM RF Modules Table 7 03 Networking Commands Destination Node Resolves an NI Node Identifier string to a physical address case sensitive The following events occur after the destination node is discovered lt AT Firmware gt 1 DL amp DH are set to the extended 64 bit address of the module with the matching NI Node Identifier string 2 OK or ERROR r is returned 3 Command Mode is exited to allow immediate communication API Firmware 1 The 16 bit network and 64 bit extended addresses are returned in an API Command Response frame
133. ta Checksum Byte 1 Bytes 2 3 Bytes 4 n Byte n 1 Ox7E MSB LSB API specific Structure 1 Byte Characters Escaped If Needed MSB Most Significant Byte LSB Least Significant Byte 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 Ox7D and follow it with the byte to be escaped XOR d with 0x20 2008 Digi International Inc 61 XBee X Bee PRO ZB OEM RF Modules Data bytes that need to be escaped Ox7E Frame Delimiter 0 7 Escape e 0x11 XON 0x13 XOFF Example Raw UART Data Frame before escaping interfering bytes Ox7E 0x00 0x02 0x23 0x11 OxCB Ox11 needs to be escaped which results in the following frame Ox7E 0x00 0x02 0x23 0 7 0x31 OxCB 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 OxFF 0x23 0x11 OxFF 0x34 OxCB Length The length field has two byte value that specifies the number of bytes that will be contained in the frame data field It does not include the checksum field Frame Data Frame data of the UART data frame forms an API specific structure as follows Figure 6 03 UART Data Frame amp API specific Structure
134. the NI Node Identifier string of the destina tion node as the parameter To send a packet to an RF module using its NI string API Mode Issue the DN command as stated above using the AT Command API frame 2008 Digi International Inc 3 N XBee X Bee PRO ZB OEM RF Modules 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 Note that issuing DN sends a broadcast transmission into the network This addressing method should be used sparingly 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 Set the Destination Address of the transmitting module as shown below AT Firmware DL Destination Low Address 0 DH Destination High Address 0 API Firmware Set the 64 bit destination address field in the API transmit frame t
135. the other modes of operation under the following conditions Transmit Mode Serial data in the serial receive buffer is ready to be packetized e Receive Mode Valid RF data is received through the antenna Sleep Mode End Devices only Command Mode Command Mode Sequence is issued 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 destination 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 2 04 Transmit Mode Sequence Successful Idle Mode New Transmission Transmission 16 bit Network Address Known Transmit Data 16 bit Network Address Discovery Route Discovery 16 bit Network Address Discovered Route Discovered Data Discarded 2008 Digi International Inc 15 XBe
136. thout specifying the coordinator s 64 bit address The API transmit request frame should look like Ox7E 0 00 0 16 0 10 0 01 OxOO OxOO 0 00 0 00 0 00 0 00 0 00 Ox00 OxFF OxFE 0x00 0 00 0 54 0x78 032 0 43 Ox6F Ox6F 0x72 0 64 OxFC Where 0x16 length 22 bytes excluding checksum 0x10 ZigBee Transmit Request API frame type 0x01 Frame ID set to non zero value 0x0000000000000000 Coordinator s address can be replaced with coordinator s actual 64 bit address if known OxFFFE 16 bit Destination Address 2008 Digi International Inc 63 XBee X Bee PRO ZB OEM RF Modules 0x00 Broadcast radius 0x00 Options 0x547832436F6F7264 Data payload Tx2Coord OxFC Checksum Example Send an ND command to discover the devices in the PAN The frame should look like Ox7E 0x00 0x04 0x08 0x01 Ox4E 0x44 0x64 Where 0x0004 length 0x08 AT Command API frame type 0x01 Frame ID set to non zero value Ox4E44 AT command ND 0x64 Checksum The checksum is calculated as OxFF 0x08 0x01 Ox4E 0x44 Example Send a remote command to the coordinator to set AD1 DIO1 as a digital input D1 3 and apply changes to force the IO update The API remote command frame should look like Ox7E 0x00 0x10 0x17 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 OxFF OxFE 0x02 0x44 0x31 0x03 0x70 Where 0x10 length 16 bytes excluding checksum 0x17 Remote Command API frame type 0x01 Frame ID 0x00000000000000
137. tup on 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 OxFFFF Sample Scan Duration times 13 channel scan If SD 0 time 0 200 sec SD 2 time 0 799 sec SD 4 time 3 190 sec SD 6 time 12 780 sec 0 7 exponent ZigBee Stack Profile Set read the ZigBee stack profile value This must be set the same on all devices that should join the same network Node Join Time Set Read the time that a Coordinator Router allows nodes to join NJ This value can be changed at run time without requiring a Coordinator or Router to CR 0 OxFF OxFF restart The time starts once the Coordinator or Router has started The timer is reset x 1 sec always allows joining on power cycle or when NJ changes Channel Verification Set Read the channel verification parameter If JV 1 and the E iF aati network is an open network NJ OxFF a router will verify the coordinator is on its nel vertfication JV operating channel when joining or coming up from a power cycle If a coordinator is not R 1 Channel verification 0 detected the router will leave its current channel and attempt to join a new PAN If enabled JV 0 the router will continue operating on its cur
138. turns a 2 byte value indicating the A D measurement of that input Analog samples are ordered sequentially from ADO DIOO to AD3 DIO3 to the supply voltage OIN A N A N A CD DIO PWM DI RSSIDI N A N A RCM UN CTS DI RTS DI ASSOC DIO4 AD3 DI ADZ DI ADU DI ADO DI 07 O6 DIOS 03 02 Ol 00 Supply N A N A N A AD3 Voltage 2008 Digi International Inc 73 XBee X Bee PRO ZB OEM RF Modules XBee Sensor Read Indicator API Identifier Value 0x94 When the module receives a sensor sample it is sent out the UART using this message type when AO 0 Figure 6 18 XBee Sensor Read Indicator 0x94 64 bit Address bytes 5 12 Receive Options yte 15 AUD Read Values Pytes 17 24 0 01 Packet Acknowledged indicates 32 byte value for each indicates the 64 bit address cf the remote module that 0502 Packet was a broadcast of 4 A D sensors A 8 C D transmitted the Watchport sensor sample packet Set to xXFFFFFFFFFFFFFFFF no A Ds found 16425 Network Address cf Watchpor sensors that were read Indicates the 16 network address of the remote Values include Indicates the 2 byte value read from a digital cere inclusis Watchport sensor sample O01 AD Sensor read thermometer if present Set to Ox FFF not found Mr 0x02 Temperature Sensor read 0x60 Water present module CD pin low 2008 Digi International Inc
139. uirements Systems that contain XBee XBee PRO ZB RF Modules inherit Digi Certifications FC ISM Industrial Scientific amp Medical 2 4 GHz frequency band Manufactured under ISO 9001 2000 registered standards C XBee XBee PRO ZB RF Modules are optimized for use in US Canada Australia Israel and Europe contact MaxStream for complete list of agency approvals Specifications Table 1 01 Specifications of the XBee XBee PRO ZB OEM RF Module Performance Indoor Urban Range up to 133 ft 40 m up to 300 ft 100 m Outdoor RF line of sight Range up to 400 ft 120 m up to 1 mile 1 6 km 2mW 3dBm boost mode enabled 50mW 17 dBm Transmit Powe Output 1 25mW 1dBm boost mode disabled 10mW 10 dBm for International variant RF Data Rate 250 000 bps 250 000 bps Serial Interface Data Rate 1200 230400 bps 1200 230400 bps software selectable non standard baud rates also supported non standard baud rates also supported 96 dBm boost mode enabled 95 dBm boost mode disabled 102 dBm Receiver Sensitivity Power Requirements 2008 Digi International Inc 5 XBee XBee PRO ZB OEM RF Modules Table 1 01 Supply Voltage Specifications of the XBee XBee PRO ZB OEM RF Module 2 1 3 6 V 3 0 3 4 V Operating Current Transmit max output power 40mA 3 3 V boost mode enabled 35mA 3 3 V boost mode disabled 295mA 3 3 V Ope
140. wn in the figure below To convert the A D reading to mV do the following AD mV A D reading 1200mV 1024 TThe reading in the sample frame represents voltage inputs of 1143 75 and 342 1875mV for ADO and AD1 respectively Queried Sampling The IS command can be sent to a device locally or to a remote device using the API remote command frame see Chapter 8 for details When the IS command is sent the receiving device 2008 Digi International Inc 50 ZB OEM RF Modules samples all enabled digital IO and analog input channels and returns an IO sample If IS is sent locally the IO sample is sent out the uart If the IS command was received as a remote command the IO sample is sent over the air to the device that sent the IS command If the IS command is issued in AT firmware the module returns a carriage return delimited list containing the above listed fields The API firmware returns an AT command response packet with the IO data included in the command data portion of the response frame The following table shows an example of the fields in an IS reponse Table 4 010 0x01 1 sample set 0 0 0 Digital Inputs DIO 2 3 10 11 low 0x03 Analog Inputs A D 0 1 0x0408 Digital input states DIO 3 10 high DIO 2 11 low 0x03D0 Analog input ADIO 07 0x3D0 0x0124 Analog input ADIO 170x120 Periodic IO Sampling Periodic sampling allows an XBee
141. y policy to the network when it forms a network Enabling security in a network adds an authentication step to the joining process For example after a router joins a network it must then obtain the network security key to become authenticated If the device cannot obtain the network security key authentication fails and the device leaves the network since it cannot communicate with anyone on the network The coordinator must decide the following Whether or not to use a single trust center How the security keys network and link keys should be managed Using a Trust Center A trust center is a single device that is responsible for determining who may join the network If a trust center is enabled the trust center must approve of each router or end device join that occurs on the network If a router allows a new device to join the network the router sends a notification to the trust center that a join has occurred The trust center instructs the router to either authenticate the newly joined device or to force the device to leave A trust center is required for some public ZigBee profiles To use a trust center in a ZigBee network the coordinator should set the use trust center bit correctly in the EO command before starting a network Note In the ZB firmware only the coordinator can serve as the trust center Managing Security Keys XBee defines a network key and a link key trust center link key Both keys are 128 bits and a

Download Pdf Manuals

image

Related Search

Related Contents

RUBAN AUTO-FUSIONNANT POUR LA REPARATION, L  Samsung Galaxy Note pro (12.2, LTE) Korisničko uputstvo(Lollipop)  eMedNY Subsystem User Manual  Bulletin technique - Bayer Environmental Science  Samsung LED-монітор S23B350N Керівництво користувача  Agilent 1200 Series Vacuum Degasser  Bedienungsanleitung  Consultez notre Catalogue  Manuel du Superviseur Final  CONSUMER CREDIT REPORT USER GUIDE  

Copyright © All rights reserved.
Failed to retrieve file