XBee / XBee-PRO ZigBee RF Modules

Transcription

XBee / XBee-PROZigBee RF ModulesXBEE2, XBEEPRO2, PRO S2BUser Guide

XBee/XBee-PRO ZigBee RF Modules User Guide(Part number 90000976 W)Revision DateDescriptionAApril 2008Baseline release of the document.BJuly 2008Correcting info from 2x20 to 2x21.CMarch 2009zx4x firmware updates. Modified API tables.DAugust 2009Firmware change (2x41 to 2x64).EApril 2010Incorporated S2B module release.FMay 2010Included new S2B variant.GNovember 2010Added the PO command. Added the ZigBee receive packet description.HSeptember 2011 Changed the 32KB programmable bootloader baud rate from 9600 to 115200.IN/ARevision I is not used.JJanuary 2012Added embedded PCB antenna information.KMarch 2012Revised minor errors.LSeptember 2012 Added API frames 0xa2, 0xa4, and 0x24. Modified the Receive Options API.MOctober 2012Removed delivery status option 0x75 from the description section.NApril 2013Corrected typos.ON/ARevision O is not used.PMay 2013Corrected information.QN/ARevision Q is not used.ROctober 2013Editorial updates.SApril 2014Specified the maximum payload for broadcasts. Changed the default value forthe WH AT command to 0.TJuly 2014Updated the AR command description. Added the Disabling MTO Routingsubsection. Added the CR and TO commands. Added the Brazil (Anatel)subsection under the Approved Antennas. Updated the Escape characterssection.UOctober 2014Added the AS command under the Execution commands table.VNovember 2014Updated the description of AS command.WMarch 2015Eliminated the “About this manual” section. Updated the warranty information.Updated the power output restrictions.DisclaimersInformation in this document is subject to change without notice and does not represent a commitment onthe part of Digi International. Digi provides this document “as is,” without warranty of any kind, expressedor implied, including, but not limited to, the implied warranties of fitness or merchantability for a particularpurpose. Digi may make improvements and/or changes in this manual or in the product(s) and/or theprogram(s) described in this manual at any time.

Trademarks and copyrightDigi, Digi International, and the Digi logo are trademarks or registered trademarks in the United States andother countries worldwide. All other trademarks mentioned in this document are the property of theirrespective owners. 2015 Digi International. All rights reserved.WarrantyView the product’s warranty online: http://www.digi.com/howtobuy/termsCustomer supportTelephone (8:00 am — 5:00 pm CST):US & Canada: 877.912.3444Worldwide: 1 952.912.3456Online: www.digi.com/support/eserviceMail:Digi International11001 Bren Road EastMinnetonka, MN 55343USApplicabilityHardware: S2 and S2BFirmware versions:- 20xx - Coordinator - AT/Transparent Operation- 21xx - Coordinator - API Operation- 22xx - Router - AT/Transparent Operation- 23xx - Router - API Operation- 28xx - End Device - AT/Transparent Operation- 29xx - End Device - API OperationXBee/XBee-PRO ZigBee RF Modules User Guide3

ContentsOverview of the XBee/XBee-PRO ZBWhat's new in 2x7x 10Firmware 10The difference between XBee and ZigBee 11Key features of the XBee/XBee-PRO ZB RF Module 12Worldwide acceptance 13Specifications of the XBee/XBee-PRO ZB RF Module 13Hardware specifications for programmable XBee/XBee-PRO ZB variant 15Mechanical drawings for the XBee/XBee-PRO ZB RF Module 16SIF header interface for the XBee/XBee-PRO ZB RF Module 17Mounting considerations for the XBee/XBee-PRO ZB RF Module 17Pin signals for the XBee/XBee-PRO ZB RF Module 18EM250 pin mappings 19Design notes for the XBee/XBee-PRO ZB RF Module 20Power supply design for the XBee/XBee-PRO ZB RF Module 20Recommended pin connections for the XBee/XBee-PRO ZB RF Module 20Board layout for the XBee/XBee-PRO ZB RF Module 21Electrical characteristics of the XBee/XBee-PRO ZB RF Module 23Module operation for Programmable variant 23XBee programmable bootloader 26Overview 26Bootloader software specifics 26Bootloader menu commands for the XBee/XBee-PRO ZB RF Module 29Bypass Mode - B 29Update Firmware - F 29Adjust Timeout for Update Firmware - T 29Application Version String - A 29Bootloader Version String - V 29Firmware updates to the XBee/XBee-PRO ZB RF Modules 30Wired updates 30Over-the-air (OTA) updates 30Output file configuration 31XBee ZB RF Module operationSerial communications for the XBee/XBee-PRO ZB RF Module 32UART data flow 32Serial buffers 33Serial flow control 34Serial interface protocols 34Comparing Transparent and API operation 36XBee/XBee-PRO ZB RF Module modes of operation 37Idle Mode 37Transmit Mode 37Receive Mode 38Command Mode 38Sleep Mode 39XBee/XBee-PRO ZigBee RF Modules User Guide4

