Home arrow Projects arrow chibiArduino
chibiArduino | Print |
Written by Akiba   
Saturday, 06 November 2010

This is an open source software project based on the original Chibi wireless protocol stack . This project ports the Chibi protocol stack to the Arduino platform so that people familiar with the Arduino will be able to communicate wirelessly using inexpensive IEEE 802.15.4 radios. Chibi means "midget" in Japanese and its appropriate for this stack because it strips wireless communications down to the fundamental operations of initialization, send, and receive. The stack relies heavily on the radio hardware to do most of the timing specific parts of the protocol which allows it to run without an operating system or a scheduler. This also reduces the size of the software which currently requires approximately 4 kB of flash memory and approximately 300 bytes of RAM. 

2013-10-25 v1.04 Release

  • Added code to turn off RF front end amplifiers in sleep mode for long range mode
  • Added support for Saboten v1.1 900 MHz Long Range
  • Update keywords.txt file
You can pick up the latest code at github: http://www.github.com/freaklabs/chibiArduino

2013-10-06 v1.03 Release

  • Feature: Added and tweaked initial default values for long range board for tuning
  • Update: Updated the "HOWTO Using the chibiArduino Wireless Protocol Stack" document to reflect latest code
  • Bug Fix: Added check on chb_set_mode() function  to only allow usage with 900 MHz radios
  • Bug Fix: Added code on the examples to check for a received length of 0. This indicates a duplicate packet and should be discarded
  • Bug Fix: Removed CHIBI_ENTER_CRIT and CHIBI_LEAVE_CRIT statements from ISR
    • They're not needed since ISR does not allow nested interrupts
  • Bug Fix: Tx power not set to full power in init code
    • Setting to full 10 mW power in init code should allow for greater communications range.
  • Bug Fix: Added code to change Tx power to 5 dBm for long range board. This is max spec'd by CC1190 datasheet.
    • The CC1190 datasheet specs that the max output occurs at +5 dBm. For the long range board, the init code sets to max of +5 dBm.
  • File Removal: Removed the AES example for now. I accidentally included it but it was empty. This will be added later. 
You can pick up the latest code at github: http://www.github.com/freaklabs/chibiArduino
The latest version of the chibiArduino HOWTO document can be found here .

2013-07-29_v1.01 Release

  • Feature: Added support for long range boards.
    •  The stack will detect long range boards and initialize front end RF modules
  • Feature: Added support for RF Ethernet gateway boards
    • The stack will detect ethernet gateway boards and initialize pins specifically for those boards
  • Bug Fix: Fixed race condition on transmit function
    • A race condition was found when going into transmit mode while receiving a frame. The driver was modified to check the radio state machine to make sure there is no frame being received before transitioning to transmit mode.

You can pick up the latest code at github: http://www.github.com/freaklabs/chibiArduino

Everything is also packged into a zip file you can download here:

Link to 2013-07-29_chibiArduino_v1.01.zip

2013-07-03 v1.00a Release

  •  Bug Fix: Fixed race condition in transmit
    • When simultaneously transmitting and receiving, if frame received within interval between transmit end and trx_end interrupt is serviced, trx_end flag will not be set and system deadlocks. Race condition has been removed. More details here .
  • Removed: Polling mode has been deprecated and removed. This mode was a dirty hack. Running in interrupt mode is the proper way for a communications stack.
  • Removed: boards.txt file

You can pick up the latest code at github: http://www.github.com/freaklabs/chibiArduino

Everything is also packaged into a zip file you can download here:

Link to 2013-07-03_chibiArduino_v1.00a.zip

2013-06-21 v1.00 Release

  • Feature: added support for AES encryption
  • Feature: added support for high data rate modes (2 Mbps at 2.4 GHz, 1 Mbps at 900 MHz)
  • Feature: added hardware based true random number generation
  • Feature: added precompiler defines based on board definition file for chibiArduino hardware variants
  • Feature: added support for different modulation modes at 900 MHz using OQPSK and BPSK
  • Feature: added AES example
  • Bumped version to 1.0. yee-haw!

You can pick up the latest code at github: http://www.github.com/freaklabs/chibiArduino

Everything is also packaged into a zip file you can download here:

Link to 2013-06-21_chibiArduino_v1.00.zip

2012-11-02 v0.60 Release

  • Feature: Added support for AT86RF212 and AT86RF231. 
  • Feature: Added new API call: chibiGetPartID(). Now that different chips are supported, will need to check which chip is in use.
  • Bug Fix: If incoming frame is too big to fit in buffer, error message would print out in ISR. Print statements in ISR on Arduino 1.0.1 will deadlock system if you max out the hardware tx buffer. The print message has been removed.
  • Bug Fix: Fixed bug in the chb_delay_us. Incorrectly had it delaying n^2 usec. *facepalm*
  • Bug Fix: In wireshark, incoming data would overflow buffer even though there is a size check to prevent buffer overflow. The data type for the buffer length check was 8-bits which limited the max len to 255. Actual buffer length was 1024. The data type has been changed to 16-bits.
  • You can pick up the latest code at: http://www.github.com/freaklabs/chibiArduino

