Last week I received four RFBee modules. They are very small boards, Arduino compatible and wireless. And cheap. Ideal (at this time) modules to serve as a basis for very small, low power sensor motes (think remote thermometer). They work close to 900 Mhz, which is better for our case than the usual 2.4 GHz because it penetrates obstacles better. You can get the RFBee at Seeed Studio.

I tested one today. I plugged it into a Libelium XBee shield v1.1 - the RFBee has the same physical form factor as XBee modules. I moved the two jumpers on the shield to the USB position and fit the shield into an Arduino board with the Atmega chip removed from the socket. Now the PC and RFBee can talk via the FTDI chip.

In the Arduino serial monitor I tested quickly that the module and connection work. Sending +++, i got an ok back, then tried some commands.

Next I wanted to test firmware uploading. I will need a custom firmware for this project, which will send messages by itself without another host microcontroller.

The RFBee shipped with v1.03 firmware. I checked out the RFBee firmware source code from the rfbee SVN at google code into my arduino sketches folder.

I had to fix two little errors before it would compile. In TestIO.h:

-#include "config.h"
+#include "Config.h"

and in rfBeeCore.pde:

-#include "rfbeeCore.h"
+#include "rfBeeCore.h"

I guess the developers use a non-case-sensitive filesystem...

So, i had the firmware compiled and tried uploading. I selected the Arduino Pro 3.3V 8MHz 168 board in the menu. Upload... and nothing. The bootloader was not responding to the PC's attempts at uploading the code. After fumbling with it for some time I discovered I can get it to upload by resetting the RFBee module at the right time. Here's how I do it:

I take a wire and stuck one end into the free GND pin on the Arduino board. I hit upload in the Arduino IDE. Then I touch the RESET pin on the RFBee module with the other end of the wire. I wait for the message "Binary sketch size" to appear in the console, then immediately remove the wire from the RESET pin. This lets the bootloader on the RFBee run at the right time for the upload to succeed.

I guess a more modern XBee USB adapter like the UartSB is recommended for uploading custom firmware to the RFBee module. But you can get by with the one I have using "the wire"...

Comparing the behaviour of the old and new firmware after this short testing, the 1.1 feels much more solid. It prefers CR at line endings, so set that appropriately in the Arduino terminal (now you can). It also supports more configuration options and cool low power modes. I'm really glad this device was developed from the start as Open Source Hardware, as it's obvious the community helped improve the code a great deal in this case.

I then fiddled around and now have the Associate LED on the libelium shield lighting up when the RFBee is not in a low-power mode. The light is connected to the Analog 0 pin, also known as Digital 14. It's marked PC0 on the RFBee. Next I'll add some code to transmit automatically to the firmware and try receiving the sent messages with another RFBee. But that's for next time...