XBee ZigBee networksIntroduction to ZigBee 40ZigBee stack layers 40Networking concepts 41Device types 41Node types / sample of a basic ZigBee network topology 41PAN ID 42Operating channel 43ZigBee application layers: in depth 43Application Support Sublayer (APS) 43Application profiles 43Coordinator operation 45Forming a network 45Channel selection 45PAN ID selection 45Security policy 46Persistent data 46XBee ZB Coordinator startup 46Permit joining 47Resetting the Coordinator 47Leaving a network 47Replacing a Coordinator (security disabled only) 48Example: starting a Coordinator 49Example: replacing a Coordinator (security disabled) 49Router operation for the XBee/XBee-PRO ZB RF Module 49Discovering ZigBee networks 49Joining a network 50Authentication 50Persistent data 50XBee ZB router joining 50Permit joining 51Joining always enabled 51Joining temporarily enabled 52Router network connectivity 52Leaving a network 53Resetting the router 54Example: joining a network 54End Device operation 54Discovering ZigBee networks 54Joining a network 55Parent child relationship 55End Device capacity 55Authentication 55Persistent data 56Orphan scans 56XBee ZB End Device joining 56Parent connectivity 57Resetting the End Device 57Leaving a network 57Example: joining a network 58Channel scanning for the XBee/XBee-PRO ZB RF Module 58Managing multiple ZigBee networks 59PAN ID filtering 59XBee/XBee-PRO ZigBee RF Modules User Guide5

Preconfigured security keysPermit joining 59Application messaging 5959XBee ZB transmission, addressing, and routingAddressing 6064-bit device addresses 6016-bit device addresses 60Application layer addressing 60Data transmission 61Broadcast transmissions 61Unicast transmissions 62Data transmission examples 64RF packet routing for the XBee/XBee-PRO ZB RF Module 65Link status transmission 66AODV mesh routing 67Many-to-one routing 69Source routing 69Encrypted transmissions for the XBee/XBee-PRO ZB RF modemMaximum RF Payload Size XBee/XBee-PRO ZB RF modem 73Throughput 74ZDO transmissions 74ZDO 74Sending a ZDO command 75Receiving ZDO commands and responses 75Transmission timeouts 77Unicast timeout 77Extended timeout 78Transmission examples 7873XBee/XBee-PRO ZB securitySecurity modes 81ZigBee security model 81Network layer security 81Frame counter 82Message integrity code 82Network layer encryption and decryption 82Network key updates 83APS layer security 83Message integrity code 83APS link deys 83APS layer encryption and decryption 83Network and APS layer encryption 84Trust center 84Forming and joining a secure network 84Implementing security on the XBee 84Enabling security 85Setting the network security key 85Setting the APS trust center link key 85Enabling APS encryption 85Using a trust center 86XBee security examples 86XBee/XBee-PRO ZigBee RF Modules User Guide6

Example 1: forming a network with security (pre-configured link keys) 86Example 2: forming a network with security (obtaining keys during joining)87Network commissioning and diagnosticsDevice configuration 88Device placement 88Link testing 88RSSI indicators 89Device discovery 89Network discovery 89ZDO discovery 90Joining announce 90Commissioning pushbutton and associate LED 90Commissioning pushbutton 91Associate LED 91Managing End DevicesEnd Device operation 94Parent operation 95End Device poll timeouts 95Packet buffer usage 96Non-parent device operation 96XBee End Device configuration 96Pin sleep 97Cyclic sleep 98Transmitting RF data 101Receiving RF data 102IO sampling 102Waking End Devices with the Commissioning PushbuttonParent verification 102Rejoining 102XBee ZB Router/Coordinator configuration 103RF packet buffering timeout 103Child poll timeout 103Transmission timeout 104Putting It all together 104Short sleep periods 104Extended sleep periods 104Sleep examples 104Example 1 105Example 2 105Example 3 105102XBee analog and digital IO linesIO configuration 107IO sampling 108Queried sampling 109Periodic IO sampling 110Change detection samplingRSSI PWM 110IO examples 111XBee/XBee-PRO ZigBee RF Modules User Guide1107

API operationAPI frame specifications 112API examples 115API UART exchanges 116AT commands 116Transmitting and receiving RF data 116Remote AT commands 116Source routing 117Supporting the API 117API frames 118AT command 118AT command - Queue Parameter Value 119ZigBee Transmit Request 119Explicit Addressing ZigBee Command frame 122Remote AT Command Request 124Create Source Route 126AT Command Response 127Modem Status 128ZigBee Transmit Status 129ZigBee Receive Packet 130ZigBee Explicit Rx Indicator 131ZigBee IO Data Sample Rx Indicator 132XBee Sensor Read Indicator 134Node Identification Indicator 136Remote Command Response 138Over-the-Air Firmware Update Status 138Route Record Indicator 141Many-to-One Route Request Indicator 142Sending ZigBee Device Objects (ZDO) commands with the API 142Sending ZigBee Cluster Library (ZCL) commands with the API 145Sending public profile commands with the API 149Device Authenticated Indicator 153Register Joining Device Status 154Register Joining Device 155XBee command reference tablesAddressing commands 156Networking commands 159Security commands 164RF interfacing commands 165Serial interfacing (I/O) commandsI/O commands 168Diagnostics commands 171AT command options 173Sleep commands 173Execution commands 175166Module supportPower up the module at 9600 baud 178XCTU 178Customizing XBee ZB firmware 178Design considerations for Digi drop-in networkingXBee/XBee-PRO ZigBee RF Modules User Guide1798

