Skip to content

RaspberryPi Software Configuration

Sébastien Dawans edited this page May 13, 2013 · 39 revisions

6LBR on the RaspberryPi should work with any Linux distribution, but it has been extensively tested with the Raspbian distribution, which is a debian-based operating system optimized for the RaspberryPi. We provide several ways to get started with 6LBR on the RPi:

  • Method 1: Install 6LBR on an existing Raspbian image following the instructions on this page. This supposes that you already have an existing installation of Raspbian on an SD card, or that you would like to install one from the official Raspbian repository. In any case, refer to the Raspbian documentation for information on how to install raspbian.
  • Method 2: Use The Instant Border Router a full SD Card image based on Raspbian already with 6LBR already pre-installed

Installation using .deb packages

6LBR can be installed using .deb packages. You can either build the packages yourself, or download the .deb file hosted on the 6LBR project website.

Download binaries package

Download the 6lbr package on the RPI if you do not plan to build it yourself. Check the releases page for the latest packages.

wget https://raw.github.com/wiki/cetic/6lbr/releases/cetic-6lbr_1.0-0_armhf.deb

Dependencies

If you intent to use tap-bridging, you need to install bridge-utils :

apt-get install bridge-utils

Specific Configuration for USB Slip-Radio motes

Due to a limitation in the kernel serial driver in the current Raspian distribution, you need to modify the system configuration. In the boot partition, open the /boot/cmdline.txt file and add the following configuration parameter :

dwc_otg.speed=1
This enables the support for the high baudrate usb-serial SLIP connector with the slip-radio mote.

Specific configuration for the Nooliberry radio

The Nooliberry radio communicates at 38400 baud over the UART.

  • remove the following parameters from /boot/cmdline.txt
    console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
  • note that you do not need dwc_otg.speed=1 in that file for the Nooliberry, due to the lower baudrate
  • Also, in /etc/inittab the following line at the bottom of the file should be commented out, because the Nooliberry needs to use the ttyAMA0:
    #Spawn a getty on Raspberry Pi serial line
    #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Installation

  • Install it :
    dpkg -i cetic-6lbr-1.0-0_armhf.deb 
  • Update the configuration files as needed. The /etc/6lbr folder will contain a list of sample configuration files. Take the one closest to your setup, rename it to 6lbr.conf, and tweak its settings using the documentation as reference.
  • Start the daemon
    /etc/init.d/6lbr start

Installation from sources

If you prefer to follow the latest updates rather then use the packages, you can build 6lbr frmo the sources. The master branch will always contain the latest tag and is a stable branch. The develop is the unstable work-in-progess, use at your own risk.

1. On your RPi, obtain the latest version of 6LBR:

apt-get update
apt-get install git
git clone https://github.com/cetic/6lbr
cd 6lbr/examples/6lbr
git checkout -b develop origin/develop #optional, if you want bleeding edge version (danger)

2. In 6lbr source directory, do the following commands. This take a long time because it generates a 6lbr binary for each of the supported modes, so you have time for a coffee:

make all_native
make tools

3. Install directly using the following command :

This deploys a 6LBR daemon on the native Linux, which will start at boot, using the configuration file in /etc/6lbr/6lbr.conf.

sudo make install

The /etc/6lbr/6lbr.conf file must be configured by hand using one of the example files in the same folder.

Building the packages yourself

If you would like to build the packages yourself, repeat steps 1 and 2 of the Installation from sources section, then

3. Build the .deb package :

make rpi_deb

Use the generated .deb to install and distribute on your other devices. This allows you to package your own customized version of 6lbr!

Instant Border Router (coming soon)

TODO

Clone this wiki locally