Getting Started

I've had quite a few people getting in contact asking for support with the initial setup and configuration of libxbee. As a result, I felt that it would be worthwhile writing this guide. libxbee is very straight forward, once you understand the principals involved.


  1. Is there anything I should know before I dive in?
  2. How do I get the source code?
  3. Can I download compiled binaries?
  4. How do I get it running on my OS?
  5. Which modules should I use?
  6. How should my modules be configured?
  7. Creating connections
  8. Using connections
  9. Advanced connections
  10. Running some samples

Other Resources

Which Modules Should I Use?

Digi offer a range of mouldes, many of which are supported by libxbee.

More Module-Choosing Resources

Series 1 (802.15.4) Modules

This series has been renamed to XBee 802.15.4. These modules operate in the 2.4GHz spectrum, and are very good at providing point-to-point communications. They come with a variety of antenna options, including Chip/PCB antenna, RPSMA, u.FL and Whip (pictured).

I would recommend these to beginners that plan to have a network covering a small area (any two modules that want to communicate must be in range of each other).

It is possible to use these modules to interface directly with a network of other 802.15.4 devices by disabling the Digi protocol extensions (see the MM command).

List of Models | Documentation

Further Reading

John Foster's XBee Cookbook

Series 1 (DigiMesh) Modules

These modules are physically identical to the 'old' Series 1 non-meshing modules. The difference is that they run new firmware that allows them to offer meshing support. The meshing is based on a proprietary protocol, and is not compatible with ZigBee.

To make use of the DigiMesh firmware, you must use a different libxbee mode - xbee1dm.

List of Models | Documentation

Series 2 (ZNet) Modules

These modules were initially launched as XBee Series 2, however since the launch of the ZigBee modules (see below) they have been referred to as either XBee ZNet or XBee Series 2.5. These modules use a proprietary radio protocol, and are now considered Legacy or End of Life by Digi.

I would not recommend using these modules.


Further Reading

Upgrading from ZNet 2.5 to ZB (Install ZigBee firmware on a Series 2 ZNet module).

Series 2 (ZigBee) Modules

These modules obey the ZigBee protocol, and operate in the 2.4GHz spectrum and are compatible with other ZigBee devices. There are a handful of firmware variants available - Coordinator, Router and End Device - each of which have an AT/Transparent and an API variant.

Due to the meshing topology, each network must have one Coordinator. The network may consist of many Routers and End Devices. Coordinators and Routers must be always-on, while End Devices may sleep (making them suitable for use with a battery).

Standard: List of Models | Documentation
Surface Mount: List of Models | Documentation

Series 3 Modules

Series 3 has two hardware variants (S3 and S3B), both of which are compatible with the XStream Compatible (XSC) and 900HP firmware versions. libxbee supports the more recent 900HP firmware. The S3 hardware variant has been deprecated in favour of the S3B hardware that has better performance metrics.

These modules operate in the 900MHz (America), 905MHz (Brazil) or 920MHz (Australia) spectra - the order code must reflect the region of use.

Due to the lower frequency and high transmit power, these modules can achieve a line-of-sight range of upto 28 miles.

XSC: List of Models | Documentation
900HP: List of Models | Documentation

Series 5 Modules

These modules operate in the 868MHz spectrum. They are designed to be low cost and low power, while providing long distance communications (upto 25 miles).

They are available with a variety of antenna options, including RPSMA (pictured), u.FL and Whip.

List of Models | Documentation

Series 6B (Wi-Fi) Modules

Currently only UDP connections are supported.

The Series 6B modules communicate using WiFi - 802.11 bgn. Using these modules it is very easy to provide your system with IP connectivity, allowing access to the internet, or conversely allowing networked devices (or the internet) access to your system.

These modules are available as surface mount devices, and have an SPI interface alongside the common UART interface.

List of Models | Documentation