How to Setup XBee Series 2 Modules

Posted by Mohammed 15/10/2015 1 Comment(s)

Hello everyone!

Welcome to this basic tutorial on setting up Series 2 XBee modules (which uses the ZigBee Protocol) from Digi.

This tutorial will give you the basic how-to on setting up your own ZigBee Personal Area Network, also refered to as PAN.

You will find all the parts that you need for this tutorial on the "related products" in the bottom of this tutorial page, I'll also list it down for your easy access:

 

xbee-Series22x XBee Series 2 modules (XBee 2mW Wire Antenna - Series 2 or XBee Pro 63mW Wire Antenna - Series 2 if you want a higher coverage range).
xbee explorer-usbmini-b-usb-cable2x XBee USB Explorer Modules (XBee Explorer USB Dongle or XBee Explorer USB {you will need mini-B USB cable with the XBee Explorer USB})

 

1) Software Setup

 

  • Download link here (make sure you download the Next Gen Installer), it is version 6.1.1 at the time of writing this tutorial.
  • Install the software
  • You should end up with the main XCTU screen:

xctu-main-window

 

2) Hardware Setup

  • Place the XBee Modules in your choice of the XBee Explorer board, make sure that the flat side of the XBee is facing the USB connector side.
  • You should get something like this:

xbee-on-explorer-board

  • Connect the USB cable to your PC and the USB Explorer or if you have the Explorer USB Dongle, insert it to the USB port on your computer.
  • If not installed already, you might require the FTDI drivers (converts USB to TTL RS232, such that your computer gets a COM Port).
  • Your PC should now detect 2 new COM ports, in windows you can check this by opening the device manager, then checking the entries below "Port (COM & LPT)", in my case I got COM11 and COM12

checking-ports-in-device-manager

 

3) XBee Configuration

  • Now, open XCTU Software, and click on "Discover Devices"

xctu-discover-devices

 

  • Select the COM ports that you found earlier, then Next -> Finish.

xctu-com-ports-to-discover

  • Then Add the found devices

xctu-add-found-devices

  • Your two XBees are now added to the available Radio Modules in XCTU Software

xctu-devices-added

The XBee devices are now ready to be configured. So, we need to know how should it be configured, refer to the XBee ZB Modules Datasheet in this link or local link.

 

Forming a Network
The coordinator is responsible for selecting the channel, PAN ID (16-bit and 64-bit), security policy, and stack
profile for a network. Since a coordinator is the only device type that can start a network, each ZigBee network
must have one coordinator. After the coordinator has started a network, it can allow new devices to join the
network. It can also route data packets and communicate with other devices on the network.

(source: XBee ZB Module Datasheet 90000976_S.PDF:Pg:37)

 

  • Ok, great, what else?

 

Device Types
ZigBee defines three different device types: coordinator, router, and end device. Node Types / Sample of a Basic ZigBee Network Topology

A coordinator has the following characteristics: it
•Selects a channel and PAN ID (both 64-bit and 16-bit) to start the network
•Can allow routers and end devices to join the network
•Can assist in routing data
•Cannot sleep--should be mains powered
•Can buffer RF data packets for sleeping end device children.

A router has the following characteristics: it
•Must join a ZigBee PAN before it can transmit, receive, or route data
•After joining, can allow routers and end devices to join the network
•After joining, can assist in routing data
•Cannot sleep--should be mains powered.
•Can buffer RF data packets for sleeping end device children.

An end device has the following characteristics: it
•Must join a ZigBee PAN before it can transmit or receive data
•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.

An example of such a network is shown below:

xbee-zb-network

(source: XBee ZB Module Datasheet 90000976_S.PDF:Pg:34-35)

 

  • Awesome!
  • So, let us configure one XBee as a Coordinator and another as a Router and try to chat between the two.
  • Click on one of the XBee modules, the XCTU software will read the current configuration on the XBee you selected.
  • When its done, click on the "Update Firmware" icon

xctu-Update-firmware

  • Then select the newest Firmware versions for the "ZigBee Coordinator AT" Function set.

xctu-update-firmware-coordinator

 

  • Click Finish. The firmware will be updated, you will be disconnected at the end, do not panic, just Discover the device again as descried above.
  • Now, the XBee coordinator has been configured, repeat the same thing for the other module but select the newest firmware version for the "ZigBee Router AT" Function set.
  • You are all set and the XBees has been configured. The bees are ready to buzzzzzzzzzzzzzzz.
  • Open the console window (serial terminal window)

xctu-console

  • Now you can send data wirelessly by typing your text on the "Console log" area

xctu-success

  • Success!!!

 

Thats it, feel free to continue your exploration now.

If you have any questions, please leave them in the comments section below.

If you need an Xbee products, please contact us. We can provide you with all your hardware needs from Xbee, microcontrollers, Arduino, Raspberry Pi etc..

 

1 Comment(s)

S.yogaraja:
04/01/2017, 02:56:45 PM
Reply

Thanks, I got cleared about the basics and I am planning to use x bee pro 900 bhp for long distance water tanks automation and I need the configuration details/ tutorials of the same for applying in my projects!

Leave a Comment