Digi XBee Zigbee Mesh Kit User manual

XBee® Zigbee® Mesh Kit
Radio Frequency (RF) Module
User Guide

Revision history—90001942-13
Revision Date Description
B January
2016
Updated the documentation to include support for S2C SMT module.
C June
2016
Updated the document with new Digi branding.
D August
2017
Added information clarifying that the S2D module is international. Added a
graphic of the Worldwide kit and delineated the difference in the Kit Contents
table.
E February
2018
Added information for XBee3 product line and a few minor edits.
Trademarks and copyright
Digi, Digi International, and the Digi logo are trademarks or registered trademarks in the United
States and other countries worldwide. All other trademarks mentioned in this document are the
property of their respective owners.
© 2019 Digi International Inc. All rights reserved.
Disclaimers
Information in this document is subject to change without notice and does not represent a
commitment on the part of Digi International. Digi provides this document “as is,” without warranty of
any kind, expressed or implied, including, but not limited to, the implied warranties of fitness or
merchantability for a particular purpose. Digi may make improvements and/or changes in this manual
or in the product(s) and/or the program(s) described in this manual at any time.
Warranty
To view product warranty information, go to the following website:
www.digi.com/howtobuy/terms
Customer support
Gather support information: Before contacting Digi technical support for help, gather the following
information:
Product name and model
Product serial number (s)
Firmware version
Operating system/browser (if applicable)
Logs (from time of reported issue)
Trace (if possible)
Description of issue
Steps to reproduce
XBee® Zigbee® Mesh Kit 2

Contact Digi technical support: Digi offers multiple technical support plans and service packages.
Contact us at +1 952.912.3444 or visit us at www.digi.com/support.
Feedback
To provide feedback on this document, email your comments to
techcomm@digi.com
Include the document title and part number (XBee® Zigbee® Mesh Kit, 90001942-13 D) in the subject
line of your email.
XBee® Zigbee® Mesh Kit 3

Contents
Change the firmware protocol 12
Kit contents
Introduction to XBee modules
Zigbee in a nutshell
Mesh networking 17
Zigbee stack layers 18
Device types 19
Get started with XBee Zigbee
Assemble the hardware 21
Plug in the XBee module 21
How to unplug an XBee device 22
Download and install XCTU 23
Example: basic communication 23
Step 1:Requirements 23
Step 2:Connect the components 23
Step 3: Add the XBee modules to XCTU 24
Step 4: Configure the XBee modules 25
Step 5: Check the network 27
Step 6: Send messages 27
How XBee devices work
How XBee devices communicate 31
Wireless communication 31
Addressing 31
PAN Addresses 32
Channels 33
Serial communication 33
Operating modes 34
Comparison of transparent and API modes 35
XBee® Zigbee® Mesh Kit 4

XBee® Zigbee® Mesh Kit 5
XBee transparent mode
XBee transparent mode in detail 38
What have you learned? 38
Extend the basic communication example 39
Command mode 39
AT commands 39
Use AT commands 40
XBee API mode
API mode in detail 43
Advantages of API mode 43
API frame structure 45
Start delimiter 45
Length 45
Frame data 45
Checksum 46
Supported frames 48
Frame examples 49
Operating mode configuration 54
API escaped operating mode (API 2) 56
XBee frame exchange 58
AT Command: configure a local XBee device 58
Transmit Request/Receive Packet: Transmit and receive wireless data 58
Remote AT Command: Remotely configure an XBee module 59
Source routing: Create and obtain the route of a packet 60
Example: Configure your local XBee module 61
Example:Transmit and receive data 64
Libraries 69
Zigbee Mesh Network Setup
Configure the device type of an XBee module 71
Startup operations 71
Coordinator 71
Router 72
End device 72
Explore the network 73
Section summary 73
Wireless data transmission
Transmission methods 74
Broadcast transmission 74
Unicast transmission 75
Example: transmit data 76
Step 1: Requirements 77
Step 2:Connect the components 77
Step 3: Configure the Xbee modules 78
Step 4: Create a Java project 78
Step 5:Link libraries to the project 79
Step 6:Add the source code to the project 80

