API for communicating with XBee devices.

Dependencies:   CircularBuffer FixedLengthList

Dependents:   XBeeApiTest XBeeApiSimpleATCmdsExample XBeeApiBroadcastExample XBeeApiBroadcastExampleRTOS ... more

Overview

XBeeApi is intended to be a library for providing a high-level API interface to the XBee - for example getChannel() and setChannel(2) methods rather than needing to send( "ATCH" ) and send( "ATCH 2" ) - and then de-code the responses.

See the notebook page here for a description of how the API works & some details on the various classes.

Features:

  • Support for transmission & reception of data packets
  • Support for reading & changing settings
  • Support for "Remote AT" interface to access settings & I/O channels on remote XBees
  • XBeeApi should work if you're using mbed-rtos, though it is not currently threadsafe. Take a look at the XBeeApiBroadcastExampleRTOS example if you're including mbed-rtos.

Example Programs

There are also example programs available:

Transmit

Import programXBeeApiSimpleBroadcastExample

Simple example of how to use XBeeApi - set up the XBee, configure P2P networking then transmit a frame.

Import programXBeeApiBroadcastExample

Example for XBeeAPI; a little more involved than XBeeApiSimpleBroadcastExample with report on failure to set up the XBee and on the transmit status of the message.

Import programXBeeApiBroadcastExampleRTOS

Example of using the XBeeApi library to broadcast a message, based on XBeeApiBroadcastExample. This example shows how to use the library when using mbed-rtos. Before compiling you must open "XbeeApi\Config\XBeeApiCfg.hpp" and change the '#if 0' to '#if 1' on the line above the comment reading "Use RTOS features to make XBeeApi threadsafe"

Settings/Status

Import programXBeeApiSimpleATCmdsExample

Simple example of using XBeeApi to send AT-style commands to the XBee

Import programXBeeApiRemoteATCmdsExample

Example of using the XBeeApi library to send AT commands to remote XBee devices in order to read/write settings

Receive

Import programXBeeApiSimpleReceiveExample

Simple example of using XBeeApi to receive data packets via wireless

Import programXBeeApiReceiveCallbackExample

Example of using the XBeeApi library to receive a message via a callback method

Import programXBeeApiReceiveCallbackExampleRTOS

Example of using the XBeeApi library to receive a message via a callback method. This example shows how to use the library when using mbed-rtos. See the comment at the top of main.cpp

Remote I/O

Import programXBeeApiRemoteIOExample

Example of using the XBeeApi library to read inputs on a remote XBee

If you have 2 mbed connected XBees available then you can use XBeeApiSimpleReceiveExample and XBeeApiSimpleBroadcastExample as a pair.

Note that this is still a work in progress! XBeeApiTodoList tracks some of the functionality still to be added.

Revisions of Base/XBeeApiFrame.hpp

Revision Date Message Actions
53:7b65422d7a32 2014-07-28 Comments & clean-up File  Diff  Annotate
51:a7d0d2ef9261 2014-07-28 Additional infrastructure for AT & remote AT commands. File  Diff  Annotate
50:f76b7e7959a2 2014-07-13 Add support for Remote AT commands File  Diff  Annotate
48:48397bedf95d 2014-07-07 Add checksum verification on the received frames and the ability to turn it on/off. File  Diff  Annotate
47:5d3608835668 2014-07-06 Re-jig XBeeApiTxFrame to allow getDataPtr to be a const method again. File  Diff  Annotate
39:35ab09bff018 2014-06-27 Fix issue with mis-matching virtual function declaration breaking TX File  Diff  Annotate
38:291aee9eb900 2014-04-02 Sync from https://github.com/bright-tools/xbeeapi/commit/10fb465f9b314dcf88e007bd3f33af856ab70c8f File  Diff  Annotate
34:2535760d53a6 2014-03-25 Comment update File  Diff  Annotate
27:6356ef5fe39b 2014-02-05 RX message decoding File  Diff  Annotate
24:2cd1094c4fd7 2014-02-05 Remove various classes from XBeeApiCmdAt and extend XBeeApiFrame to allow initialisation of the members so that this class can perform the same task as was previously occupying >3 classes. File  Diff  Annotate
16:8095c43a2a6e 2014-02-04 Flesh out XBeeApiTXFrame and add XBeeApiTxFrameEx File  Diff  Annotate
15:ff9f12e38f44 2014-02-03 Add TX callback to XBeeApiTxFrame File  Diff  Annotate
12:58319a467943 2014-02-01 Add XBeeApiAddrType_t File  Diff  Annotate
10:0d084d0253a7 2014-01-31 Update getDataPtr() to support fragmented buffers File  Diff  Annotate
6:3cb62daace78 2014-01-29 Document API File  Diff  Annotate
5:b40a6fd3a334 2014-01-29 Documentation update File  Diff  Annotate
3:c3d96b94041a 2014-01-27 Documentation & misc changes File  Diff  Annotate