Welcome to the uracoli Blog

µracoli stands for microcontroller radio communications library and is intended to be a package that demonstrates capabilities and usage of Atmel's IEEE-802.15.4 radio transceivers AT86RF{230,231,212} in combination with AVR 8 bit microcontrollers (e.g. ATmega16, ATmega1281, ATmega128RFA1, ...).

Montag, 29. Juli 2013

RaspBee - An IEEE-802.15.4-Module for RasperryPi


The µracoli team recently got one of the new RaspBee modules from dresden elektronik (DE) for evaluation. The RaspBee is a addon module for the popular Raspberry Pi computer and is equipped with an Atmega256RFR2. Due to its huge amount of RAM and FLASH and the integrated transceiver, this MCU is a smart choice for building ZigBee or IEEE 802.15.4 gateways.

The very popular Raspberry Pi needs probably no extra introduction. The credit card size ARM computer runs Linux (e.g. Raspbian) and it has USB and Ethernet interfaces, which makes it perfect for DIY projects.

Esentially the RaspBee consists of a radio module deRFmega256-23M12, is equipped with a ceramic chip antenna, the footprint for an U.FL coaxial connector, two LEDs and a (not populated) JTAG connector. The 12 pin header connects the RaspBee with the Raspberry Pi over the expansion connector. This connector provides power supply and serial port as well as one digital GPIO and the Reset pin.

The RaspBee is preprogrammed with a proprietary serial bootloader. For this bootloader, DE provides the tool GCFFlasher. It runs on the Raspberry Pi and provides a convenient and safe way to upgrade RaspBees firmware.

Caution: If you want to programm the RaspBee via the JTAG interface, the original DE bootloader firmware will be destroyed and because the flash protect fuses are set, there is no way to do backup in advance. The bootloader firmware makes the difference between the basic version (capable to handle 5 ZigBee nodes) and premium version (handles up to 200 ZigBee nodes). However upgrading the firmware with GCFFlasher is safe. You can always restore the firmware image from the DE download page.

Basic Setup

Before you can run your own firmware on the Raspberry Pi / RaspBee hardware, some prerequisite steps are required. For detailed information refer to the RaspBee User Manual.
  1. Free the serial Port /dev/ttyAMA0 from the getty process.
  2. Install the tool GCFFlasher on the Raspberry Pi
  3. Configure ssh  access and preferably install your ssh-key. This may ease up the development and test from a regular PC.

Using µracoli Firmware on RaspBee

On your development PC you will need the latest AVR toolchain that supports Atmega256RFR2. A good choice is either Atmel Studio 6.x on Windows or one of the stand-alone Atmel toolchains for Linux or Windows.

Download the latest µracoli source code package, e.g uracoli-src-0.4.1.zip and unzip it. In order to test the basic development flow, we will use the program xmpl_hif.c on the RaspBee. The following steps describe the installation from a Linux-PC:

# unzip uracoli-src-0.4.1.zip
# cd uracoli-src-0.4.1
# make -C src raspbee
# make -C xmpl -f xmpl_hif.mk raspbee
# avr-objcopy -I ihex -O binary bin/xmpl_hif_raspbee.hex bin/raspbee.bin
# scp bin/raspbee.bin pi@
# ssh pi@ sudo ./GCFFlasher /tmp/raspbee.bin

Now open a serial terminal program (e.g. minicom) on the Raspberry Pi and try to communicate with the RaspBee module. The default port settings are /dev/ttyAMA0 38400-8N1. You will see the following output after resetting the RaspBee with the command GCFFlasher -r:

RaspBee Bootloader
Vers. 1.01
build 2013/05/27 
HIF Example : raspbee : 38400 bit/s

File: Src/Xmpl/xmpl_hif.c:71
Welcome in the world of µracoli!
DUMP : p=0x81d8, size=35
0000 : 57 65 6C 63 6F 6D 65 20 : Welcome  :
0008 : 69 6E 20 74 68 65 20 77 : in the w :
0010 : 6F 72 6C 64 20 6F 66 20 : orld of  :
0018 : B5 72 61 63 6F 6C 69 21 : .racoli! :
0020 : 0A 0D 00                : ...      :


With the RaspBee module there is usefull addon for the Raspberry-Pi available, which can be used to easily setup wireless sensor network applications. Since there is free open source software for this module available, DIYers have the freedom of creating their own sensor network applications.

1 Kommentar:

  1. I have bought the RaspBee premium and have bunch of series2 xbee modules and added them to network but the problem is i'm unable to send or receive at commands from the raspbee to the series 2 xbee that are present in network. I am using the python-xbee library to send and receive commands. The commands used are working on a network that has series 2 xbee coordinator and series 2 xbee end-points/routers. please guide me to get my network containing RaspBee up and running