|Chibi Release v0.90 and Introducing chibiArduino||| Print ||
|Written by Akiba|
|Sunday, 14 November 2010|
It's been approximately one year since the Chibi wireless stack has been released and its been quite an adventure. The stack has been pounded on by quite a few users and they've provided some excellent feedback and recommendations. At version 0.90, the stack is basically stable with this release incorporating some new features and bug fixes.
I'd also like to announce the first release of chibiArduino, the Arduino port of the Chibi stack. Chibi was originally designed for hardware hackers and the open source hardware community as an easy way to add wireless communications to their designs. The dominant platform in the community is the Arduino and so it was natural to port the software to it. I only wish I had done it sooner.
The chibiArduino project has the same code base with minor modifications specific to the Arduino environment. The cmdArduino code was integrated into chibiArduino since a command line is a very useful tool and used quite often when dealing with wireless. There are also two additional files at the toplevel that serve as a wrapper to the main Chibi functions and are needed by the Arduino environment. I decided to keep the projects separate so that it was clear which code was specific to the Arduino. To use the chibiArduino code, it just requires unzipping the source files inside the "/Arduino-XXXX/libraries" directory where the Arduino-XXXX stands for the version number of the Arduino build.
Here are the main new features and bug fix:
The stack now features duplicate rejection. Duplicate frames usually occur when two nodes are near the range limits. The 802.15.4 protocol will retry frames that don't get acknowledged from the remote device. So at the range limit, it's possible that a frame will be received at the remote end, but the acknowledgement does not make it back to the sender. In that case, the same frame gets retried and a duplicate frame goes out. This usually occurs within a short time interval so I added code to compare the sender address and frame sequence number with the most recent frame. If both are identical, then that means that the frame is a duplicate and will get discarded.
I've also added some code to check when a frame will overflow the frame receive buffer. If the length of a frame is greater than the remaining space inside the receive buffer, then the frame will get discarded, a counter will get incremented, and an error message will get printed out (if a console is available). Most microcontrollers can normally keep up with the 802.15.4 bitrate (250 kbps max), but if there is heavy wireless traffic and the MCU is also busy with another task such as checking the USB or serial port, then its possible that the buffer can overflow. The additional logic prevents that and keeps statistics on the discarded frames.
There is also driver code to put the radio to sleep and wake it up. Sleeping the radio will save approximately 17 mA of current and is useful for battery-powered designs with limited amounts of energy.
The main bug fix is that the wrong length was being used when frames greater than one payload size would get fragmented. The total frame length would get used rather than the fragmented frame length. This has been fixed in this release. The other bug fix was just a comment that didn't match the code.
Thanks to all the users that provided feedback for this release and here are the links to the project pages:Link to chibiArduino Project Page Updated 2010-11-14: The sleep mode function has only been added to the RF230. It will be added to the RF212 as soon as I get a chance to test it.
|< Prev||Next >|