Skip to content
Permalink
Tag: v0.6.0
Commits on Sep 16, 2015
  1. Merge pull request #12 from matthijskooijman/fixes-and-bump

    andrewrapp committed Sep 16, 2015
    A few more fixes and bump version to 0.6.0
Commits on Sep 15, 2015
  1. Pass XBeeAddress64 objects as const references where possible

    matthijskooijman committed Sep 15, 2015
    Previously, they were passed as normal references. Adding const does not
    change the code in any way, but allows passing temporary objects as
    well, so you can do:
    
        req.setAddress64(XBeeAddress64(0, 0xffff));
    
    Or even just:
    
        req.setAddress64(0x0013A20012345678);
  2. Print status codes in hexadecimal

    matthijskooijman committed Sep 15, 2015
    Since the documentation lists them in hex, this makes it easier to look
    them up.
Commits on Aug 16, 2015
  1. Do not crash if no userdata is passed to the printXXXCb callbacks

    matthijskooijman committed Aug 16, 2015
    Previously, the userdata parameter was used as-is, interpreted as a
    Print*. If no userdata was supplied when registering the callback, NULL
    is passed, resulting an invalid method lookup and a call to a random
    piece of memory (often resulting in a lockup).
    
    By checking for this, forgetting to pass userdata will not lockup, but
    also not show any error message (since there is no obvious place to
    print it to...). If an invalid pointer is passed, things will still
    break, of course.
  2. Fix typo in comment

    matthijskooijman committed Aug 10, 2015
  3. Slightly modify the print callbacks' messages

    matthijskooijman committed Aug 10, 2015
    Now that these callbacks can also be called directly, printing
    "XXXResponse received" can be confusing, since it might not necessarily
    be printing a response that was just received.
  4. Add non-callback versions of the printer callbacks

    matthijskooijman committed Aug 10, 2015
    This allows calling these functions directly as well, without having to
    bother with casting the Print* to uintptr_t. E.g. you could do something
    like:
    
    	Serial.println(F("Unknown message received"));
    	printResponse(response, Serial);
Commits on Aug 6, 2015
  1. Fix argument-less TX request constructors

    matthijskooijman committed Aug 6, 2015
    The comments promised that when using the argumentless constructors of
    ZBTxRequest, Tx16Request or Tx64Request, setting the address and payload
    would be sufficient to get a working request object. However, this
    leaves the transmit options and broadcast radius options uninitialized.
    If a request object is allocated globally, these will just end up as 0,
    but if allocated on the stack, they can get random values.
    
    For the ZBTxRequest, it is not entirely clear if the 16-bit address
    should be explicitly set in this case, so this adds initialization just
    in case.
Commits on Aug 4, 2015
  1. Merge pull request #6 from matthijskooijman/improvements

    andrewrapp committed Aug 4, 2015
    XBeeAddress64 improvements
  2. Merge pull request #11 from matthijskooijman/properties

    andrewrapp committed Aug 4, 2015
    Add library.properties file
  3. Merge pull request #9 from matthijskooijman/callbacks

    andrewrapp committed Aug 4, 2015
    Add support for callbacks and various other improvements
  4. Merge pull request #8 from ivankravets/patch-1

    andrewrapp committed Aug 4, 2015
    @platformio Library Registry manifest file
  5. Add ZdpScan example

    matthijskooijman committed Jul 13, 2015
    This example allows scanning a network for joined devices, and for
    endpoints, profiles and clusters supported by those devices.
    
    At the same time, this shows some more advanced uses of the callback
    API, waiting for actual reply packet received from other nodes in addition
    to waiting for status replies from the local XBee module.
Commits on Aug 2, 2015
  1. Add library.properties file

    matthijskooijman committed Aug 2, 2015
    This turns the library into a proper non-legacy library and allows the
    Arduino IDE to display some additional info in its library manager. This
    also opens up the way to allow installing the library from within the
    Arduino IDE, if the library's github url is added to the list of
    libraries by the Arduino team.
    
    This fixes the first part of issue #2.
