2017/2018

The Things

Johan Lukkien John Carpenter, 1982

Johan J. Lukkien, [email protected] 1 TU/e Informatica, System Architecture and Networking 13-Sep-17 Guiding questions

• What to think about things and how are they connected?

Johan J. Lukkien, [email protected] 2 TU/e Informatica, System Architecture and Networking 13-Sep-17 Resource limitations

• Memory: available flash (‘program code’) and ram • Processor: Mhz, instruction set expressive power, address width, ability to manage its power • Energy: available Joules and how they are replenished • Communication: required transceive power, bps, complexity of protocols

• These are connected, mainly through energy – Ram required power to retain state – Processor complexity and Mhz require energy – Low memory needs fewer address bits – Simpler network protocols and smaller bandwidths lead to lower power transceivers

Johan J. Lukkien, [email protected] 3 TU/e Informatica, System Architecture and Networking 13-Sep-17 RFC 7228: devices

• Three classes representing memory (hence processor) limitations

• C0: dependent on proxies for secure Internet inclusion • C1: only low resource protocols • C2: can run most Internet protocols • (C9: phone, tablet, desktop)

Johan J. Lukkien, [email protected] 4 TU/e Informatica, System Architecture and Networking 13-Sep-17 Energy limitation and communication policies

Johan J. Lukkien, [email protected] 5 TU/e Informatica, System Architecture and Networking 13-Sep-17 Some private taxonomy

Address Processor Actively Flash RAM space (type) OS Energy Operation reachable Example

small External, or not designed RFID tag, code several battery + for reachability ISO 18000- A memory bytes <= 8bits ~100Hz no wakeup Externally activated, simple read/write via multi-hop 6c no, or Few <=16 ~1Mhz simple mechanically activated, just generates no; needs B <= 32K hundreds bits TMS430 executive mechanical some data proxy power switch

Few <=16 ~1Mhz Contiki, simple, fixed external behavior, needs duty cycled, simple C <=32K hundreds bits TMS430 TinyOS battery proxy, simple sensing needs proxy sensor mote capable of managing most constrained <=16 ~1Mhz Contiki, battery + IP protocols, sensing, actuating, self-managed D <=32K ~10K bits TMS430 TinyOS recharge processing on/off behavior Crossbow battery + <=32 ~1-10Mhz Contiki, recharge, complete IP endpoint behavior, limited E <=256K ~32K bits ARM TinyOS mains storage yes Jennic mote battery + ~Ghz recharge, F ~GB ~500Mb 32 bits ARM Linux mains full fledged embedded computer system yes Rasberry PI G phones, laptops, servers

Johan J. Lukkien, [email protected] 6 TU/e Informatica, System Architecture and Networking 13-Sep-17 Example: A battery-less light switch • The switch is pressed.

• The node turns on and sends a Route Request broadcast message for a known destination. – it boots an OS in the process! • Using Route Reply, it finds the route to the luminaries.

• Using the discovered route, the node transmits 30mA @ 3.3V for 60ms the control signal (turn on/off) to the luminaries. Running FreeRTOS and capable • The luminary node acknowledges the reception of transmitting compressed IP of the control signal. packets (6LoWPAN). From: 6LoWPAN: IPv6 for • The switch node does multiple retries to transmit Battery-less Building Networks, that control signal as long as the node stays on MSc thesis of N.A. Abbasi, TU/e and until an ACK is received.

Johan J. Lukkien, [email protected] 7 TU/e Informatica, System Architecture and Networking 13-Sep-17 Functionality of things

• ‘Things’ must be capable to perform the required sensing, actuation, computation, communication – functional requirements

• In addition, because they are many: – (secure) bootstrap, (secure) network association • upon (re)starting a device must load its code from a trusted source • it must join the correct network – secure communication – (secure) software update, over the network • updates are inevitable and must remain safe – … part of the life cycle

Johan J. Lukkien, [email protected] 8 TU/e Informatica, System Architecture and Networking 13-Sep-17 Concerns and management

- can it join a network? • A,B,C: need trusted partner - secure bootstrapping (proxy) - can it be configured? • A,B: very little; C: limited - adapting operational parameters - e.g. sensing, communication frequency - can it be updated (over the air)? • From D onwards - new firmware, new software, new application components - can it run IP? • From E onwards; D runs - serve as IP endpoint limited protocols - can it secure itself? • A,B,C: need trusted partner; - independent node D: limited

Johan J. Lukkien, [email protected] 9 TU/e Informatica, System Architecture and Networking 13-Sep-17 Some private taxonomy

Address Processor Actively Flash RAM space (type) OS Energy Operation reachable Example