XBee® Zigbee® Mesh Kit 6
Step 7:Set the port names and launch applications 81
Step 8:Transmit data over the network 81
Step 9:Section summary of wireless data transmission 82
Step 10:Do more with wireless data transmission 82
Low power and battery life
Low power devices and battery life 84
A real world scenario 84
Design considerations for applications using sleep mode 84
Sleep modes 84
Pin sleep 85
Cyclic sleep 86
Example: enable sleep mode 86
Step 1:Requirements 86
Step 2: Connect the components 87
Step 3:Configure the XBee Modules 88
Step 4: Sleep 92
Step 5: What have you learned? 94
Step 6: Extend the example 94
Inputs and outputs
XBee I/O pins 96
Sensors 97
Setting pins for digital and analog sensors 98
Actuators 98
Set pins for digital and analog actuators 98
How XBee devices get sensor data 98
How to configure a pin as an input 99
How to obtain data from a sensor 99
Example: receive digital data 100
Step 1:Requirements 101
Step 2:Connect the components 101
Step 3:Configure the XBee modules 102
Step 4:Create a Java project 106
Step 5:Link libraries to the project 106
Step 6: Add the source code to the project 107
Step 7:Set the port name and launch the application 108
Step 8:Section summary of receiving digital data 109
Step 9:Do more with receiving digital data 109
Lab: receive analog data 110
Step 1: Requirements 110
Step 2:Connect the components 110
Step 3:Configure the XBee modules 112
Step 4: Create a Java project 116
Step 5:Link libraries to the project 116
Step 6:Add the source code to the project 117
Step 7:Set the port name and launch the application 118
Step 8:Section summary of receiving analog data 119
Step 9:Do more with receiving analog data 119
How XBee modules control devices 119
How to configure a pin as an output 120
How to send actuations 120

XBee® Zigbee® Mesh Kit 7
Example: send digital actuations 121
Step 1:Requirements 121
Step 2:Connect the components 121
Step 3:Configure the XBee modules 121
Step 4:Create a Java project 122
Step 5:Link libraries to the project 123
Step 6:Add the source code to the project 124
Step 7:Set the port name and launch the application 125
Step 8:Section summary of sending digital actuations 125
Step 9: Do more with sending digital actuations 125
Security and encryption
Zigbee security model 126
Network layer security 127
APS layer security 127
Network and APS layer encryption 128
Form or join a secure network 128
Security on the XBee
Enable security 130
Set the network security key 130
Set the APS trust center link key 130
Enable APS encryption 130
Use a trust center 131
How to update the network key with a trust center. 131
How to update the network key without a trust center. 131
Example: basic (but secure) communication
Understanding the example 133
Signal strength and radio frequency range
Distance and obstacles 135
Factors affecting wireless communication 136
Signal strength and the RSSI pin 137
Is RSSI the best indication of link quality? 139
Range test 140
Example: perform a range test 142
Step 1:Requirements 143
Step 2:Connect the components 143
Step 3:Configure the XBee Zigbee modules 143
Step 4:Perform a range test 144
Step 5:Section summary of signal strength 145
Zigbee communication in depth
Zigbee Application Framework 147
Application profiles 148
Clusters 151

XBee® Zigbee® Mesh Kit 8
Endpoints 152
Binding 154
Node descriptors 157
Zigbee Cluster Library 158
Zigbee Device Object (ZDO) 158
Explicit Addressing frames 160
Explicit Addressing Command frame 160
Explicit Rx Indicator frame 161
Data payload format 163
Receive Zigbee commands and responses 164
Examples: explicit data and ZDO 164
Example: obtain the neighbor table using the XBee Java Library 165
Example: obtain the neighbor table using the XBee Java Library 170
Large networks routing
Many-to-one routing 178
Enabling many-to-one routing 179
Disabling many-to-one routing 180
Source routing 180
Using source routing 181
Radio firmware
Firmware identification 184
Update radio firmware 184
Download new firmware 185
Troubleshooting
XCTU 186
Wireless data transmission 187
Enable sleep mode 188
XBee Java library 188
Receive digital data 190
Receive analog data 190
Send digital actuations 191
Range test 191
Check cables 192
Check that the XBee module is fully seated in the XBee Grove Development Board 192
Check the XBee module orientation 192
Check that the XBee modules are in the same network 192
Restore default settings 192
Check cables 192
Check that the XBee module is fully seated in the XBee Grove Development Board 192
Check the XBee module orientation 192
Additional resources
XBee buying guide 195
Hardware footprint 195
XBee antennas 196
XBee vs. XBee-PRO 197