Commits on Jul 13, 2015
  1. Add Echo_Callbacks example

    matthijskooijman committed Jul 12, 2015
    This is an example that receives packets and echoes them back to the
    sender. It uses the new callbacks to show their usage.
  2. Add a bunch of printing callback functions

    matthijskooijman committed Jul 13, 2015
    These functions can be used as callbacks for XBeeWithCallback and print
    various packets. printErrorCb() can easily print errors to simplify
    sketches. printRawResponseCb() and printResponseCb() print complete
    responses and will be mostly useful for debugging (especially the
    generic printResponseCb() version is fairly big due to all the strings,
    it compiles to around 5.5k).
  3. Add a number of printHex helper functions

    matthijskooijman committed Jul 13, 2015
    These allow easily printing integers and XBeeAddress64 values with
    leading zeroes (which Arduino's print doesn't have any easy way to do).
    Also, a version is available that can print a buffer of bytes with
    configurable separators.
    
    These functions aren't used yet, but will be used in examples that will
    be added next.
  4. Fix parsing of Rx16/64IoSampleResponses

    matthijskooijman committed Jul 12, 2015
    The old code didn't calculate the offsets correctly causing
    isDigitalEnabled() and isDigitalOn() to only at the first sample data
    (instead of looking at the mask or subsequent samples).
    
    This introduces a getSampleStart() method to allow sharing some code
    between getAnalog() and isDigitalOn().
  5. Add PayloadRequest::setPayload overload to set pointer and length

    matthijskooijman committed Jul 11, 2015
    This allows setting both in one call, which is slightly more
    convenient.
  6. Allow XBeeWithCallbacks::waitFor() to check status responses too

    matthijskooijman committed Jul 10, 2015
    Now, if a frameId is passed, waitFor() will check for status response
    while waiting. If one is received that matches the frameId and has a
    non-zero status (e.g. an error), waiting stops and the status is
    returned.
    
    When sending a TX packet and subsequently listening for a RX reply, this
    allows waiting for a reply and the TX status at the same time and stop
    waiting if the TX turns out to have failed. This is particularly
    convenient since the TX status can sometimes arrive *before* the RX
    reply and sometimes *after*, which makes a sequential waitForStatus()
    and waitFor() approach not work.
  7. Add XBeeWithCallbacks::waitFor()

    matthijskooijman committed Jul 9, 2015
    This allows waiting for an arbitrary API response. Combined with a
    user-defined "matching" function, this allows e.g. waiting for a reply
    to a packet previously sent in a convenient way.
    
    The main work is done using a waitForInternal() method, so the actual
    waitFor() can be a template method (to allow passing a response object
    directly, without having to also pass a matching API id). The
    implementation could have been put inside waitFor() directly, but then
    you would end up with a complete copy of the method for each response
    type you wait for.
  8. Add XBeeWithCallbacks::sendAndWait()

    matthijskooijman committed Jul 9, 2015
    This just combines send() and waitForStatus() in one convenient call.
  9. Add XBeeWithCallbacks::waitForStatus()

    matthijskooijman committed Jul 9, 2015
    This method loops until a status response is received (e.g. a
    AtCommandResponse, TxResponse, etc.) to greatly simplify getting the
    result of a command sent. While waiting, any other responses are
    processed by the callbacks as normal, so no response gets lost while
    waiting.
    
    A matchStatus() helper method is introduced, preparing to reuse it in a
    future commit.
  10. Split XBeeWithCallbacks::loop() into top and bottom

    matthijskooijman committed Jul 9, 2015
    This allows reusing both parts, while inserting a bit of code in
    between, in subsequent commits.
  11. Add static API_ID constant to response classes

    matthijskooijman committed Jul 9, 2015
    All response classes that represent an actual API packet, now have this
    constant, which should make it easier to use templates to define generic
    methods that work for all response types.
  12. Add response specific callbacks

    matthijskooijman committed Jul 6, 2015
    This adds a callback for each type of response that exists. Whenever a
    respons is received, the corresponding callback is called. When it is
    not defined, the onOtherResponse callback is called instead.
  13. Add XBeeWithCallbacks class

    matthijskooijman committed Jul 6, 2015
    This is just a minimal implementation, that supports the onPacketError()
    callback and onResponse() callback. More callbacks need to be added to
    make this class truly useful.
  14. Add ZBExplicitRxResponse

    matthijskooijman committed Jul 7, 2015
    This allows receiving "ZigBee Explicit Rx Indicator" API frames,
    that specify the endpoints, profile id and cluster id for a
    received message, e.g. to interact through standard Zigbee protocols.
    These API frames are enabled by setting AO=1.
Commits on Jul 8, 2015
  1. Add ZBExplicitTxRequest

    matthijskooijman committed Jul 7, 2015
    This allows sending "Explicit Addressing ZigBee Command" API frames,
    that allow specifying the endpoints, profile id and cluster id for a
    transmitted message, e.g. to interact through standard Zigbee protocols.
Commits on Jul 6, 2015
  1. Add repository info

    ivankravets committed Jul 6, 2015
  2. @platformio Library Registry manifest file

    ivankravets committed Jul 6, 2015
    * This library in Web Registry: http://platformio.org/#!/lib/show/6/XBee
    * Specification: [PlatformIO Library Manager](http://docs.platformio.org/en/latest/librarymanager/index.html)
    * Integration: [IDE Integration](http://docs.platformio.org/en/latest/ide.html)
Commits on Jun 12, 2015
  1. Introduce constexpr for the XBeeAddress64 constructors

    matthijskooijman committed Jun 11, 2015
    This allows the compiler to better optimize (global) XBeeAdress64
    instances.
    
    With the examples sketches, this saves between 44 and 114 bytes of
    program space, compiling for the Uno. Even sketches that do not directly
    use any addresses shrink, because the initialization of
    RemoteAtCommandRequest::broadcastAddress64 can be simplified.
    
    This feature requires C++11 to be enabled. This isn't currently the case
    (with Arduino 1.6.4), but is expected to be enabled in a future release.
    A preprocessor check is used to ensure that the code compiles with and
    without C++11.
Older
You can’t perform that action at this time.