small External, or not designed RFID tag, code several battery + for reachability ISO 18000- A memory bytes <= 8bits ~100Hz no wakeup Externally activated, simple read/write via multi-hop 6c no, or Few <=16 ~1Mhz simple mechanically activated, just generates no; needs B <= 32K hundreds bits TMS430 executive mechanical some data proxy power switch

Few <=16 ~1Mhz Contiki, simple, fixed external behavior, needs duty cycled, simple C <=32K hundreds bits TMS430 TinyOS battery proxy, simple sensing needs proxy sensor mote capable of managing most constrained <=16 ~1Mhz Contiki, battery + IP protocols, sensing, actuating, self-managed D <=32K ~10K bits TMS430 TinyOS recharge processing on/off behavior Crossbow battery + <=32 ~1-10Mhz Contiki, recharge, complete IP endpoint behavior, limited E <=256K ~32K bits ARM TinyOS mains storage yes Jennic mote battery + ~Ghz recharge, F ~GB ~500Mb 32 bits ARM Linux mains full fledged embedded computer system yes Rasberry PI G phones, laptops, servers

Johan J. Lukkien, [email protected] 10 TU/e Informatica, System Architecture and Networking 13-Sep-17 What’s new with IoT? • There are many things • Their numbers and far-reaching – #things / person >> 1 (50B in 2020) locations enable entirely new – hence, things need to talk to each applications other or to a database – large-scale data collection • about …..? – data-based applications – self-* properties, autonomy – manufacturers probing into the • self management, self healing, … deployed systems – scalability, at access networks • many things sharing your wireless LAN • special infra structure outdoor • Their scale and locations comes • Things have limitations with complex concerns – low processing power, memory, low – device/data handling, ownership capacity network – security, safety, application • size IP packet comparable to available reliability memory • at a compelling scale – sometimes battery operated – application development, – embedded: no UI deployment, management Johan J. Lukkien, [email protected] 11 TU/e Informatica, System Architecture and Networking 13-Sep-17 Guiding questions

• What to think about things and how are they connected?

Johan J. Lukkien, [email protected] 12 TU/e Informatica, System Architecture and Networking 13-Sep-17 How do end points communicate?

Johan J. Lukkien, [email protected] 13 TU/e Informatica, System Architecture and Networking 13-Sep-17 Networking approaches

• Physical neighbors: – Shared medium medium shared – Point-to-point • In case of physical separation – switching

– connecting networks point to point – … multiple interfaces for some nodes

• Packet oriented • Full connectivity by – (intelligent) flooding – routing

Johan J. Lukkien, [email protected] 14 TU/e Informatica, System Architecture and Networking 13-Sep-17 Flooding

Johan J. Lukkien, [email protected] 15 TU/e Informatica, System Architecture and Networking 13-Sep-17 Wired Wireless

Battery Energy limitations will Energy limitations will determine uptime determine uptime, communication behavior communication behavior and and protocols. In principle, protocols; nodes must the wire could be used for manage their sleeping power; and at least for behavior; nodes can be waking up nodes mobile Mains No real need for low Wireless is there for resources except cost and convenience (absence of energy; this class captures other infra - outdoors) and ‘regular’ office/home infra for connecting to mobile structure devices wireless nodes; powerful wireless protocols can be used, always on

Johan J. Lukkien, [email protected] 16 TU/e Informatica, System Architecture and Networking 13-Sep-17 The LANs • Taken from Wikipedia (Nov. 2015) • Important wireless: – the 3 group (ethernet, PoE) – the 11 group (‘WiFi’) – the 15 group (wireless PAN) • Within IEEE 802.15 – 1x: – 4x: PHY/MAC layer for ZigBee, 6LoWPAN, Thread, WirelessHART, MiWi ContikiMAC, 6Tisch… • Within the IEEE 802.11 LANs: – 11p: ITS – 11e: QoS – 11s: meshing – 11ah: low power, low interference Johan J. Lukkien, [email protected] 17 TU/e Informatica, System Architecture and Networking 13-Sep-17 Example: which (IP) protocols occur in a lighting network?

• Connectivity: – 6LoWPAN (= adaptation for IP/802.15.4), UDP, TCP [sometimes] – RPL, RIP, MPL: routing, multicasting – DTLS: packet based security

• Application – Trickle: application protocol for dissemination to all devices in a network – RESTful style • REST plus HTTP methods • CoAP – constrained application protocol – DNS-SD using mDNS, or CoAP directory: for service discovery – M2M protocols, e.g. MQTT/TCP Courtesy of Dee Denteneer

Johan J. Lukkien, [email protected] 18 TU/e Informatica, System Architecture and Networking 13-Sep-17 Characteristics of wireless communication

• A wireless network is like a shared channel to put data on – standards must address this sharing, avoiding destructive interference