XBee® Zigbee® Mesh Kit 9
Frequency 197
Radio communication protocols 198
Where to buy XBee devices 200
Find products from Digi and Digi distributors 200
Find Digi products through resellers 201
XCTU walkthrough 201
XCTU overview 201
Application working modes 204
Add a module 204
Read settings 205
Change settings 206
Save settings 206
Real projects with XBee modules 206
Community 207
Industrial solutions 207
Related products 208
XBee Grove Development Board
Overview
Development board variants 211
XBee THT Grove Development Board 211
XBee SMT Grove Development Board 211
Mechanical 212
XBee THT Grove Development Board variant 212
XBee SMT Grove Development Board variant 212
Power supply 213
XBee THT Grove Development Board power supply 213
XBee SMT Grove Development Board power supply 213
Power supply battery connector 214
XBee connector 214
XBee THT Grove Development Board XBee connector 215
XBee SMT Grove Development Board XBee connector 217
USB 219
XBee THT Grove Development Board USB 219
XBee SMT Grove Development Board USB 220
USB VBUS line 220
Reset button 221
XBee THT Grove Development Board Reset button 221
XBee SMT Grove Development Board Reset button 221
Commissioning button 222
XBee THT Grove Development Board Commissioning button 222
XBee SMT Grove Development Board Commissioning button 222
Commissioning pin and Grove AD0 connection 223
Association led 224
XBee THT Grove Development Board Association LED 224
XBee SMT Grove Development Board Association LED 224
RSSI led 225
XBee THT Grove Development Board RSSI LED 225
XBee SMT Grove Development Board RSSI LED 225
PWM0 RSSI configuration 226
User LED and User button 227
XBee THT Grove Development Board User LED and User button 227

XBee® Zigbee® Mesh Kit 10
XBee SMT Grove Development Board User LED and User button 227
User LED and User Button connection to DIO4 227
On/sleep LED 229
XBee THT Grove Development Board On/Sleep LED 229
XBee SMT Grove Development Board On/Sleep LED 229
On/sleep LED connection to DIO9 230
Potentiometer 231
XBee THT Grove Development Board Potentiometer 231
XBee SMT Grove Development Board Potentiometer 232
I2C 233
XBee THT Grove Development Board I2C bus 233
XBee SMT Grove Development Board I2C bus 233
XBee/XBee-PRO connection to Grove sensor 233
Grove I2C connector pinout 234
Grove Connectors 235
THT board Grove connectors pinout 236
SMT board Grove connectors pinout 238
Loopback jumper 240
XBee THT Grove Development Board Loopback jumper 240
XBee SMT Grove Development Board Loopback jumper 240
Schematic and Gerber files
XBee THT Grove Development Board schematic 241
Gerber files 241
XBee SMT Grove Development Board schematic 242
Gerber files 242

XBee Zigbee Mesh Kit User Guide
Digi’s XBee Zigbee Mesh Kit is a great way to learn how to use XBee RF modules for device
connectivity and mesh networking. Starting with very simple examples, we provide step-by-step
guidance as you assemble the kit components to create reliable device communications, working
control systems, and sensing networks with incredible battery life and robust security.
Mesh networking is a powerful way to route data. Range is extended by allowing data to hop from
node to node, and reliability is increased by “self healing,” the ability to create alternate paths when
one node fails or a connection is lost. Zigbee is one of the most popular mesh networking protocols,
specifically designed for low-data rate and low-power applications. The main advantage of Zigbee is
that it is an open standard, so any manufacturer's device that fully supports it can communicate with
any other company's Zigbee device.
The kit is designed for anyone getting started in the world of Zigbee. Hardware and software
engineers, corporate technologists, or educators and students can quickly create wireless mesh
networks.
Each point of this guide explains a basic topic related to XBees through a short theoretical
introduction and examples that put into practice the concepts you have learned. The topics are
arranged according to their complexity, from the most basic to the more powerful features. We
recommend that new users work through them in the order they appear.
XBee® Zigbee® Mesh Kit 11

