Linux-based 6LoWPAN border routerDavid Hauweele
University of Mons

7 August 2013

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Table of Contents

1

Internet of Things

2

Problem and state of the art

3Implementation

4Validation

5Conclusion

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 2013

2 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Internet of Things
Internet today
Not only interconnected computers
Mobile Internet (smartphones, tablets)
Interconnected objects (sensors, automation, monitoring)David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 20133 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Internet of Things
Internet today
Not only interconnected computers
Mobile Internet (smartphones, tablets)
Interconnected objects (sensors, automation, monitoring)

Definition
The Internet of Things is a concept which seeks to integrate
physical objects to Internet with an adressing system which canuniquely identify them.
These objects are generally equipped with sensors and actuatorsin order to interact with their environment and they have limited
processing capabilities → smart objects.

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 20133 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Wireless Sensor NetworkFeatures
Wireless nodes
Tiny
Cheap (≈ 5 – 75 e→ 650 – 10000 Y)
Low power (≈ 20 – 25 mA)

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 20134 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Wireless Sensor NetworkFeatures
Wireless nodes
Tiny
Cheap (≈ 5 – 75 e→ 650 – 10000 Y)
Low power (≈ 20 – 25 mA)
Problems
Proprietary solutionsA lot of different solutions
Lack of interoperability
Need standard protocols
David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 20134 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Standardization
How to connect these wireless nodes to Internet ?
Physical and link layer → IEEE 802.15.4
Network layer → ZigBee or network IP (IPv6)
Upper layers → dedicated framework or TCP/UDP/ICMP

Source: http ://compixels.com

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 2013

5 / 34

Internet of Things

Problem and state of the artImplementation

Validation

Conclusion

Standardization
How to connect these wireless nodes to Internet ?
Physical and link layer → IEEE 802.15.4
Network layer → ZigBee or network IP (IPv6)
Upper layers → dedicated framework or TCP/UDP/ICMP

We use IPv6 on top of the IEEE 802.15.4 standard
Source: http ://compixels.com

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 2013

5 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

IEEE 802.15.4
IEEE 802.15.4
The IEEE 802.15.4[1] standard defines the physical layer (PHY) andmedia access control (MAC) for low-rate wireless personal area
networks. In particular, this standard is optimized to let smart objects
communicate with each other.
Low power → autonomy
Data rate ≈ 20 – 250 kbits/s
Small frames (127B)
Optimized for wireless sensor networks
Use the license-free band ISM (783 / 868 / 915 MHz – 2,4 GHz)David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 20136 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

6LoWPAN
Network layer IPv6
Very large number of adresses (2128 ≈ 3, 4 × 1038 )Directly exposed to Internet

Problems
The IPv6 network is optimized for an use with efficient links with low
loss-rate (Ethernet, Wi-Fi, ...). This poses harsh contraints on thenodes used within a wireless sensor network.
Large addresses make large headers → IPv6 header is 40B
MTU of 1280B → IEEE 802.15.4 frame is 127B

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 20137 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

6LoWPAN

Solution → 6LoWPAN [8]Adaptation layer between IPv6 and IEEE 802.15.4Adjust the IPv6 network to the performances of smart objects

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 20138 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

6LoWPAN

Solution → 6LoWPAN [8]Adaptation layer between IPv6 and IEEE 802.15.4
Adjust the IPv6 network to the performances of smart objects
ProvidesCompression of the IPv6 and UDP headers
Multiple compression schemes for IPv6 addresses
Transparent fragmentation of 1280B packets to fit 127B frames
Optimization of the IPv6 Neighbor Discovery Protocol

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 20138 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Example of node

F IGURE : Zolertia Z1
Source: http ://www.zolertia.com

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 2013

9 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Example of node

F IGURE : Raspberry Pi and MRF24J40
David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201310 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Table of Contents

1

Internet of Things

2

Problem and state of the art

3Implementation

4

Validation

5

Conclusion

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201311 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Border router
Border router
The border router is a special equipment of the wireless sensor
network. It allows the coordination of the network and provides agateway to the external world.

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201312 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

ConclusionBorder router

Roles of the border router
Forwarding between IPv6 and 6LoWPAN
IP configuration of the nodes (6LoWPAN-ND [9])Multihop routing (RPL [10])Context sharing

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201313 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Existing solutions
Existing 6LoWPAN border routers
Grinch [7]Arch Rock PhyNet Router [3]NanoRouter [4]JenNet-IP Border-Router [2]6LBR by the CETIC [6]David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201314 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Existing solutions
Existing 6LoWPAN border routers
Grinch [7]Arch Rock PhyNet Router [3]NanoRouter [4]JenNet-IP Border-Router [2]6LBR by the CETIC [6]Linux based solutions
Some of these solutions are based on Linux. However they do not use
a solution implemented directly into the Linux Kernel.

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201314 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Existing solutions

F IGURE : Architecture of the JenNet-IP Border-Router [2].
David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201315 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

LinuxThe Linux-ZigBee project
Support IEEE 802.15.4 and 6LoWPAN
Directly into the Linux Kernel
Support some IEEE 802.15.4 transceivers
Some features missing
Some bug remains

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201316 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Project goals
Goal
Realization of a border router on Linux based on the IEEE 802.15.4and 6LoWPAN (Linux-ZigBee) subsystem on a cheap and low power
embedded platform supporting Linux, the Raspberry Pi.

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201317 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Project goals
Goal
Realization of a border router on Linux based on the IEEE 802.15.4
and 6LoWPAN (Linux-ZigBee) subsystem on a cheap and low power
embedded platform supporting Linux, the Raspberry Pi.
Interests
Development, testing and debugging of the Linux-ZigBee project
Lessen the dependency on specific solutions
Solution based mainly on the kernel
Can be extended to numerous platforms

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201317 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Table of Contents

