class: title, smokescreen, shelf, bottom, no-footer background-image: url(images/thread.svg) # 181U Spring 2020 ## Wireless Mesh Networks <style> h1 { border-bottom: 8px solid rgb(32,67,143); border-radius: 2px; width: 90%; } .smokescreen h1 { border-bottom: none; } .small.remark-slide-content.compact {font-size:1.4rem} .smaller.remark-slide-content.compact {font-size:1.1rem} .small-code.remark-slide-content.compact code {font-size:1.0rem} .very-small-code.remark-slide-content.compact code {font-size:0.9rem} .line-numbers{ /* Set "line-numbers-counter" to 0 */ counter-reset: line-numbers-counter; } .line-numbers .remark-code-line::before { /* Increment "line-numbers-counter" by 1 */ counter-increment: line-numbers-counter; content: counter(line-numbers-counter); text-align: right; width: 20px; border-right: 1px solid #aaa; display: inline-block; margin-right: 10px; padding: 0 5px; } </style> --- layout: true .footer[ - 181U - See acknowledgements ] --- class: compact # Agenda <audio controls> <source src="audio/mesh_02.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * Mesh Networks * IEEE 802.15.4 * Zigbee * Thread --- class: compact # IEEE 802.15.4 <audio controls> <source src="audio/mesh_03.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> A specification for use of license-free radio bands ![](images/space.png# w-10pct) ![](images/2020-04-17-15-45-00.png# w-00pct) --- class: compact # EEEE 802.15.4 Data Frame Format ![](images/2020-04-17-15-49-28.png# w-50pct fr) <audio controls> <source src="audio/mesh_04.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * Provides up to 102 Byte data payload capacity * Data sequence numbering to ensure that packets are tracked * Frame Check Sequence (FCS) validates error-free data - min. 16 Bytes = 128 bits = 0.512 ms @ 250 kbps - max. 133 Bytes = 1064 bits = 4.256 ms @ 250 kbps --- class: compact # IEEE 802.15.5 Device Types <audio controls> <source src="audio/mesh_05.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * Full Function Device - Talks to several devices - Normally powered - Can route messages * Reduced function deice - Talks to "parent" - May sleep - Network edge device --- class: compact # Network Topology Models ![](images/zigbeetopologies.jpg# w-50pct fr) <audio controls> <source src="audio/mesh_06.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * Star Network - Lowest complexity - Limited range - Coordinator can be a bottleneck * Mesh Network - Most complex - Highest relabilty - Fewer bottlenecks --- class:compact # Zigbee <audio controls> <source src="audio/mesh_07.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * Based on IEEE 802.15.4, provides the higher functions up to the application layer for WPAN - Mesh topology - Short range, - 20 to 250 kbps - 2.4 GHz, 915 MHz or 868 MHz - Channels 2 MHz wide with Direct Sequence - Spread Spectrum media access --- class: compact # Zigbee Applications <audio controls> <source src="audio/mesh_08.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> ![](images/space.png# w-20pct) ![](images/zigbeeapps.jpg# w-60pct) --- class: compact # Zigbee is Standardized at all layers <audio controls> <source src="audio/mesh_09.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> ![](images/space.png# w-20pct) ![](images/2020-04-17-16-52-20.png# w-60pct) --- class: compact # Zigbee Network ![](images/2020-04-30-09-56-23.png# w-40pct fr) <audio controls> <source src="audio/mesh_10.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> There are three logical device types * Coordinator (one per network) * Router * End device Only the end device is typically battery powered --- class: compact # Comparison of Roles at Network Layer ![](images/2020-04-30-10-03-21.png# w-40pct fr) <audio controls> <source src="audio/mesh_11.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> --- class: compact # Zigbee Application Layer ![](images/2020-04-30-10-08-14.png# w-50pct fr) <audio controls> <source src="audio/mesh_12.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * Application layer is defined for interoperation * Based upon "profiles" for specific types of applications - smart lighting - smart energy * Focus is on ensuring "common case" is support relatively seamlessly * Focus on "certification" that products conform to communication profiles (but not that they meet functional requirements) --- class: compact # What is Thread ![](images/2020-04-18-14-27-53.png# w-30pct fr) <audio controls> <source src="audio/mesh_13.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> A low power, secure and Internet-based mesh networking technology for IoT products. * Uses IPv6 (6LoWPAN) * Runs on existing 802.15.4 silicon from multiple providers * Legacy-free design with updated architecture - Designed with a new security architecture to make it - simple and secure to add and remove products - Supports 250+ products per network - Designed for very low power operation --- class: compact # Thread Network Topology <audio controls> <source src="audio/mesh_14.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> ![](images/space.png# w-20pct) ![](images/2020-04-18-14-30-02.png# w-60pct) --- class: compact # Network Topology Roles <audio controls> <source src="audio/mesh_15.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> ![](images/space.png# w-10pct) ![](images/2020-04-18-14-31-11.png# w-80pct) --- class: compact # Low Power Operation: "Sleepy Devices" ![](images/2020-04-18-14-33-18.png# w-40pct fl) <audio controls> <source src="audio/mesh_16.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * Sleeping devices poll parents for messages * Sleeping devices not required to check which allows lower power operation * Parents hold messages for sleeping devices * Sleeping device automatically switches parent connection is lost --- class: compact,small # Secure Commissioning ![](images/2020-04-18-14-33-18.png# w-40pct fl) <audio controls> <source src="audio/mesh_17.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * Simple Commissioning - User authorizes devices onto the network using smart phone or web - Can be done on network if there is a device with a graphical interface * DTLS Security session established between new device and commissioning device to authenticate and provide credentials * Once commissioning session is done, device attaches to network * MAC security used for all messages * Application level security is based on end-device requirements and application layer being used --- class: compact # No single point of failure ![](images/2020-04-18-14-36-45.png# w-40pct fl) <audio controls> <source src="audio/mesh_18.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * Dynamic Leaders - If Leader fails, another Router will become Leader * Router Promotion - Leader can promote Router Eligible devices to Routers to improve connectivity if required --- class: compact # Multiple Border Routers ![](images/2020-04-18-14-38-31.png# w-40pct fl) <audio controls> <source src="audio/mesh_19.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * Multiple Border Routers can be used for off network access - Devices operate without Border Router * What can be a Border Router? - Anything with an 802.15.4 radio and another physical layer - Home Wi-Fi router - Set top box - Smart Thermostat (802.15.4 and Wi-Fi) --- class: compact # Thread Network <audio controls> <source src="audio/mesh_20.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> ![](images/space.png# w-10pct) ![](images/2020-04-18-14-40-19.png# w-70pct) --- class: compact,small # The Thread Standard ![](images/2020-04-18-14-43-59.png# w-40pct fr) <audio controls> <source src="audio/mesh_21.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * Built on existing IEEE 802.15.4 standard * Uses 6LoWPAN for L3+ [RFC6282] - UDP traffic over modified IPv6 - Easily to gateway to the cloud or smartphones * Supports 250+ products per network * Just a firmware upgrade to existing 802.15.4 radios - Works in the 2.4 GHz ISM band world-wide * Security using Datagram Transport Layer Security (DTLS) [RFC6347] - Provides integrity, authentication and confidentiality --- class: compact # Limitations of 802.15.4 Frames <audio controls> <source src="audio/mesh_22.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * The maximum length of an 802.15.4 frame is 127 octets * Typical frame overhead of 22 octets leaves 105 octets * If you add the 21-byte encryption overhead (AES- CCM-128) then you only have 84 octets for L3+ * For IP-style routing, you’ll need source and destination addresses and an 8 octet UDP header - That is, 76 octets - (size of source + destination addresses) - IPv4 addresses are 4 octets and IPv6 addresses are 16 octets each --- class: compact # How Does Thread Fit ? <audio controls> <source src="audio/mesh_23.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> ![](images/2020-04-18-14-46-52.png# w-40pct fr) Thread defines only to L4 * Applications protocol is available for customization * UDP messaging and ACK * Supports multicast to the network - Potential for mDNS * Examples include: - Zigbee Smart Energy 2.0 - CoAP and Smart Objects - ECHONET Lite - Zigbee Cluster Library --- class: compact,small # 6LowPAN <audio controls> <source src="audio/mesh_24.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * IPv6 over Low-power Wireless Personal Area Networks - The 6LoWPAN IETF working group created a standard that allows IPv6 packets to be sent over IEEE 802.15.4 networks [RFC6282] * Encapsulation and header compression that makes IPv6 packets small enough to transmit in the 127-byte 802.15.4 frames and still leave room for payload * IPv4 is a complex protocol for a router - Many fields to look at and variable-length header * IPv6 header is a fixed length with no checksums - Easier for low-resource CPUs to route ![](images/space.png# w-20pct) ![](images/2020-04-18-14-50-32.png# w-60pct) --- class: compact # Summary <audio controls> <source src="audio/mesh_25.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> * Acknowledgements -- Slide Material drawn from: - "Wireless standards for IoT" by Ermanno Pietrosemoli: http://wireless.ictp.it/school_2019/slides/WirelessstandardsforIoT.pdf - "Zigbee: The Standard for IoT " The zigbee alliance - "Understanding the Thread Interface of Google's Nest Devices" by Mike Anderson - "Developing IoT Devices with Thread" https://www.threadgroup.org/Portals/0/documents/support/ThreadWebinarJun18final_2596_1.pdf - Cover image: https://www.threadgroup.org/BUILT-FOR-IOT/Commercial#NetworkTopology