This guide provides step by step examples, and some use the Java programming language. These
examples are designed to be easy for anyone to use, and those with some programming background
can extend them.
Change the firmware protocol
Although the kit comes pre-loaded with Zigbee firmware, you can change the RF protocol used by the
XBee3. To change protocols, use the Update firmware feature in XCTU and select the firmware. See
the XCTU User Guide.
The XBee3 hardware can run any of the following protocols:
nDigiMesh
nZigbee
n802.15.4
For information on each of these firmwares and instructions for how to get started, see the user
guide for each protocol:
nDigiMesh
nZigbee
n802.15.4
XBee® Zigbee® Mesh Kit 12

Kit contents
Verify that your kit contains the following components. Then get started by learning about the XBee
modules.
Note Some versions of the S2C kit contain three XBee Through-hole technology (THT) Grove
Development boards and three XBee THT modules instead of two THT and one Surface-mount
technology (SMT).
S2C
Zigbee
Kit Qty.
XBee3
Zigbee Kit
Qty. Part
2-XBee Grove Development Board
13XBee Grove Development Board
XBee® Zigbee® Mesh Kit 13

Kit contents
XBee® Zigbee® Mesh Kit 14
S2C
Zigbee
Kit Qty.
XBee3
Zigbee Kit
Qty. Part
2 - XBee Zigbee THT modules (S2C)
1-XBee Zigbee SMT module (S2C)
- 3 XBee3 Zigbee SMT module
33Micro USB cables
- 3 Antenna - 2.4 GHz, half-wave
dipole, 2.1 dBi, U.FL female,
articulating

Kit contents
XBee® Zigbee® Mesh Kit 15
S2C
Zigbee
Kit Qty.
XBee3
Zigbee Kit
Qty. Part
22XBee stickers
XBee Meshkit modules come in two hardware footprints: through-hole and surface mount.
nThrough-hole technology (THT) XBee modules include the 20-pin socket and require holes for
mounting the component on the printed circuit board (PCB), although it is common for the
carrier board to contain a female socket.
nSurface-mount technology (SMT) XBee modules include 37 pads and are placed directly on
the PCB. They do not require holes or sockets for mounting the component.

Introduction to XBee modules
XBee modules are small radio frequency (RF)devices that transmit and receive data over the air using
radio signals. Wireless capability is essential whenever you want to place sensors where no cables can
be installed, or where such tethering is undesirable.
XBee devices are highly configurable and support multiple protocols, which lets you choose the right
technology for your application—whether you want to set up a pair of radios to swap data or design a
large mesh network with multiple devices.
Here are some of the ways you can use XBee devices:
nControlling a robot remotely or creating wearable electronics for people, pets, or wildlife,
without hindering movement.
nMaking a building smarter and more responsive to human interaction.
nUsing XBee technology in industrial solutions. For example, XBee devices are used as sensors
to monitor industrial tanks for liquid levels, temperature, and pressure, and to monitor and
control complex machines such as wind turbines.
XBee® Zigbee® Mesh Kit 16

Zigbee in a nutshell
Zigbee is an open global standard for low-power, low-cost, low-data-rate, wireless mesh networking
based on the IEEE 802.15.4 standard. It represents a network layer above the 802.15.4 layers to
support advanced mesh routing capabilities. The Zigbee specification is developed by a growing
consortium of companies that make up the Zigbee Alliance. The Alliance is made up of over 300
members, including semiconductor, module, stack, and software developers.
Through its mesh and routing capabilities, Zigbee allows the transmission of data over long distances
by passing the data through a mesh network of intermediate nodes to reach more distant nodes.
Transmission distance ranges from 1200 to 3200 line-of-sight meters (5280 to 10560 feet). Zigbee
supports multiple network topologies such as point-to-point, point-to-multipoint, and mesh networks
and allows up to 65,000 nodes per network.
Zigbee is designed to provide the following features:
nHigh reliability
nLow power consumption
nLow cost
nHigh security
nSimple protocol, global implementation
Mesh networking
A mesh network is a topology in which each node in the network is connected to other nodes around
it. Each node cooperates in the transmission of information. Mesh networking provides three
important benefits:
nRouting. With this technique, the message is propagated along a path by hopping from node to
node until it reaches its final destination.
nAd-hoc network creation. This is an automated process that creates an entire network of
nodes on the fly, without any human intervention.
nSelf-healing. This process automatically figures out if one or more nodes on the network is
missing and reconfigures the network to repair any broken routes.
XBee® Zigbee® Mesh Kit 17

