Sensor networks are a fundamental building block of Internet of Things (IoT) applications, as they provide the interface to the physical world. In fact, many techniques used for resource-constrained IoT devices originated in the research area of Wireless Sensor Networks (WSNs). This talk will present the transition from research prototypes to standardized Internet protocols, give an overview how sensor networks are connected today (with a practical hands-on), and discuss a few challenges that need to be addressed in the future.
5. Connecting Sensor Networks | 5
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
First Proposals for Low-power IPv4 in 2003
A. Dunkels. Full TCP/IP for 8-bit Architectures.
In Proceedings MobiSys, San Francisco, CA, USA, 2003
Z. Shelby, P. Mahonen, J. Riihijarvi, O. Raivio, and P.
Huuskonen. NanoIP: The Zen of Embedded Networking.
In Proceedings ICC, Anchorage, AK, USA, 2003
http://contiki-os.org
7. Connecting Sensor Networks | 7
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
Low-power IP Stack
Layer Protocol
Application CoAP
Transport UDP
Network IPv6
Adaption 6LoWPAN
MAC CSMA
Radio Duty Cycling IEEE 802.15.4e / ContikiMAC
Physical IEEE 802.15.4
8. Connecting Sensor Networks | 8
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
Low-power IP Stack
Layer Protocol
Application CoAP
Transport UDP
Network IPv6 ( + RPL routing protocol )
Adaption 6LoWPAN
MAC CSMA
Radio Duty Cycling IEEE 802.15.4e / ContikiMAC
Physical IEEE 802.15.4
9. Connecting Sensor Networks | 9
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
Low-power IP Stack
Layer Protocol
Application CoAP
Transport UDP
Network IPv6
Adaption 6LoWPAN
MAC CSMA
Radio Duty Cycling IEEE 802.15.4e / ContikiMAC
Physical IEEE 802.15.4
10. Connecting Sensor Networks | 10
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
Low-power IP Stack
Layer Protocol
Application CoAP
Transport UDP
Network IPv6
Adaption 6LoWPAN
MAC CSMA
Radio Duty Cycling IEEE 802.15.4e / ContikiMAC
Physical IEEE 802.15.4
11. Connecting Sensor Networks | 11
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
Edge Networks
LoWPAN Local
server
Border Router
6LoWPAN adaption
PC
Backbone (LAN)
Internet
Router Server
19. Connecting Sensor Networks | 19
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
Firmware with good IPv6 support
Pick one that supports your model
Find lots of support online (flash router, DD-WRT, Tomato, …)
For instance
Tomato by Shibby (continuation of TomatoUSB)
http://tomato.groov.pl/
Good old WRT54GL has not enough flash
for good IPv6 builds
Model list
http://tomato.groov.pl/?page_id=69
Router
22. Connecting Sensor Networks | 22
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
Perform a hard reset
with the “30/30/30”
Use the Web interface
to upload new binary
Search for help
firmware name + router model
Flash Firmware
24. Connecting Sensor Networks | 24
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
ip -6 r add 2001:470:cafe:10::/64 via 2001:470:cafe::10
6LoWPAN prefix Gateway with
border router
25. Connecting Sensor Networks | 25
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
ip6tables -A FORWARD -p udp --dport 5683
–d 2001:470:cafe:10:<mote EUI-64> -j ACCEPT
See ip6tables manual for more options
(e.g., source filtering)
26. Connecting Sensor Networks | 26
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
Raspberry Pi
Shortcut: Use a Linux PC (avoids cross-compiling)
Beagle Bone (Black)
Gateway
27. Connecting Sensor Networks | 27
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
SSH or direct connection
Add static IPv6 address for routing (see slide 24)
sudo ip -6 a add 2001:470:cafe::10 dev eth0
Enable routing in the kernel
echo "1" > /proc/sys/net/ipv6/conf/all/forwarding
Install the border router
Gateway Configuration
29. Connecting Sensor Networks | 29
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
Get Contiki
git clone https://github.com/contiki-os/contiki
Relevant projects are in contiki/examples/ipv6/
Seek further help online
https://github.com/contiki-os/contiki/wiki
http://www.openmote.com/getting-started-with-contiki-and-openmote/
Check the 6lbr project by Cetic
http://cetic.github.io/6lbr/
Contiki OS
30. Connecting Sensor Networks | 30
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
Old RPL border router
rpl-border-router running on the mote
make TARGET=sky border-router.upload
tunslip6 (in contiki/tools/) running on the gateway
make tunslip6 (compile on gateway or with cross-compiler)
New native border router (recommended)
slip-radio running on the mote
make TARGET=sky slip-radio.upload
native-border-router running on the gateway
make border-router (compile on gateway or with cross-compiler)
Projects in contiki/examples/ipv6/
31. Connecting Sensor Networks | 31
Matthias Kovatsch
http://people.inf.ethz.ch/mkovatsc
sudo ./{tunslip6|border-router.native} 2001:470:cafe:10::1/64
Opens tun0 interface
Adds route into 6LoWPAN subnet
Starting the Border Router
$ sudo ./border-router.native 2001:470:cafe:10::1/64
Contiki 3.x started with IPV6, RPL
Rime started with address 1.2.3.4.5.6.7.8
MAC nullmac RDC br-rdc NETWORK sicslowpan
Tentative link-local IPv6 address fe80:0000:0000:0000:0302:0304:0506:0708
RPL-Border router started
********SLIP started on ``/dev/ttyUSB0''
opened tun device ``/dev/tun0''
ifconfig tun0 inet `hostname` up
ifconfig tun0 add 2001:470:cafe:10::1/64
ifconfig tun0
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.1.1 P-t-P:127.0.1.1 Mask:255.255.255.255
inet6 addr: 2001:470:cafe:10::1/64 Scope:Global
[…]
Setting prefix 2001:470:cafe:10::1
created a new RPL dag
Server IPv6 addresses:
0x806a6b8: =>2001:470:cafe:10:212:7400:da0:d748
0x806a6d8: =>fe80::212:7400:da0:d748
Border router address