XBee bootloader 179Programming XBee modules 179Serial firmware updates 180Invoke XBee bootloader 180Send the firmware image 180SIF firmware updates 181Writing custom firmware 181Regulatory compliance 181Enabling GPIO 1 and 2 182Detecting XBee versus XBee-PRO 182Ensuring optimal output power 182Improving low power current consumption 183XBee (non-PRO) initialization: 183When sleeping (end devices): 183When waking from sleep (end devices): 184DefinitionsAgency certificationsUnited States FCC 187OEM labeling requirements 187FCC notices 188FCC-approved antennas (2.4 GHz) 188RF exposure 193Europe (ETSI) 194OEM labeling requirements 194Restrictions 194Declarations of conformity 195Important note 195Approved antennas 195XBee RF Module 195XBee-PRO (S2) RF Module 195XBee-PRO (S2B) RF Module 195Canada (IC) 195Labeling requirements 196Transmitters for detachable antennasDetachable antenna 196Australia (C-Tick) 196Brazil (Anatel) 197196Migrating from ZNet 2.5 to XBee ZBCommand set 198New features 198XBee/XBee-PRO ZigBee RF Modules User Guide9

Overview of the XBee/XBee-PRO ZBThis manual describes the operation of the XBee/XBee-PRO ZB RF module, which consists of ZigBeefirmware loaded onto XBee S2 and S2B hardware, models: XBEE2, XBEEPRO2 and PRO S2B. The XBee/XBee-PRO ZB RF Modules are designed to operate within the ZigBee protocol and support the uniqueneeds of low-cost, low-power wireless sensor networks. The modules require minimal power andprovide reliable delivery of data between remote devices.The modules operate within the ISM 2.4 GHz frequency band and are compatible with the following: XBee RS-232 Adapter XBee RS-485 Adapter XBee Analog I/O Adapter XBee Digital I/O Adapter XBee Sensor XBee USB Adapter XStick ConnectPort X Gateways XBee Wall Router.The XBee/XBee-PRO ZB firmware release can be installed on XBee ZNet or ZB modules. The XBee ZBfirmware is based on the EmberZNet 3.x ZigBee PRO Feature Set mesh networking stack, while theXBee ZNet 2.5 firmware is based on Ember's proprietary “designed for ZigBee” mesh stack(EmberZNet 2.5.x). ZB and ZNet 2.5 firmware are similar in nature, but not over-the-air compatible.Devices running ZNet 2.5 firmware cannot communicate with devices running the ZB firmware.What's new in 2x7xFirmwareXBee/XBee-PRO ZB firmware includes the following new features (compared with 2x6x): Using Ember stack version 3.4.1. Support for the PRO S2B with temperature compensation and an over-voltage check. Within 15seconds of the supply voltage exceeding 3.9V, the API will emit a 0x08 modem status (Overvoltage) message, and then the AT/API versions will do a watchdog reset.XBee/XBee-PRO ZigBee RF Modules User Guide10

What's new in 2x7x ZDO pass-through added. If AO 3, then ZDO requests which are not supported by the stack will bepassed out the UART. An attempt to send an oversized packet (256 bytes) will result in a Tx Status message with astatus code of 0x74. End devices have two speed polling. 7.5 seconds is the slow rate, which switches to the fast rate totransact with its parent. When transactions are done, it switches back to the slow rate. A new receive option bit (0x40) indicates if the packet came from an end device. Added extended timeout option since end devices need more time than routers to ack theirpackets. An option bit (0x01) was added to disable APS retries. If an end device has not had its polls answered for 5 seconds, it will leave and attempt to rejoin thenetwork. XBee S2B has a new TP command which returns the temperature compensation sensor reading inunits of Celsius degrees. The PP command returns the power dBm setting when PL4 is selected. The PO command sets the slow polling rate on end devices. Range is 1-0x1770 in units of 10 msec(10 msec to 60 sec). Default is 0 which invokes a 100 msec delay. Rejoini

This manual describes the operation of the XBee/XBee-PRO ZB RF module, which consists of ZigBee firmware loaded onto XBee S2 and S2B hardware , models: XBEE2, XBEEPRO2 and PRO S2B. The XBee/ XBee-PRO ZB 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