Also packed everything in a zip file you can download here:

Link to 2012-11-02_chibiArduino_v0.60

2011-11-17 v0.55 Release

2011-11-17 v0.54 Release

  • Fixed problem with v0.52 release

Link to 2011-11-17_chibiArduino_v0.54

2011-08-20 v0.52 Release  Do Not Download this version

  • Fixed potential buffer overflow issue in command line 
Link to  2011-08-20 v0.52_chibiArduino_v0.52

2010-12-28 v0.51 Release

  •  Added delay when waking from sleep mode
    • An 880 usec delay was required to wake the chip from sleep mode so that the PLL could lock
  • Added support for promiscuous mode
    • Allows chibiArduino to be used as a packet sniffer
  • Added enhanced comments for chibiUsrCfg.h (thanks Lyle)
Link to 2010-12-28_chibiArduino_v0.51

Link to chibiArduino Usage Guide v0.51

2010-11-06 v0.50 Release

This is the initial release of the chibiArduino wireless protocol stack. It's a  wireless 802.15.4 protocol stack targeted at the Arduino platform. 

Link to 2010-11-06_chibiArduino_v0.50

Link to chibiArduino Usage Guide v0.50


Additional Examples

This is a temporary storage area for new examples that I or others may write but have not made it into the current release yet. 

Wireless Button

This example shows how to read a button input and generate a command to toggle an LED on and off on a remote node. 

Link to chibi_ex8_button


Hits: 56113
Comments (8)Add Comment
A simple Zigbee scanner to use with wsbridge
written by Matt Watchinski, January 31, 2012
/* A simple sketch to scan all the channels, requires exposing chbiGetChannel
* Add this to chibi.h
* uint8_t chibiGetChannel();
* This should be in chibi.cpp already
* uint8_t chibiGetChannel()
* {
* return chb_get_channel();
* }


int channelLow = 11;
int channelHigh = 26;

/ ******************************************************* *******************/
// Initialize
/ ******************************************************* *******************/
void setup()
// Init the chibi stack

// Open the serial port at specified speed. For sniffing, we want to send data
// out the serial port as quickly as possible. On windows, 250kbps can be used.
// On linux, it only seems to like standard speeds up to 115200. To make things
// compatible on both platforms, I'm keeping the speed at 115200. If you want
// to boost the speed on a Windows system, use 250000 rather than 115200.
// Ex: Serial.begin(250000);
// Remember: If you change the speed here, make sure you change it on the application
// program as well.

// Set Pin 13 to blink when we receive data

// Set default channel to listen on

/ ******************************************************* *******************/
// Loop
/ ******************************************************* *******************/
void loop()
int currentChannel;

currentChannel = chibiGetChannel();

// Sit on each channel for 1 second
// Change this if you want to wait longer on each channel

// Check if any data was received from the radio. If so, then handle it.
if (chibiDataRcvd() == true)
int len;
byte buf[CHB_MAX_PAYLOAD];

// Get the data from the radio
len = chibiGetData(buf);

// If len is greater than CHB_MAX_PAYLOAD we are desynced
// Just drop the packet in this case and get the next one
// Or it ain't Zigbee which could cause other issues
report abuse
vote down
vote up
Votes: +1
written by Akiba, February 01, 2012
Awesome. I'm going to add that into the examples. I'll also be moving the code to github so it will be easier to add or modify things.
report abuse
vote down
vote up
Votes: +1
written by Kevin Townsend, February 06, 2012
Gitub is nice to use once you get everything setup properly. I resisted moving over from Google Code for quite a while, but I'm a happy convert now.
report abuse
vote down
vote up
Votes: +0
A simple Zigbee scanner to use with wsbridge
written by Emmanuel, August 29, 2012
I'm interested in trying your automatic channel scanning with chibiGetChannel().
Can you post the entire .pde (or .uno) file as the comment is cutted at the end of your sketch?
Thany you.
report abuse
vote down
vote up
Votes: +1
radio device
written by dev.ken, June 17, 2013
what radio device shield are you using with chibi ?
report abuse
vote down
vote up
Votes: +0
written by Akiba, June 17, 2013
Hi. There isn't a radio shield. The radio is integrated into the circuit board. The radio IC is the Atmel AT86RF2xx series chips.
report abuse
vote down
vote up
Votes: +0
written by Claudio Donaté, December 01, 2013
Hello, nice work! This will save me months of work on my master thesis. So, I know that the chibiArduino works on the Atmel AT86RF2xx series, so I'll use the AT86RF231, no problems, right? And, I just need to make the circuit as shown in the Datasheet and connect the SPI wires to the arduino? Another thing, I need a coordinator node, a few routers and lots of end devices, is that possible with the chibiArduino? Thank you!
report abuse
vote down
vote up
Votes: +0
written by Akiba, December 07, 2013
Hi. ChibiArduino just sends via star topology. There is no such thing as a coordinator or end device. All devices have the same capabilities and can send and receive data from one or another. You can write higher layer protocols for multihop routing if you want, but chibiArduino is just for sending and receiving data to another node. That's why its much simplified.
report abuse
vote down
vote up
Votes: +0

Write comment