Zigbee in a nutshell Zigbee stack layers
XBee® Zigbee® Mesh Kit 18
With mesh networking, the distance between two nodes does not matter as long as there are enough
nodes in between to pass the message along. When one node wants to communicate with another,
the network automatically calculates the best path.
A mesh network is also reliable and offers redundancy. If a node can no longer operate, for example
because it has been removed from the network or because a barrier blocks its ability to communicate,
the rest of the nodes can still communicate with each other, either directly or through intermediate
nodes.
Note Mesh networks use more bandwidth for administration and therefore have less available for
payloads. They can also be more complex to configure and debug in some cases.
Zigbee stack layers
Most network protocols use the concept of layers to separate different components and functions
into independent modules that can be assembled in different ways.
Zigbee is built on the Physical (PHY) layer and Medium Access Control (MAC) sub-layer defined in the
IEEE 802.15.4 standard. These layers handle low-level network operations such as addressing and
message transmission/reception.
The Zigbee specification defines the Network (NWK) layer and the framework for the application layer.
The Network layer takes care of the network structure, routing, and security. The application layer
framework consists of the Application Support sub-layer (APS), the Zigbee Device Objects (ZDO) and
user-defined applications that give the device its specific functionality.

Zigbee in a nutshell Device types
XBee® Zigbee® Mesh Kit 19
For more information about the Zigbee stack layers, read the Zigbee communication in depth section.
Device types
Zigbee defines three different device types: coordinator, router, and end device.
Coordinator
Zigbee networks always have a single coordinator device. This device:
nStarts the network, selecting the channel and PAN ID.
nDistributes addresses, allowing routers and end devices to join the network. Assists in routing
data.
nBuffers wireless data packets for sleeping end device children.
nManages the other functions that define the network, secure it, and keep it healthy. This
device cannot sleep and must be powered on at all times.
Router
A router is a full-featured Zigbee node. This device:
nCan join existing networks and send, receive, and route information. Routing involves acting as
a messenger for communications between other devices that are too far apart to convey
information on their own.
nCan buffer wireless data packets for sleeping end device children. Can allow other routers and
end devices to join the network.

Zigbee in a nutshell Device types
XBee® Zigbee® Mesh Kit 20
nCannot sleep and must be powered on at all times.
nMay have multiple router devices in a network.
End device
An end device is essentially a reduced version of a router. This device:
nCan join existing networks and send and receive information, but cannot act as messenger
between any other devices.
nCannot allow other devices to join the network.
nUses less expensive hardware and can power itself down intermittently, saving energy by
temporarily entering a non responsive sleep mode.
nAlways needs a router or the coordinator to be its parent device. The parent helps end devices
join the network, and stores messages for them when they are asleep.
Zigbee networks may have any number of end devices. In fact, a network can be composed of one
coordinator, multiple end devices, and zero routers.
An example of such a network is shown in the following diagram:
Note Each Zigbee network must be formed by one, and only one, coordinator and at least one other
device (router or end device).
Table of contents
Other Digi Microcontroller manuals
Popular Microcontroller manuals by other brands

Mediatek Labs
Mediatek Labs LinkIt Connect 7681 Developer's guide

Nvidia
Nvidia Jetson TK1 quick start guide

Freescale Semiconductor
Freescale Semiconductor FRDM-KL82Z user guide

Silicon Laboratories
Silicon Laboratories C8051F800 user guide

inforce
inforce 6401 quick start guide

Terasic
Terasic Apollo-S10 user manual