![Page 1: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/1.jpg)
1Samsung Open Source Group
Stefan SchmidtSamsung Open Source Group
Status Report for IEEE 802.15.4 and 6LoWPAN in Linux
Embedded Linux Conference San Jose 2015
![Page 2: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/2.jpg)
2Samsung Open Source Group
● Introduction
● Project History
● Mainline Status
● Current Work Areas
● Future Work
Agenda
![Page 3: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/3.jpg)
3Samsung Open Source Group
Introduction
![Page 4: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/4.jpg)
4Samsung Open Source Group
IEEE 802.15.4 / LoWPAN
● IEEE standard
● Low-Rate Wireless Personal Area Networks
● Specifies the physical and the MAC layer
● Simple addressing but no routing
● Star and Peer-to-Peer topologies supported
● Mesh topologies need some layers on top of these
● Applications are small battery powered devices like
sensors
![Page 5: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/5.jpg)
5Samsung Open Source Group
6LoWPAN
● A series of IETF specifications
● IPv6 over LoWPAN
● RFC4944: IPv6 Convergence Layer
● RFC6282: IPv6 Header Compression
● Updates and extensions in other RFC's
(see resources slide at the end)
![Page 6: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/6.jpg)
6Samsung Open Source Group
Motivation and Use Cases
● Battery powered sensors might not run Linux but
choose a smaller OS
● Main powered appliances might run Linux already
and would benefit from native 6LoWPAN support
● Border Routers / Gateways are likely to run Linux
● IEEE 802.15.4 chips could easily be integrated in
WiFi accesspoints or routers which already run
Linux
![Page 7: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/7.jpg)
7Samsung Open Source Group
Project History
![Page 8: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/8.jpg)
8Samsung Open Source Group
Early Days
● Started in 2008 as linux-zigbee project
on Sourceforge
● Mainly driven by Siemens AG
● Kernel code as well as lowpan-tools
userspace configuration utilities
![Page 9: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/9.jpg)
9Samsung Open Source Group
ZigBee Relations
● The name itself was very misleading
● The code only implemented the IEEE
802.15.4 layers and no ZigBee protocols or profiles at all
● ZigBee licensing seems incompatible with the GPL so no ZigBee support for the
Kernel
![Page 10: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/10.jpg)
10Samsung Open Source Group
Mainlining
● The first steps of mainlining moved the
core parts of the sourceforge repo over
around 2012
● Main Siemens developers withdraw over
time
● Community slowly took over
![Page 11: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/11.jpg)
11Samsung Open Source Group
Under New Management
● New project name to avoid confusion: linux-wpan
● New maintainer: Alexander Aring, Pengutronix
● Mailinglist moved to vger like most other Kernel
lists
● Patches are now handled on the list and picked up
through the Bluetooth tree
● http://wpan.cakelab.org, releases, docs
![Page 12: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/12.jpg)
12Samsung Open Source Group
Mainline Status
![Page 13: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/13.jpg)
13Samsung Open Source Group
Overview
● ieee802154 handles the MAC layer and
drivers (wpan0 interface)
● 6LoWPAN sits on top of the wpan devices
and acts as convergence layer to be used
by the normal IPv6 kernel stack
(lowpan0 interface)
● 6LoWPAN transparently handles the
fragmentation and defragementation
between the different MTU's (127 vs 1280)
as well as compressionsSource: Alexander Aring
![Page 14: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/14.jpg)
14Samsung Open Source Group
Current Mainline Status
● Basic ieee802154 layer with drivers for
various chips (at86rfxxx, mrf24j40, cc2520)
● 6LoWPAN implementation
● IP Header Compression
● Connection between Linux devices works
● Connection to Contiki devices works
![Page 15: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/15.jpg)
15Samsung Open Source Group
6LoWPAN Compressions
● Fragmentation handling is only one part
● A IPv6 header alone is 40 bytes which means it would use almost 1/3 of a ieee802154 frame
● Re-use of the 64 bit wpan address and various other compressions brings the smallest header down to 3 bytes
● On top there are compression modes for UDP and others
![Page 16: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/16.jpg)
16Samsung Open Source Group
Bluetooth LE Relationship
● IETF specification for IPv6 over
Bluetooth LE
● Still in draft phase (draft-ietf-6lo-btle)
● Common code is thus shared between
the wpan and Bluetooth subsystems
![Page 17: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/17.jpg)
17Samsung Open Source Group
Current Work Areas
![Page 18: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/18.jpg)
18Samsung Open Source Group
Overview
● Main work areas right now:
– New netlink framework nl80215 (Major part done)
– ieee802154 cryptography layer on top of nl802154
– Improvements in frame parsing and creation
![Page 19: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/19.jpg)
19Samsung Open Source Group
New Netlink Interface - Kernel
● nl802154 is the netlink interface between Kernel
and userspace
● Used for configuration (PAN ID, short address, etc)
● Inspired by nl80211 from the wireless developers
● Aligning these two should help to make the
code easier to understand for already established
hackers as well as newcomers
![Page 20: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/20.jpg)
20Samsung Open Source Group
New Netlink Interface - Userspace
● Available since Kernel version 3.19
● Needs a new userspace tool: iwpan
● Also inspired and aligned with iw from
the wireless community
● Old netlink interface still available but
considered deprecated
![Page 21: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/21.jpg)
21Samsung Open Source Group
MAC Layer Cryptography
● The IEEE802.15.4 specification defines AES 128 bit
cryptography to encrypt and or authenticate the
transmitted data
● 8 different security policies are defined (AES-CBC-MAC
and AES-CCM in various length)
● Almost all transceivers implement this in hardware
● While the Kernel will handle the interface to the
hardware nl802154 needs to be extended to handle
AES key setting, etc
![Page 22: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/22.jpg)
22Samsung Open Source Group
Next Header Compression
● RFC6282
● 6 LoWPAN Next Header Compression (NHC)
● Describes various compression formats
● Kernel framework allows for different modules to
handle one compression and decrompression
format each
● Mix and match different modules/formats
● Only UDP NHC is implemented right now
![Page 23: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/23.jpg)
23Samsung Open Source Group
Future Work
![Page 24: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/24.jpg)
24Samsung Open Source Group
IEEE 802.15.4
● Implement missing parts of the spec
– Coordinator support in MAC layer and wpan-tools
– Scan for available PANs
– Expose more MAC functionality through nl802154
● Improve existing drivers and add support for new chips
![Page 25: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/25.jpg)
25Samsung Open Source Group
6LoWPAN / NHC
● Run time configuration of NHC (Handled
by loading and unloading modules right
now)
● Implement more NHC modules for other
compression schemes
![Page 26: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/26.jpg)
26Samsung Open Source Group
Miscellaneous
● Routing Protocol for Low-Power and
Lossy Networks (RFC6550)
– SimpleRPL, unstrung, linux-rpl as current implementations
● Neighbor Discovery Optimization for
6LoWPAN (RFC6775)
● Test with more high level protocols on to
(CoAP, MQTT, etc)
![Page 27: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/27.jpg)
27Samsung Open Source Group
Related work
● ContikiOS implements 6LoWPAN as well
(Kernel implementation origins from it)
● Threads uses parts of 6LoWPAN for their
protocol
● 6LoWPAN over powerline
![Page 28: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/28.jpg)
28Samsung Open Source Group
Resources● RFC4919: 6LoWPAN Problem Statement
● RFC4944: Transmission of IPv6 Packets over IEEE 802.15.4 Networks
● RFC6282: Compression Format for IPv6 Datagrams
● RFC6550: RPL: IPv6 Routing Protocol for Low-Power and Lossy Networks
● RFC6775: Neighbor Discovery Optimization for 6LoWPAN
● RFC7400: 6LoWPAN-GHC: Generic Header Compression for 6LoWPAN
![Page 29: Linux Kernel Status Report for IEEE 802.15.4 & 6LoWPAN](https://reader030.vdocuments.us/reader030/viewer/2022032421/55a6c5a71a28ab81428b4866/html5/thumbnails/29.jpg)
29Samsung Open Source Group
Thank you.