Digi International Inc.
11001 Bren Road East
Minnetonka, MN 55343
877 912-3444 or 952 912-3444
http://www.digi.com
XBee®/XBee-PRO® ZB SMT RF Modules
ZigBee RF Modules by Digi International
Models: XBEE S2C, PRO S2C
Hardware: S2C
Firmware: 401x
90002002_A
8/19/2010
XBee®/XBee‐PRO®SMTZBRFModules
©2010DigiInternational,Inc. 2
© 2010 Digi International, Inc. All rights reserved
Nopartofthecontentsofthismanualmaybetransmittedorreproducedinany
formorbyanymeanswithoutthewrittenpermissionofDigiInternational,Inc.
ZigBee
®isaregisteredtrademarkoftheZigBeeAlliance.
XBee®andXBee‐PRO®areregisteredtrademarksofDigiInternational,Inc.
Technical Support: Phone: (866) 765-9885 toll-free U.S.A. & Canada
(801) 765-9885 Worldwide
8:00 am - 5:00 pm [U.S. Mountain Time]
Live Chat: www.digi.com
Online Support: http://www.digi.com/support/eservice/login.jsp
Email: rf-experts@digi.com
Contents
XBee®/XBee‐PRO®SMTZBRFModules
©2010DigiInternaitonal,Inc. 3
Overview 6
Worldwide Acceptance 6
What’s New in 401x Firmware 6
Specifications 7
Serial Communications Specifications 8
UART 8
SPI 8
GPIO Specifications 8
Hardware Specs for Programmable Variant 9
Mechanical Drawings 10
Pin Signals 11
EM357 Pin Mappings 12
Design Notes 12
Power Supply Design 12
Recommended Pin Connections 12
Board Layout 13
Module Operation for Programmable Variant 16
XBee Programmable Bootloader 18
Overview 18
Bootloader Software Specifics 18
Bootloader Menu Commands 22
Firmware Updates 23
Output File Configuration 23
RF Module Operation 25
Serial Communications 25
UART Data Flow 25
SPI Communications 25
Serial Buffers 26
UART Flow Control 27
Serial Interface Protocols 28
Modes of Operation 30
Idle Mode 30
Transmit Mode 30
Receive Mode 31
Command Mode 31
Sleep Mode 32
XBee ZigBee Networks 33
Introduction to ZigBee 33
ZigBee Stack Layers 33
Networking Concepts 33
Device Types 33
PAN ID 35
Operating Channel 35
ZigBee Application Layers: In Depth 35
Application Support Sublayer (APS) 35
Application Profiles 35
Coordinator Operation 37
Forming a Network 37
Channel Selection 37
PAN ID Selection 37
Security Policy 37
Persistent Data 37
XBee ZB Coordinator Startup 37
Permit Joining 38
Resetting the Coordinator 38
Leaving a Network 39
Replacing a Coordinator (Security Disabled Only) 39
Example: Starting a Coordinator 40
Example: Replacing a Coordinator (Security Disabled) 40
Router Operation 40
Discovering ZigBee Networks 40
Joining a Network 41
Authentication 41
Persistent Data 41
XBee ZB Router Joining 41
Permit Joining 42
Joining Always Enabled 42
Joining Temporarily Enabled 42
Router Network Connectivity 42
Leaving a Network 43
Resetting the Router 44
Example: Joining a Network 44
End Device Operation 44
Discovering ZigBee Networks 44
Joining a Network 45
Parent Child Relationship 45
End Device Capacity 45
Authentication 45
Persistent Data 45
Orphan Scans 46
XBee ZB End Device Joining 46
Parent Connectivity 47
Resetting the End Device 47
Leaving a Network 47
Example: Joining a Network 47
Channel Scanning 48
Managing Multiple ZigBee Networks 48
Contents
XBee®/XBee‐PRO®SMTZBRFModules
©2010DigiInternaitonal,Inc. 4
PAN ID Filtering 48
Preconfigured Security Keys 48
Permit Joining 48
Application Messaging 48
Transmission, Addressing, and Routing 49
Addressing 49
64-bit Device Addresses 49
16-bit Device Addresses 49
Application Layer Addressing 49
Data Transmission 49
Broadcast Transmissions 50
Unicast Transmissions 50
Data Transmission Examples 52
RF Packet Routing 53
Link Status Transmission 54
AODV Mesh Routing 55
Many-to-One Routing 57
Source Routing 57
Encrypted Transmissions 60
Maximum RF Payload Size 60
Throughput 61
ZDO Transmissions 61
ZigBee Device Objects (ZDO) 62
Sending a ZDO Command 62
Receiving ZDO Commands and Responses 62
Transmission Timeouts 64
Unicast Timeout 64
Extended Timeout 64
Transmission Examples 65
Security 67
Security Modes 67
ZigBee Security Model 67
Network Layer Security 67
Frame Counter 68
Message Integrity Code 68
Network Layer Encryption and Decryption 68
Network Key Updates 68
APS Layer Security 68
Message integrity Code 69
APS Link Keys 69
APS Layer Encryption and Decryption 69
Network and APS Layer Encryption 69
Trust Center 70
Forming and Joining a Secure Network 70
Implementing Security on the XBee 70
Enabling Security 71
Setting the Network Security Key 71
Setting the APS Trust Center Link Key 71
Enabling APS Encryption 71
Using a Trust Center 71
XBee Security Examples 72
Example 1: Forming a network with security (pre-con-
figured link keys) 72
Example 2: Forming a network with security (obtain-
ing keys during joining) 72
Network Commissioning and Diagnostics 74
Device Configuration 74
Device Placement 74
Link Testing 74
RSSI Indicators 75
Device Discovery 75
Network Discovery 75
ZDO Discovery 75
Joining Announce 75
Commissioning Pushbutton and Associate LED 75
Commissioning Pushbutton 76
Associate LED 77
Managing End Devices 79
End Device Operation 79
Parent Operation 79
End Device Poll Timeouts 80
Packet Buffer Usage 80
Non-Parent Device Operation 80
XBee End Device Configuration 81
Pin Sleep 81
Cyclic Sleep 83
Transmitting RF Data 86
Receiving RF Data 86
I/O Sampling 87
Waking End Devices with the Commissioning Pushbut-
ton 87
Parent Verification 87
Rejoining 87
XBee Router/Coordinator Configuration 87
RF Packet Buffering Timeout 88
Child Poll Timeout 88
Transmission Timeout 88
Contents
XBee®/XBee‐PRO®SMTZBRFModules
©2010DigiInternaitonal,Inc. 5
Putting It All Together 89
Short Sleep Periods 89
Extended Sleep Periods 89
Sleep Examples 89
XBee Analog and Digital I/O Lines 91
I/O Configuration 91
I/O Sampling 92
Queried Sampling 94
Periodic I/O Sampling 94
Change Detection Sampling 94
RSSI PWM 94
I/O Examples 95
PWM1 95
API Operation 96
API Frame Specifications 96
API Examples 98
API Serial Port Exchanges 99
AT Commands 99
Transmitting and Receiving RF Data 99
Remote AT Commands 99
Source Routing 100
Supporting the API 100
API Frames 100
AT Command 100
AT Command - Queue Parameter Value 101
ZigBee Transmit Request 101
Explicit Addressing ZigBee Command Frame 103
Remote AT Command Request 105
Create Source Route 106
AT Command Response 107
Modem Status 107
ZigBee Transmit Status 108
ZigBee Receive Packet 109
ZigBee Explicit Rx Indicator 110
ZigBee IO Data Sample Rx Indicator 111
XBee Sensor Read Indicator 112
Node Identification Indicator 114
Remote Command Response 115
Over-the-Air Firmware Update Status 116
Route Record Indicator 117
Many-to-One Route Request Indicator 118
Sending ZigBee Device Objects (ZDO) Commands
with the API 119
Sending ZigBee Cluster Library (ZCL) Commands
with the API 121
Sending Public Profile Commands with the API 123
XBee Command Reference Tables 126
Module Support 137
X-CTU Configuration Tool 137
Customizing XBee ZB Firmware 137
Design Considerations for Digi Drop-In Networking
137
XBee Bootloader 137
Programming XBee Modules 138
Serial Firmware Updates 138
Invoke XBee Bootloader 138
Send Firmware Image 138
Writing Custom Firmware 138
Regulatory Compliance 138
Enabling GPIO 1 and 2 139
Detecting XBee vs. XBee-PRO 139
Special Instructions For Using the JTAG Interface 139
Appendix A: Agency Certifications 141
Appendix B:Migrating from XBee ZB to XBee ZB SMT
147
Appendix C:Manufacturing Information 150
Appendix D:Warranty Information 153
Appendix E:Definitions 154