Shop OBEX P1 Docs P2 Docs Learn Events
XBee AT/API object Release — Parallax Forums

XBee AT/API object Release

Martin HebelMartin Hebel Posts: 1,239
edited 2007-06-25 11:21 in Propeller 1
For you XBee users out there, here is the XBee object library I've been working on. Had to get it done for some research I'm involved in.

It supports both AT command mode (with fast guard times), and API mode.

AT mode is pretty much simply FullDuplexSerial passed up (Tx,Rx, DEC, HEX, etc) with some XBee AT configation routines thrown in.

If you haven't used API mode, it's great for the data you get and sending to various units.· As an example, when in API mode, if data is received from another unit, it arrives as a packet.· The packet is broken down and what can be instantly access by the end user is the address of sender, RSSI level and data. Nice to know when you have multiple units spitting data at you!

Or, when sending data to various units, there is no need to change the destination address manually:
XB.API_Str(5,string("Hello 5!"))· ' send to addy 5

Other packets it gets are transmission acks, config changes, and if using firmware version 10A2/3, remote units can automatically poll and send digital/analog inputs from the XBee to the prop's XBee.· I don't parse out the data, but you can.

In API mode, all data is sent/recieved as strings, so gets a little tricky sometimes.

Be sure to check out the notes in the object file for limitations and what currently is not supported.

I have issues accepting a packet, processing it and getting the next packet in time sometimes.· I may need to add a buffer cog or look at using RTS flow control.

Enjoy,
Martin


·

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies

Post Edited (Martin Hebel) : 6/25/2007 12:20:11 AM GMT

Comments

Sign In or Register to comment.