Documente Academic
Documente Profesional
Documente Cultură
Outline
About 6lowpan 6LowPAN implementations BLIP
Blip IPv6 stack
IETF 6LowPAN header format TinyOS-2.1.1 installation Test Blip UDPEcho Program (Demo) More Demos
2
About 6LowPAN
The 6lowpan group has defined encapsulation and header compression mechanisms that allow IPv6 packets to be sent to and received from over IEEE 802.15.4 based networks. This enable embedded devices to participate in the Internet of Things.
6LowPAN implementations
There are 3 well known implementations
DSP: understand whats coming. HC1: Network layer compression and its LSB denotes if HC2 will be used or not. HC2: Transport layer compression IP: Hop limit UDP: UDP header compressed
7
DSP (1 byte)
00xxxxxx Not-lowpan frame 01xxxxxx LowPAN IPv6 address header
01xxxx01 Uncompressed 01xxxx10 Full compressed and follow by HC1 field
DSP : Compressed LowPAN IPv6 header HC1: Src & Dest add local, next header = UDP IP: Hop limit UDP: 8-byte header (uncompressed)
HC1 HC1
Normally HC1 indicates 1 in its last bit if there is HC2 HC2: UDP/TCP/ICMP compression
10
11
DSP: Compressed IPv6 HC1: Src & Dest add local, next header= UDP IP: Hop limit UDP: HC2+3 bytes header (compressed) Source port and destination port with the range of 0xF0B0-0xF0BF (4 bit)
12
13
TinyOSTinyOS-2.1.1 configuration
Edit add
$TOSROOT/tinyos.sh file sudo gedit /opt/tinyos-2.1.1/tinyos.sh /tinyos.jar to the end of CLASSPATH to be : CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java/tinyos.j ar
Maybe you will need to change the owner of the tinyos-2.1.1 folder
sudo chown R username:group /opt/tinyos-2.1.1/
14
Test Blip
Add an 802.15.4 interface to the device (Edge router). 2. Upload your program image on the motes (node router) 3. Compile and run the routing driver (on pc/laptop). 4. Communicate with motes via IPV6
1.
15
16
17
18
19
Router driver loads its configuration from $TOSROOT/support/sdk/c/blip/serial_tun.conf. You can change channel # and IPv6 prefix fec0:: used.
20
4-Test connection
ping6 fec0::ID
fec0::/10 This is a site-local prefix offered by IPv6. The prefix fec0:: is coming from serial_tun.conf file and the suffix is coming from Node Id.
21
UDPECho Demo
22
UDPEcho program
interface UDP { command error_t bind(uint16_t port); command error_t sendto(struct sockaddr_in6 *dest, void *payload, uint16_t len); event void recvfrom(struct sockaddr_in6 *src, void *payload, uint16_t len, struct ip_metadata *meta); } bind command to open a port and start listening directly. sendto command to send a message and recvfrom event fire when there is new message received. Wire UDP interface to UdpSocketC component.
23
24
25
26
27
28
More Demos
29
TCPEcho Demo
Use tcp to build http server
TelosB mote fec0::1
30
31
Further Reading :
http://docs.tinyos.net/tinywiki/index.php/BLIP_T utorial http://docs.tinyos.net/tinywiki/index.php/Installi ng_TinyOS_2.1.1 http://tools.ietf.org/html/rfc4944 http://smote.cs.berkeley.edu:8000/tracenv/wiki/ blip 6LowPAN tutorial . Evaluating 6lowPAN implementations in WSNs byRicardo Silva, Jorge S Silva and Fernando Boavida, Department of Informatics Engineering, University of Coimbra Installation of blip under Ubuntu 10.04.pdf
32
33