At work, I have been working with the Raspberry PI and some additional hardware lately. We have a board that we call raspINGA that goes onto the extension pins of the Raspberry. The board contains an Atmel AT86RF231 radio chip for the IEEE 802.15.4 standard. Furthermore, the board has a DS1340 RTC with a battery clip to allow the Raspberry to keep its local time even when no power is applied.
In this blog entry I want to sum up the steps to set up this hardware and use it together with IBR-DTN, the best Bundle Protocol Implementation for Linux. Using the Bundle Protocol over IEEE 802.15.4 allows seamless interoperability with uDTN, the only Bundle Protocol Implementation for Contiki.
This post is work in progress and may get updated over time.
How to install the IBR Repo?
- $ echo “deb http://jenkins.ibr.cs.tu-bs.de/download/debian/ wheezy-unstable main” | sudo tee /etc/apt/sources.list.d/ibrdtn.list
- $ sudo apt-get update
How to install IBR-DTN and the necessary tools?
- $ sudo apt-get install ibrdtnd ibrdtn-tools lowpan-tools
How to install the RPI Kernel with 802.15.4 Support?
- $ sudo apt-get install linux-image-3.6.11-1-rpi+ibr
- $ sudo cp /boot/vmlinuz-3.6.11-1-rpi+ibr /boot/kernel.img
How to enable the RTC in Raspbian?
- $ sudo apt-get remove –purge fake-hwclock
- $ sudo apt-get install –reinstall util-linux
- $ sudo update-rc.d hwclock.sh enable
- Edit /etc/init.d/hwclock.sh and remove the following lines:
if [ -d /run/udev ] || [ -d /dev/.udev ]; then
return 0
fi - $ sudo reboot
How to set up the IEEE 802.15.4 stack?
- $ sudo /etc/init.d/ifplugd stop # ifplugd tends to “up” interfaces
- $ sudo modprobe at86rf230 # if your kernel has the spi controller as module, load spi_bcm2708 now
- $ sudo iz add `iz listphy | head -n 1 | awk -F ‘ ‘ ‘ { print $1 } ‘`
- $ sudo ifconfig wpan0 up
- $ sudo iz set wpan0 ${PAN} ${NODE_ID} ${CHANNEL} # Here: PAN=0x780 NODE_ID=0x4 CHANNEL=16
- $ sudo killall -9 ifplugd
- Make sure to use different NODE_IDs on all nodes involved in your network
How to configure IBR-DTN to use the IEEE 802.15.4. link?
- Use this configuration:
- Make sure, that the port matches your PAN (0x780 is 1920).
net_interfaces = inga net_inga_type = dgram:lowpan net_inga_interface = wpan0 net_inga_port = 1920 net_inga_discovery = yes
In this post you refer to raspINGA. How does this module defer from http://trac.ibr.cs.tu-bs.de/project-cm-2012-inga/ ?
Cheers,
Dimitris
In fact, INGA is a complete WSN node including MCU, etc.
raspINGA is a stripped down version where only the transceiver is present and wired in a way so that it can be plugged into the raspberry PI. While I am not sure we will publish the schematics, it is actually quite simple. Use the schematics of INGA and remove all the things you do not need. Then figure out the pin assignment from the kernel source and make your own circuit board.