Introducing The Official XBee Java Library

Digi International Digi International
January 27, 2015
Creating Digi XBee applications is easier than ever, with all of the tools, resources and libraries available to you today. In the many years since Digi acquired the MaxStream company, much has happened. XBee modules have grown into a family of programmable modules with a range of features. You can choose from short-range and long-range modules, RF or cellular, and three module footprints - surface mount, through-hole and micro. If you want to create a mesh network, you have a choice of Zigbee or DigiMesh, as well as 802.15.4. And the options for sleep cycles have grown, giving you more control over battery management. That's just for starters!

Meanwhile, Digi XBee celebrated its 15th birthday and over 15 million devices deployed. And Digi introduced Digi XBee Tools, providing a one-stop shop for all of the tools you need to develop, build, deploy and manage IoT applications with embedded XBee modules. The Digi XBee Tools suite has won three industry awards and counting.

So there is a lot to love. Whether you are a member of the Maker community or one of the rapidly growing organizations deploying Digi XBee modules in everything from rental scooters to windmills, the XBee ecosystem has what you need.

Note: This blog post, which was originally written in 2015, was updated in October 2020.
 

What's Included in the XBee Java Library

Gone are the days of toiling away for every inch of code. To make it as simple as possible for you to write applications that interact with XBee, we have created the XBee Java Library. This library supports Zigbee, 802.15.4, DigiMesh and Point-to-Multipoint XBee devices!  
xbjlib_diagram_hd

The project includes Java source code, unit tests for the library, and multiple examples that show how to use the available APIs. The examples are also available in source code format.

Here's a list of what's included in the library:

  • Configuration of local and remote XBee devices:
    • Configure common parameters with specific setters and getters
    • Configure any other parameter with generic methods
    • Execute AT commands
    • Apply configuration changes
    • Write configuration changes
    • Reset the device

  • Transmission of data to all the XBee devices on the network or to a specific device
  • Reception of data from remote XBee devices:
    • Data polling
    • Data reception callback

  • Reception of network status changes related to the local XBee device
  • IO lines management:
    • Configure IO lines
    • Set IO line value
    • Read IO line value
    • Receive IO data samples from any remote XBee device on the network
So whether you're designing an intelligent lighting application, completely automating your home, tracking your dog's activity level, or anything else you can dream up – you no longer have to start from scratch.

Visit github.com/digidotcom for access to the library and more information.
 
See the Digi XBee Network Assistant Datasheet
Learn about the tool for performing device mapping, signal strength testing and more