Nano-RK 6LoWPAN Installation¶
STEP 1: Install Linux
Install a Linux kernel >= 2.6.32. The 6LoWPAN network driver has only been tested on 2.6.32 and
will not compile on previous versions.
STEP 2: Obtain an IPv6 Address
For 6LoWPAN to work you need to have an IPv6 address. Unfortunately, most ISPs only provide
IPv4 connectivity. If this is the case you can obtain an IPv6 address by using the Freenet6
tunnelling service. You can find more info here: "You will need to register so that their service can give you an IPv6 address.
Once you have registered, you will have to download the 'gw6c' software. This can be obtained from
the previous website, or through your distro's package management system. The latest versions are
available in the repositories for Ubuntu and Gentoo. When the software has been installed, it can
be configured by editing 'gw6c.conf'. This file is installed with gw6c, on Ubuntu it is located at
'/etc/gw6c/gw6c.conf', and on Gentoo it is at '/etc/gateway6/gw6c.conf'. You will have to enter your
login information, and change the server from 'anon' to 'broker'.
Full installation details for Gentoo can be found at [http://www.gentoo.org/doc/en/ipv6.xml":http://gogonet.gogo6.com/page/freenet6-services]. under
the section for freenet6. The procedure is similar for Ubuntu.
STEP 3: Obtain an IPv6 Network prefix
Because we will be distributing IPv6 addresses to each node you will also need to acquire a
network prefix. Luckily, freenet6 also offers a service where you can get a full IPv6
To do this make sure to change your gw6c.conf configuration file to 'router':
Also change the Network interface to 6lowpan0:
If you notice problems, make sure the 6lowpan driver is loaded and that the interface exists.
Also make sure that 'radvd' is installed if it was not pulled down as a dependency of gw6c. It
is required to send router advertisements to the network. Note however that gw6c will configure
and start radvd, you should not have to configure it manually. In fact, doing so could prevent
gw6c from working correctly.
STEP 4: Setup Edge Router Network Device Driver
go to the driver directory...
and compile the driver...
now start up the 6LoWPAN module...
sudo insmod sixlowpan.ko
sudo ifconfig 6lowpan0 up
Running "ifconfig" should now display "6lowpan0" as a network interface:
$ifconfig 6lowpan0 Link encap:Ethernet HWaddr 92:9d:0b:44:66:c2 inet6 addr: fe80::909d:bff:fe44:66c2/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Now start up gw6c...
sudo /etc/init.d/gw6c start
Running "ifconfig" again should now display the IPv6 prefix associated with 6lowpan0
$ifconfig 6lowpan0 Link encap:Ethernet HWaddr 16:38:96:c7:4f:48 inet6 addr: 2001:5c0:1107:9b00::1/64 Scope:Global inet6 addr: fe80::1438:96ff:fec7:4f48/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:298 (298.0 B)
STEP 5: Setup the Edge Router Radio Node
We now need to configure the radio node to be used by the edge router so that it may communicate
with the firefly network.
First go to the radio node directory...
Compile and program a node...
make && make program
STEP 6: Setup the Edge Router User Level Process
Last thing to setup is the user level process.
Go to the user space process directory
and run the process...
STEP 7: Setup the nodes
See the 6LoWPAN api to find the correct way of programming
on the nodes. Examples can be found in the apps/ folder.
STEP 8: Setup the MAC Addresses
You should now assign each firefly node in your network with a unique 16-bit address. You can
do this by using the config-eeprom program.
STEP 9: Test
Congratulations you should now have a network of firefly nodes connected to the internet. Test
that this is in fact true by going to [http://www.ipv6tools.org] and try pinging one of the nodes
in your network.