x

Programming Xbee modules in Linux using Ruby::XBee

Limitations

Not all XBee Series 1 features are supported, though many are.

No provision is made to flash new device firmware into the XBee from Ruby::XBee classes or utilities.

Intel architecture only.

Quick Start

Install ruby 1.8.7 for your platform (see www.ruby-lang.org)

Download the ruby-xbee tarball http://www.esawdust.com/ruby-xbee/releases/ruby-xbee-1.0/ruby-xbee-1.0.tar.gz. Extract the bundle into its permanent directory:


	

Create a symbolic link for serial-port-0.6:


	

determine your /dev string and add it to the conf/xbeeconfig.rb file.

Once the XBIB-U-DEV USB device is plugged into the USB port on the Linux host, the in-kernelftdi driver should automatically load and create the associated device. It is usually /dev/ttyUSB0 for the first USB host port, with additional ports incrementing (i.e. /dev/ttyUSB1, /dev/ttyUSB2). The first host serial port is typically labeled /dev/ttyS0, with additional ports incrementing (i.e. /dev/ttyS1, /dev/ttyS2, etc...).

Sample entry for the USB XBIB-U-DEV device:


	

# this is the monitor port device # your device will be different than this #@xbee_usbdev_str = "/dev/tty.KeySerial1" @xbee_usbdev_str = "/dev/ttyUSB0"

# your device will be different than this

#@xbee_usbdev_str = "/dev/tty.KeySerial1"

@xbee_usbdev_str = "/dev/ttyS0"

Test communication:

If everything is configured correctly you will see output from xbeeinfo similar to this (your output will vary):

Syntax ./xbeeconfigure.rb [options]

Command line help


	

Last updated: Aug 14, 2018

Recently Viewed Articles

No recently viewed articles