1

Internet of Things

2

Problem and state of the art

3Implementation

4

Validation

5

Conclusion

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201318 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Raspberry Pi

Installation
Cleaning of the Raspbian distribution
Configuration and optimization of the tools
Cross-compilation
Creation of backup tools for the SD card containing the OS→ reduce the time and size of backups with a factor ≈ 20 and 40
David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201319 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Backporting
Backporting
The Linux-ZigBee project was not available in the kernel version usedon the Raspberry Pi at the time (3.2.27). Since it wasn’t possible todirectly use a more recent version, it was necessary to backport thechanges from the development version.
Problems
3.2.27 is very oldAPI changes
Some subsystems didn’t exist

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201320 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Debugging tools
WSN-Tools
In order to ease debugging, we have developped new tools. The
project WSN-Tools [5] contains tools for use in IEEE 802.15.4
Wireless Sensor Networks. These tools allow the manipulation of MAC
802.15.4 frames, setting up a sniffer, injecting and replaying traffic
directly from the command line.
Interests
Ease debugging of IEEE 802.15.4 and 6LoWPAN networks
Record traces for later validation
Live inspection of the 802.15.4 traffic
Build customized framesDavid Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201321 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Bugs fixed in the Linux-ZigBee projectTransceiver’s driver (MRF24J40)
Missing interruption
Reception during transmission
Impact of the kernel architecture of the Raspberry Pi
Duplicated packets
6LoWPAN layer
IPHC link-local addresses compression/decompression
6LoWPAN fragmentation

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201322 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Additional features

Additional features
Audit driver → performances measurements and testing
Turbo mode (625Kbps)
Support for the 3.8 kernelDavid Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201323 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Table of Contents

1

Internet of Things

2

Problem and state of the art

3Implementation

4

Validation

5

Conclusion

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201324 / 34

Internet of ThingsProblem and state of the art

Implementation

Validation

Conclusion

Validation
Tests
Simulation of ping
Ping (normal, flood and broadcast)
UDP and TCP traffic
Fragmentation (ICMP and UDP)
Speed measurements
Benchmarking the driver
Static routing
Address autoconfiguration with radvd
Gateway IPv6/6LoWPAN
Interaction with a node using the RTOS Contiki

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201325 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Fragmentation

F IGURE : Fragmentation of an 5KB UDP datagram.

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201326 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Fragmentation and speed
60Speed (Kbps)

50403020
1009092949698

100

Size (Bytes)

F IGURE : Speed according to the size of the packet.
David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201327 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Table of Contents

1

Internet of Things

2

Problem and state of the art

3Implementation

4

Validation

5Conclusion

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201328 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Conclusion

New approach for the development of a 6LoWPAN border router :Based entirely on LinuxUse the new IEEE 802.15.4/6LoWPAN subsystem in the Linux
Kernel
3 Fonctionnality tests and performance measurements of thissubsystem
4 Correction of some bugs in this subsystem
5 One of the first working solution of this type1
2

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201329 / 34

Internet of Things

Problem and state of the art

ImplementationValidation

Conclusion

Conclusion

Debugging tools for Wireless Sensor Networks
Familiarization with Linux kernel development
Some patches are on their way to the Linux Kernel
Offer a new solution for the development of a 6LoWPAN borderrouter on LinuxDavid Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201330 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

Slideshttp://www.hauweele.net/∼gawen/files/6lowpan.pdf

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201331 / 34

Internet of Things

Problem and state of the art

ImplementationValidation

Conclusion

References I
IEEE Standard for Local and metropolitan area networks - Part
15.4 : Low-Rate Wireless Personal Area Networks (LR-WPANs).
IEEE Std. 802.15.4TM - 2011, 2011.
JenNet-IP border-router.
JN-AN-1110 (Application Note), 2011.
Arch Rock.
http://www.archrock.com, 2012.
Texas Instrument CC-6LoWPAN.
http://processors.wiki.ti.com/index.php/CC-6LoWPAN,
2012.

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201332 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

References II
WSN-Tools.
http://www.hauweele.net/˜gawen/wsn-tools.html,
2013.
M. Denis.
Rapport de stage CETIC : Prototype de border router Redwire
Econotag sous Contiki.
2012.
Maciek.
Grinch - simple 6lowpan RPL border router.
http://sixpinetrees.blogspot.be/2011/06/
grinch-simple-6lowpan-rpl-border-router.html, June
2011.

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201333 / 34

Internet of Things

Problem and state of the art

Implementation

Validation

Conclusion

References III
G. Montenegro, N. Kushalnagar, J. Hui, and D. Culler.
Transmission of IPv6 packets over IEEE 802.15.4 networks.
RFC 4944 (Draft Standard), 2007.
Z. Shelby, S. Chakrabarti, and E. Nordmark.
Neighbor discovery optimization for low power and lossy networks(6LoWPAN).
Internet-Draft ”draft-ietf-6lowpan-nd-21.txt”, Aug. 2012.
(Work in progress).
T. Winter, P. Thubert, A. Brandt, J. Hui, R. Kelsey, P. Levis,
K. Pister, R. Struik, J. Vasseur, and R. Alexander.
RPL : IPv6 routing protocol for low power and lossy networks.
RFC 6550 (Draft Standard), Mar. 2012.

David Hauweele (UMons)

Linux-based 6LoWPAN border router

07 Aug. 201334 / 34