A Ruby API for XBee ZigBee-RF-Modules

This gem is forked from the original XBee-Ruby gem. Because major API changes are being made a new name is appropriate.

See the examples/ directory for some working examples with slightly more complexity than the samples below.

The spec/ directory is left over from the forked gem, and will be converted to Minitest in the near future.

Example: Transmit a packet to another node

xbee = XBee::XBee.new device_path: '/dev/ttyUSB0', rate: 115200
request = XBee::Frames::RemoteATCommandRequest.new
request.address64 = XBee::Address64.from_string '0013A232408BACE4'
request.at_command = 'NI'
request.id = 0x01
xbee.write_frame request
puts xbee.read_frame

Example: Receive packets

xbee = XBee::XBee.new port: '/dev/ttyUSB0', rate: 115200
loop do
    frame = xbee.read_frame
    puts "Frame received: #{frame.inspect}"


All development happens via Git using the Git Flow branching model. The canonical source location is XBee Bitbucket. This repository is automatically mirrored to GitHub.

If you find a bug or have a feature request, please create an issue in the XBee issue tracker.


The XBee code is licensed under the the MIT License

You find the license in the attached LICENSE.txt file