Project

xbee

0.0
No commit activity in last 3 years
No release in over 3 years
A Ruby API for sending/receiving API frames with Digi XBee RF Modules.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

XBee

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
xbee.open
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
xbee.close

Example: Receive packets

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

Contributing

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.

License

The XBee code is licensed under the the MIT License

You find the license in the attached LICENSE.txt file