• Wireless communication is intrinsically subject to errors – received signal is the energy collected over time – can always be disturbed by an external party (a different protocol family in same frequency), or by another neighbor than the sender – quality depends on environment properties (e.g. reflections)

• Wireless communication is energy-hungry, particularly when compared to the energy used by embedded processors

• Standards must address the unreliability, sharing and energy use

Johan J. Lukkien, [email protected] 19 TU/e Informatica, System Architecture and Networking 13-Sep-17 What techniques are applied? • FDMA: multiple channels • CSMA: ‘try before you cry’ (frequency division multiple access) (carrier sense multiple access) – channel hopping with – Clear Channel Assessment: Aloha synchronization – with collision avoidance, detection or • e.g. 802.15.1 (Bluetooth), 6tisch, resolution – cell formation / independent • e.g. IEEE 802.15.4 (ZigBee): random domains distribution of retries • e.g. 3/4G, IEEE 802.11 (WiFi) – with priority • TDMA: division in timeslots • e.g. IEEE 802.11e (WiFi + QoS) (time division multiple access) • CDMA – timeslots with schedules, time (code division multiple access, as in 4G) synchronization – concurrent access of the medium • e.g. WirelessHART, DECT, with coded packets IEEE 802.15.4 in superframe mode – admits decoding even with – in combination with cell formation interference • Master-Slave • Regulation – e.g. an access point as master – duty cycle restrictions (e.g. 1% per – beacon-based signaling station) • e.g. IEEE 802.11 (WiFi), Bluetooth, – frequency assignment IEEE 802.15.4 Johan J. Lukkien, [email protected] 20 TU/e Informatica, System Architecture and Networking 13-Sep-17 Wired Wireless

Shared CSMA/CD: coax ethernet MA/CA: (pure) Aloha medium CSMA/CR: CAN CSMA/CA: Wifi, Zigbee TDMA TDMA: Wireless Hart token passing: profibus Master/Beaconing: Wifi, Zigbee Master/Slave: ethercat FDMA + channel hopping: bluetooth (,profibus) (low energy), 6tisch CDMA: virtual point to point (4G), Chirp Spread Spectrum UWB Point to point Switched ethernet: PoE FDMA Common way to set up Dedicated frequencies for long-haul larger networks using transport: satellite switches and routers

Johan J. Lukkien, [email protected] 21 TU/e Informatica, System Architecture and Networking 13-Sep-17 Wired Wireless Outdoor No common infra structure City WiFi available; some initiatives 4G/5G: LTE adaptation, LongRange via light poles or other low power WAN technologies relatively dense infra

Indoor Standard wired infra WiFi structure using UTP, fiber, Bluetooth switches, bridges and IEEE 802.15.4 based technologies routers

Johan J. Lukkien, [email protected] 22 TU/e Informatica, System Architecture and Networking 13-Sep-17 Energy, in low capacity environment

• Radio communication is a major contributor to energy consumption – don’t use it 

• Applied techniques (combinations, need support at multiple layers) – asymmetry • low-power nodes are 1 hop away from well-powered infra – control the transmit / receive power • trade connectivity for energy – duty cycle • switch node or radio on and off periodically – demand driven • event driven control of radio (wakeup radio, or push mode) with asymmetry – push / pull strategies • let the low power partner always be the first – trade power for range and throughput • special network technologies, special physical layers Johan J. Lukkien, [email protected] 23 TU/e Informatica, System Architecture and Networking 13-Sep-17 Metrics (which is how to judge all this)

• throughput • overhead – number of bytes per time unit • scalability – for a station: bytes per interval – as utilization • latency or delay • increasing the amount of communication – time difference in initiation of a • increasing # stations transmission and the start of the • e.g. CSMA/CA scales badly receipt when increasing # stations while – consist of processing delay, TDMA scales well transmission delay and queueing – as dimensioning delay • LoRaWan can scale the number • jitter of gateways with the number of – variations in timing, e.g. delay jitter, low-power nodes throughput jitter • predictability • fairness, ability to prioritize • reliability – fairness: bound on delay in access – e.g. resilience agains interference to a transmission channel • power – or fair share in competition • range Johan J. Lukkien, [email protected] 24 TU/e Informatica, System Architecture and Networking 13-Sep-17 Qualitative metrics

• +: improves (e.g. ‘Latency +’ means improves (reduces) Latency) • -: makes worse • o: no effect/not applicable Johan J. Lukkien, [email protected] 25 TU/e Informatica, System Architecture and Networking 13-Sep-17 Guiding questions

• What to think about things and how are they connected?

Johan J. Lukkien, [email protected] 26 TU/e Informatica, System Architecture and Networking 13-Sep-17