6LoWPAN-installation

Version 1 (6lowpan group from 18-748 -, 05/05/2010 10:30 pm)

1 1 6lowpan group from 18-748 -
= Nano-RK 6LoWPAN Installation =
2 1 6lowpan group from 18-748 -
'''STEP 1: Install Linux'''
3 1 6lowpan group from 18-748 -
4 1 6lowpan group from 18-748 -
Install a Linux kernel >= 2.6.32.  The 6LoWPAN network driver has only been tested on 2.6.32 and
5 1 6lowpan group from 18-748 -
will not compile on previous versions.
6 1 6lowpan group from 18-748 -
7 1 6lowpan group from 18-748 -
'''STEP 2: Obtain an IPv6 Address'''
8 1 6lowpan group from 18-748 -
9 1 6lowpan group from 18-748 -
For 6LoWPAN to work you need to have an IPv6 address.  Unfortunately, most ISPs only provide
10 1 6lowpan group from 18-748 -
IPv4 connectivity.  If this is the case you can obtain an IPv6 address by using the Freenet6
11 1 6lowpan group from 18-748 -
tunnelling service.  You can find more info here: [http://gogonet.gogo6.com/page/freenet6-services].
12 1 6lowpan group from 18-748 -
You will need to register so that their service can give you an IPv6 address.
13 1 6lowpan group from 18-748 -
14 1 6lowpan group from 18-748 -
'''STEP 3: Obtain an IPv6 Network prefix'''
15 1 6lowpan group from 18-748 -
16 1 6lowpan group from 18-748 -
Because we will be distributing IPv6 addresses to each node you will also need to acquire a
17 1 6lowpan group from 18-748 -
network prefix.  Luckily, freenet6 also offers a service where you can get a full IPv6
18 1 6lowpan group from 18-748 -
network prefix.
19 1 6lowpan group from 18-748 -
20 1 6lowpan group from 18-748 -
'''STEP 4: Setup Edge Router Network Device Driver'''
21 1 6lowpan group from 18-748 -
22 1 6lowpan group from 18-748 -
go to the driver directory...
23 1 6lowpan group from 18-748 -
24 1 6lowpan group from 18-748 -
{{{
25 1 6lowpan group from 18-748 -
cd edge/driver/kernel-2.6.32
26 1 6lowpan group from 18-748 -
}}}
27 1 6lowpan group from 18-748 -
28 1 6lowpan group from 18-748 -
and compile the driver...
29 1 6lowpan group from 18-748 -
30 1 6lowpan group from 18-748 -
{{{
31 1 6lowpan group from 18-748 -
make
32 1 6lowpan group from 18-748 -
}}}
33 1 6lowpan group from 18-748 -
34 1 6lowpan group from 18-748 -
now start up the 6LoWPAN module...
35 1 6lowpan group from 18-748 -
36 1 6lowpan group from 18-748 -
{{{
37 1 6lowpan group from 18-748 -
sudo insmod sixlowpan.ko
38 1 6lowpan group from 18-748 -
}}}
39 1 6lowpan group from 18-748 -
40 1 6lowpan group from 18-748 -
{{{
41 1 6lowpan group from 18-748 -
sudo ifconfig 6lowpan0 up
42 1 6lowpan group from 18-748 -
}}}
43 1 6lowpan group from 18-748 -
44 1 6lowpan group from 18-748 -
Running "ifconfig" should now display "6lowpan0" as a network interface:
45 1 6lowpan group from 18-748 -
46 1 6lowpan group from 18-748 -
{{{
47 1 6lowpan group from 18-748 -
$ifconfig
48 1 6lowpan group from 18-748 -
6lowpan0 Link encap:Ethernet  HWaddr 92:9d:0b:44:66:c2
49 1 6lowpan group from 18-748 -
         inet6 addr: fe80::909d:bff:fe44:66c2/64 Scope:Link
50 1 6lowpan group from 18-748 -
         UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
51 1 6lowpan group from 18-748 -
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
52 1 6lowpan group from 18-748 -
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
53 1 6lowpan group from 18-748 -
         collisions:0 txqueuelen:0
54 1 6lowpan group from 18-748 -
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
55 1 6lowpan group from 18-748 -
}}}
56 1 6lowpan group from 18-748 -
57 1 6lowpan group from 18-748 -
Now start up gw6c...
58 1 6lowpan group from 18-748 -
59 1 6lowpan group from 18-748 -
{{{
60 1 6lowpan group from 18-748 -
sudo /etc/init.d/gw6c start
61 1 6lowpan group from 18-748 -
}}}
62 1 6lowpan group from 18-748 -
63 1 6lowpan group from 18-748 -
Running "ifconfig" again should now display the IPv6 prefix associated with 6lowpan0
64 1 6lowpan group from 18-748 -
65 1 6lowpan group from 18-748 -
'''STEP 5: Setup the Edge Router Radio Node'''
66 1 6lowpan group from 18-748 -
67 1 6lowpan group from 18-748 -
We now need to configure the radio node to be used by the edge router so that it may communicate
68 1 6lowpan group from 18-748 -
with the firefly network.
69 1 6lowpan group from 18-748 -
70 1 6lowpan group from 18-748 -
First go to the radio node directory...
71 1 6lowpan group from 18-748 -
72 1 6lowpan group from 18-748 -
{{{
73 1 6lowpan group from 18-748 -
cd edge/node
74 1 6lowpan group from 18-748 -
}}}
75 1 6lowpan group from 18-748 -
76 1 6lowpan group from 18-748 -
Compile and program a node...
77 1 6lowpan group from 18-748 -
78 1 6lowpan group from 18-748 -
{{{
79 1 6lowpan group from 18-748 -
make & make program
80 1 6lowpan group from 18-748 -
}}}
81 1 6lowpan group from 18-748 -
82 1 6lowpan group from 18-748 -
'''STEP 6: Setup the Edge Router User Level Process'''
83 1 6lowpan group from 18-748 -
84 1 6lowpan group from 18-748 -
Last thing to setup is the user level process.
85 1 6lowpan group from 18-748 -
86 1 6lowpan group from 18-748 -
Go to the user space process directory
87 1 6lowpan group from 18-748 -
88 1 6lowpan group from 18-748 -
{{{
89 1 6lowpan group from 18-748 -
cd edge/user
90 1 6lowpan group from 18-748 -
}}}
91 1 6lowpan group from 18-748 -
92 1 6lowpan group from 18-748 -
compile...
93 1 6lowpan group from 18-748 -
94 1 6lowpan group from 18-748 -
{{{
95 1 6lowpan group from 18-748 -
make
96 1 6lowpan group from 18-748 -
}}}
97 1 6lowpan group from 18-748 -
98 1 6lowpan group from 18-748 -
and run the process...
99 1 6lowpan group from 18-748 -
100 1 6lowpan group from 18-748 -
{{{
101 1 6lowpan group from 18-748 -
sudo ./edge
102 1 6lowpan group from 18-748 -
}}}
103 1 6lowpan group from 18-748 -
104 1 6lowpan group from 18-748 -
'''STEP 7: Setup the nodes'''
105 1 6lowpan group from 18-748 -
106 1 6lowpan group from 18-748 -
See the [http://www.nanork.org/wiki/6LoWPAN-api 6LoWPAN api] to find the correct way of programming
107 1 6lowpan group from 18-748 -
on the nodes.  Examples can be found in the apps/ folder.
108 1 6lowpan group from 18-748 -
109 1 6lowpan group from 18-748 -
'''STEP 8: Setup the MAC Addresses'''
110 1 6lowpan group from 18-748 -
111 1 6lowpan group from 18-748 -
You should now assign each firefly node in your network with a unique 16-bit address.  You can
112 1 6lowpan group from 18-748 -
do this by using the config-eeprom program.
113 1 6lowpan group from 18-748 -
114 1 6lowpan group from 18-748 -
{{{
115 1 6lowpan group from 18-748 -
./config-eeprom
116 1 6lowpan group from 18-748 -
}}}
117 1 6lowpan group from 18-748 -
118 1 6lowpan group from 18-748 -
'''STEP 9: Test'''
119 1 6lowpan group from 18-748 -
120 1 6lowpan group from 18-748 -
Congratulations you should now have a network of firefly nodes connected to the internet.  Test
121 1 6lowpan group from 18-748 -
that this is in fact true by going to [http://www.ipv6tools.org] and try pinging one of the nodes
122 1 6lowpan group from 18-748 -
in your network.