0% found this document useful (0 votes)
13 views

IoT Protocol Stack - Adaptive layer

The document discusses Low-Power Wide-Area Networking (LPWAN) technologies, focusing on LoRaWAN as a leading solution for IoT applications. It outlines the architecture, security features, and various use cases such as smart metering, industrial asset monitoring, and smart cities. Additionally, it touches on 6LoWPAN, which enables efficient IPv6 communication over low-power networks, facilitating connectivity for small devices.

Uploaded by

nayakananya2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

IoT Protocol Stack - Adaptive layer

The document discusses Low-Power Wide-Area Networking (LPWAN) technologies, focusing on LoRaWAN as a leading solution for IoT applications. It outlines the architecture, security features, and various use cases such as smart metering, industrial asset monitoring, and smart cities. Additionally, it touches on 6LoWPAN, which enables efficient IPv6 communication over low-power networks, facilitating connectivity for small devices.

Uploaded by

nayakananya2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 59

BCSE401L: Internet of Things

Avuthu Avinash, Ph.D.,


Assistant Professor, SCOPE, VIT Chennai
The Road To Low Power Wide Area
Multimedi Internet
a M2
of
& M
Things
Voice

GB’s/ MB’s/ KB’s/ bytes/


month month month month

12/16/2015 Information – Property of Semtech Corporation


Where Does LPWAN Fit

Local Area Low Power Wide Area Cellular Network


Network Short (LPWAN) Tradition
Range Communication Internet of Things al M2M

 40% 45% 15%


Low power
 Well established
standards In
consumption
Low cost
Existing
coverage
building Positioning High data
Battery High data rate rate
Autonomy
 Live
Provisioni
Emerging Total cost of
standards ownership
ng
Network
cost &
dependen
cies
12/16/2015
LPWA Technology

• A new set of wireless technologies has received a lot of attention from the
industry, know as
– Low-Power Wide-Area (LPWA) networking technology

• unlicensed-band LPWA technology


– LoRaWAN

• licensed-band LPWA technology


– NB-IoT and Other LTE Variations
LoRa Alliance
• Initially, LoRa was a PHY layer modulation scheme
– developed by a French company “Cycleo”; Later, Cycleo was acquired by
Semtech.
– Semtech LoRa: PHY modulation technology available by multiple chipset vendors

• The LoRa Alliance is a technology alliance committed to


– enabling large scale deployment of Low-Power Wide Area Networks (LPWAN) IoT
– publishing LoRaWAN specifications for LPWAN

• LoRaWAN is a premier solution for global LPWAN deployments at present


– Its MAC-layer protocol built on top of LoRa PHY

LoRaWAN
Protocol Stack
LoRa PHY layer
• Semtech LoRa PHY

• Uses a variation of chirp spread spectrum (CSS)


modulation
 it allows demodulation below the noise floor.
So, offers robustness to noise and interference

 manages a single channel occupation by different spreading


factors (SFs) LoRa Module: SX1276
868MHz band
• Main unlicensed sub-GHz frequency bands
 433 MHz
 779–787 MHz
 863–870 MHz ( In India: 868 MHz)
 902–928 MHz

LoRa GPS Shield


with Arduino LoRa Shield for Arduino
LoRaWAN MAC Frame Format

Node Addressing: endpoints are also known by their 32-bit end device address
• 7 bit for network + 25 bit for devices
LoRaWAN Address Space
• LoRaWAN uses a number of identifiers for devices, applications and gateways.

 DevAddr - 32 bit device address (non-unique)

 DevEUI - 64 bit end-device identifier, EUI-64 (unique)

 AppEUI - 64 bit application identifier, EUI-64 (unique)

 GatewayEUI - 64 bit gateway identifier, EUI-64 (unique)

• In LoRaWAN , DevEUI is assigned to the device by the chip manufacturer or


the authorized owner.

• However, all local communication is done with a dynamic DevAddr


– of which 7 bits are fixed for the Network, leaving 25 bits can be assigned
to
individual devices.

* EUI-64 (Extended Unique Identifier) has a method we


can use to automatically configure IPv6 host addresses.
LoRaWAN Gateway
• LoRa gateway is deployed as the centre hub of a star
network architecture.

• It uses multiple transceivers and channels


– It can demodulate multiple channels at once
Dragino
LoRa Gateway Device
– It can also demodulate multiple signals on the same channel
simultaneously

• LoRa gateways serve as a transparent Bridge relaying


data between endpoints

• The endpoints use a single-hop wireless connection to


communicate with one or many gateways

• Data rate varies depending on the frequency


bands and adaptive data rate (ADR)

– ADR is an algorithm that manages data rate and


radio signal for each endpoint.
LoRaWAN Security
• LoRaWAN supports to protect communication and data privacy across the
network

• LoRaWAN endpoints must implement two layers of security

– Network security applied in MAC layer


• Authentication: do authentication of the endpoints
• Confidentiality: encrypt LoRaWAN packets using AES

• Each endpoint implements a network session key (NwkSKey)


• Integrity: The NwkSKey ensures data integrity using message integrity code (MIC) of every
data packet

– Data security applied at the end points (end device / application server)
• second layer of security by an application session key (AppSKey)
• performs encryption / decryption between the Endpoint and its Application server.
• it computes and checks the application-level MIC

• LoRaWAN service provider does not have access to the application payload if it is
not allowed
LoRa® Network Features

Long Range Max Lifetime Multi Usage Low


 Greater than  Low power  High Cost
 Minimal
cellular optimized capacity infrastructure
 Deep indoor  10-20yr lifetime  Multi-tenant  Low cost end-node
coverage  >10x vs cellular  Public  Open SW
 Star topology M2M network

12/16/2015 Information – Property of Semtech Corporation


Differentiators & Benefits

True Location Bidirectional LoRaWAN Security


 In/out  Acknowledge  Global
 Unique ID
door  Scalable Standard  Applicatio
 Accurate Capacity  True Mobility n
 No  Broadcast  Seamless
 Network
Battery
Impact
 Roaming

12/16/2015 Information – Property of Semtech Corporation


Building Blocks

Networ
Base k
station Server
s

Applicatio
Sensor
ns
s
Module
s

12/16/2015 Information – Property of Semtech Corporation


Architecture
Modulation LoRa RF (Spread
Spectrum)
Range ~ 15 Km
End Device
Throughput 0.3 to 27 Kbps

End Device
Cloud LoRa
Gateway

Email
End Device LoRa Network TCP/IP SSL
Gateway Server Application
Server

Customer IT

End Device Type of Traffic Data packet


Payload ~ 243 Bytes
Remote
Security AES Encryption Monitoring
Spectrum
o Orthogonal sequences: 2 messages, transmitted by 2 different objects, arriving
simultaneously on a GW without interference between them (Code Division
Multiple Access technique: CDMA , used also in 3G).
o Spread Spectrum: Make the signal more robust , the more the signal is spread the
more robust. Less sensitive to interference and selective frequency fadings .
Gain when recovering the
Amplitude
initial signal
SF 12: High gain, low data rate
Far devices and deep indoor

SF 9: Average gain, average


data rate

SF 7: Low gain , high data


rate
"Spread" signal
transmitted
with constant rate

Frequency

Spectrum: unlicensed, i.e. the 915 MHz ISM band in the US, 868 MHz in Europe
Protocol and message structure

Preamble Header Payload

Synchro Basic info User Data

 Chirp (chirp) : synchronization preamble to allow for


recognition of message
 Header : basic information for message size and error
correction
 Payload (flexible) : user data ranging from 1 to 242 bytes
C O MP A R A TIF L O R A S IG F O X
HUTILES
o w m u c h da t a c a n b e t

Uplink – P A YL O A D/DEBITS
ra: n s m it te d Time on Air
(for 12 bytes sent)
Data rate
(for 12 bytes sent)
Overhead Max Payload
LoRa SF7 62 ms 1556 bits/s
LoRa 17 bytes Up to 242 bytes LoRa SF12 1,48 sec 64,74 bits/s

Downlink : Time on Air Data rate


(for 8 bytes sent) (for 8 bytes sent)
Overhead Max Payload
LoRa SF7 56 ms 1142 bits/s
LoRa 15 bytes Op to 242 bytes LoRa SF9 185 ms 346 bits/s

 The payload with LoRa is flexible using the adaptive


data rate
 Packet size ranging for 1 to 242 bytes
 Data throughput (data rate) is managed by network
 Time on air (data rate) is not fixed to optimize
spectrum usage
LoRaWAN: device classes

Classes Description Intended Use Consumption Examples of


Services
The most

A Listens only
after end
device
Modules with
no latency
economic
communication
Class


Fire Detection
Earthquake
(« all ») constraint energetically.. Early
transmission Supported by all Detection
modules. Adapted to
battery powered modules

Modules with
B The module
listens at a
regularly
latency constraints
for the reception of
Consumption optimized.
Adapted to battery
• Smart metering
(« beacon ») adjustable
messages of a few powered modules • Temperature rise
seconds
frequency

Modules with a
C Module
always
strong
reception
latency
Adapted to modules on the grid
or with no power constraints
• Fleet
management
(« continuous ») listening constraint (less • Real Time
than one Traffic
second) Management

 Any LoRa object can transmit and receive data


Class A
Gateway
Open 2 windows for DL End Point
reception
(acknowledgments, MAC
commands, application
commands...) after
sending a packet One packet sent

Listening period: varies according to


1 sec +/- 20 us
the spreading factor SF
R Listening period
1st receive window
X • 5.1 ms at SF7 (outdoor and close
1 devices)

1 sec +/- 20 us
• 10.2 ms at SF8 …

R • 164 ms at SF12 (deep-indoor or


Listening period
2 receive window
nd
X far devices)
2 • Very economic energetically
• Communication triggered by the
end device
Class B (Synchronized mode)
Gateway
End Point
• Synchronized with the GTW
•Opens listening windows
at regular intervals. Beginning tag

R
x Listening duration
1
Listening duration: varies according to the
R
x Listening duration SF
Opens N reception windows 2
between the two tags
R
x Listening duration
3

R
x Listening duration
N • Optimized energy consumption
• Communication initiated by the
End tag GTW
Class C
Gateway
- Permanent listening End Point
-Closes the reception window
only during transmissions

Packet reception: possible

Reception window always


open

Packet transmission
Adapted to devices on
T
Closed receive window
X
the power grid

Reception window is open Packet reception: possible


Identification of an end device in
LORA
 End-device address (DevAddr):

Network identifier network address of the end-device

7 bits 25 bits
 Application identifier (AppEUI): A global application ID in the IEEE EUI64 address space
that uniquely identifies the owner of the end-device.
 Network session key (NwkSKey): A key used by the network server and the end-device
to calculate and verify the message integrity code of all data messages to ensure data
integrity.
 Application session key (AppSKey): A key used by the network server and end-device
to
encrypt and decrypt the payload field of data messages.
Agriculture - Irrigation
Current LoRa ®

No. of fields Solutions


1 900
Coverage Area 0.5 mile radius / 0.75 Sq. miles 15 mile radius / 706 Sq. miles
Solution Cost High Low
Ease of use Complex Out of the box
Battery longevity 1-2 years > 5 years

0.5 MILE Radius / 0.75 sq. miles /20 15 mile radius / 706 sq. miles /18k
sensors sensors

12/16/2015 Information – Property of Semtech Corporation


Smart Metering
 Type of application – Deep Indoor, Fixed
objects
 Markets – Water, Gas, Electricity
 Critical business issues
 Legislative compliance
 Meter reading
 Leak detection, also in network
 Reduce flow to manage consumption
 Shut down flow for safety and damage control
 Manage disconnections/reconnections
 Manage updates for pricing
 Increase public awareness
Industrial Asset Monitoring
 Type of application – indoor fixed objects
 Markets - maintenance and supervision of
machine status
 Critical business issues
 Warranty management
 Predictive maintenance
 Avoid outage
 Respond to temperature or air quality alerts
 Stop machine from control room
 Accessibility to assets
Smart Cities

 Type of application – indoor & outdoor fixed objects


 Markets – parking, streetlights, intelligent traffic mgt,
air quality
 Critical business issues
 Carbon footprint
 Traffic management
 Citizen satisfaction & safety
 Reduced budgets
 Assisted living
6LoWPAN
IETF formed 6LoWPAN WG in
2004 to design the Adaptation TCP/IP
Layer

6LoWPAN: IPv6 over Low-power LLN


Wireless Personal Area
Networks
How to carry IPv6 packet efficiently within
small link layer frames such as IEEE  IPv6 MTU to be at least 1280 bytes in
802.15.4? length.
 802.15.4’s standard packet size of 127
 Primary goal octets.
 even the smallest devices should have access to the IP
 smallest devices  low-power devices with limited processing capabilities.

 6LoWPAN defined
 encapsulation and header compression mechanisms

 6LoWPAN Applications:
 General Automation, Home automation, Smart Grid, Industrial monitoring, Smart
Agriculture, etc.
6LoWPAN Edge Router

By communicating
natively with IP,
6LoWPAN networks are
connected to other
networks simply using
IP routers at the edge.

Source:
https://www.ti.com/lit/wp/swry013/swry013.pdf?
6LoWPAN Architecture

BENEFITS

 Ideal to create mesh


networks

 Direct connectivity to the


Internet

 Low power & Low data rates

The utility of a mesh network over other network What is mesh network?
A mesh network is a network in which a
types, such as a hub-and-spoke network, is that if a device or node is linked with all other
node is too far away from the hub, it can still nodes or with a sub-set of nodes directly.
communicate via a closer node until it reaches a
router.
Other Advantages:
• Increased stability by avoiding single point failure
• Increased range by using multi-hop communication
• Direct communication between nodes
• Less power is needed for each node as all nodes
need not send signal to central access point
Source: https://www.e-spincorp.com/what-is-6lowpan-and-its-
functions/
6LoWPAN Advantages

Open IP Multiple
Mesh Routing
Standar PHY
d
• Use open standard such • One-to-many / many-to-
Support
• Freedom of frequency
as TCP, UDP, one routing band and
HTTP, CoAP, physical layer
MQTT, WebSocket • Robust and Scalable
•Can be used across
• End-to-End IP • Self healing multiple
addressable nodes communication
platform
• Flexible •(ex. Ethernet / WiFi /
• No gateway needed. 802.15.4 /
• A router connects the Sub-1 GHz)
6LoWPAN network
to IP • Interoperability at
the IP level
RFCs
6LoWPAN IETF group developed a base specification RFC 4944

“Transmission of IPv6 Packets over IEEE 802.15.4 Networks”

RFC4919: This document describes the


overview, assumptions, problem
statement, and goals for transmitting IP
over IEEE 802.15.4 networks.

RFC6568: This document investigates


potential application scenarios and use
cases for LoWPANs

RFC6606: This document provides the


This document This document describes problem statement and design space for
specifies an IPv6 simple optimizations to 6LoWPAN routing. Defines how 6LoWPAN
Header Compression IPv6 Neighbor Discovery, formation and multi-hop routing could be
format for IPv6 its addressing schemes, supported.
packet delivery in and duplicate address
6LoWPAN detection for 6LoWPAN
Motivation to use IPv6
Benefits of IP over IEEE 802.15.4 Network (RFC 4919):
 The pervasive nature of IP networks allows use of existing Infrastructure.
 IP-based technologies already exist, and are well-known
 Open and freely available specifications (v/s. Closed proprietary solutions).
 Tools for diagnostic, management already exist.
 IP-based devices can be connected readily to IP-based networks, without gateways or proxies.

• Large simple address (2^128 address space)


• Network ID + Interface ID
• Plenty of addresses; easy to allocate and manage

Why • Auto-configuration and


IPv6? Management
• ICMPv6

• Integrated bootstrap and


discovery
• Neighbors, routers, DHCP
• 128 Bit Addressing = 3.4*10^38 unique
• addresses
Global scalability
IPv6 Challenges
1. Header Size Calculation

(8)

 IPv6 header: 40 octets


 UDP header: 8 octets
 802.15.4 MAC frame header: up to 25 octets
( with null security)
or

25+21=46 octets (with


AES-CCM-128)

 With 802.15.4 frame size of 127 octets, we have following space


left for application data!
Cont…

2. IPv6 Maximum Transmission Unit (MTU) Requirements


 IPv6 requires that links should support an MTU of 1280 octets
 So, Link-layer fragmentation & reassembly is needed

3. IP assumes that devices are always ‘ON’ i.e. active


 But embedded devices may not have enough power and duty cycles

4. Multicast support
 IEEE 802.15.4 & other low power radios do not support multicast (as it
is expensive)
Main Goals of 6LoWPAN Design
 Define adaptation layer to match IPv6 MTU requirements
• by fragmentation/reassembly

 Specify methods to do IPv6 Address formation


• by stateless address auto configuration

 Specify/use header compression schemes.


• by specific compression techniques

 Methods for mesh broadcast/multicast below IP


• by layer 2 networking and forwarding mechanism
Adaptation Layer
It mainly performs the following functionalities:

 Header Compression -> Compresses 40B IPv6 and 8B UDP headers


 Fragmentation & Reassembly -> when MTU of 802.15.4 and IPv6 does not match.
 Stateless Autoconfiguration -> Devices inside 6LoWPAN generate their own IPv6
address

IPv4 IPv6 header (min 40


header Byte)
LoWPAN Encapsulation

LoWPAN encapsulation are the payload in the IEEE 802.15.4 MAC protocol data unit
(PDU).
Stacked Headers
• 6LoWPAN uses concept of
• stacked headers
 when dispatch header is used to indicate the sub-header type that
immediately follows

• extension headers
 when the next header field is used to indicate the header type that
immediately follows

•• 6LoWPAN headers If more than one sub-


define the capability of each.
Few 6LoWPAN headers
header is used in the same
• :Mesh addressing,
are
IPv6 packet, they must
• Fragmentation,
follow the order.
• Header compression,
6LoWPAN Headers
 First byte of each header (i.e. dispatch byte) identifies the nature of each
header
Dispatch Type & Header

 Dispatch type defined by 1st & 2nd bits


 Dispatch means identifies type of header immediately following the
Dispatch Header
 Type-specific header  it is determined by full Dispatch Header.
Cont…
 Each header in the stack starts with
 a header type field, and
 followed by zero / more type specific
header fields
Mesh Addressing Type & Header

Dispatch Header

 1st & 2nd bits = 10.

 OA : link layer address of originator.


 FDA : link layer address of final-destination

 V: 0 => if OA is 64-bit EUI address


1 => if OA is16-bit short address

 F: 0 => if FDA is 64-bit EUI


address

1 => if FDA is16-bit short


address

 HopsLft: 4 bit, decremented by 17


Cont…

Routing by
Mesh
Header

Example of Mesh Routing


header.
• Mesh networking is
required
to extend the network
into multi-hop scenario

Data packet
routing
in TCP/IP network
Fragmentation Type & Header

First Fragment

Subsequent Fragments

Dispatch: identifies the type of the immediate next headers


Datagram size (11 bits): encode the size of entire IP packet (after IP layer
fragmentation, if any).

Datagram tag (8 bits): same for all link fragments of a payload, but different for two
IPv6 payload. Datagram offset (11 bits): present only in subsequent fragments
Fragmentation and Reassembly
Fragmentation Principles (RFC 4944)
 When an IPv6 packet exceeds link-layer payload size then segments
the packet into fragments.

6LoWPAN packet structure of FRAG1 and FRAGN

Tag: it is used to identify all fragments of a IPv6 datagram

Offset: It identifies the relative position of the received fragment from the
beginning of the payload datagram to allow out-of-sequence delivery.
Cont...
 Only the 1st fragment carries end-to-end routing information.

 1st fragment carries a header that includes :


 datagram size, datagram tag .

 Subsequent fragments carry


 datagram size, datagram tag, offset.

 Time limit for reassembly is 60 seconds.

 For a lost fragment, we need to resend entire set of fragments.


Addressing in 6LoWPAN
 128-bit IPv6 address Interface ID (IID)
 64-bit prefix 64-bit IID
+
• identifies the network interface
• must be unique for that
Identifies the network you
are on network
• typically formed statelessly
and where it is globally
from the interface MAC address
 There are different kinds of IPv6 addresses
 Loopback (0::1) and Unspecified (0::0)
 Unicast with global (e.g. 2001::) or link-local (FE80::) scope
 Multicast addresses (starts with FF::)
 Etc.
Link-local address in 6LoWPAN
A link-local address is a network address that
is valid only for communications within the
network segment or the broadcast domain
that the host is connected to.

In IPv6, traditionally, FE80::/10 is used to


represent link-local address.

How does a host generate a link-local address in


6LoWPAN?
 Generated when a computer runs IPv6 boots up
 Valid only for communication on a local network
 Always have a prefix FE80::/64  mapped with PAN ID
64-bit IID generation from MAC address
Generating IID (EUI-64) from 48-bits MAC address (i.e. device
address).

48 bit MAC
address

64 bit Interface ID
(IID)
6LoWPAN Header Compressions
 HC1 (for IP) and HC2 (for UDP) compressions
 Assume common values for header fields and define compact forms.
 Reduce header size by omission

Omit headers that...


• can be reconstructed from L2 layer headers (i.e. redundant)
• contains information not needed/used in present context (i.e. unnecessary)
Cont…

IPv6 header

Version: version number of Internet Protocol = 6.

Priority / Traffic Class: indicates the class or priority of IPv6 packet

Flow Label: used by source to label the packets belonging to the same flow in order to
request special handling by intermediate routers

Payload Length: size (in octets) of the rest of the packet that follows the IPv6 header

Next header: type of header that immediately follows the IPv6 header

Hop limit: Decremented by one by each node that forwards the packet.

Source & Destination addresses: IPv6 addresses


Compression: HC1
HC1:
Compresses IPv6 Header:
IPv6 headers 40-Byte

Dispatch
Header

What are compressed


fields? -> Derived from link
Source address address
Reduced
Destination -> Derived from link
to Zero
address
Priority / Traffic class & Flow address
-> Zero (if ECN, DS, Flow level all
Byte
level Next Header zero)
-> Indicated in HC1
(TCP/UDP/ICMPv6)
Ipv6 Header compression

Cont...

Uncompressed
Compression: HC2
HC2:Compresses UDP Headers
Reduced
UDP header format to
[ 8 Byte]  Source port = P+4bits, 1
P=61616 Byte
 Destination port= P+4bits,
 Length
P=61616derived from IPv6 2
length Byte
 Checksum is always carried
inline

From 15.4 header


The Header Size Solution
The 48-byte ( IPv6 + UDP header) could in the best cases be
reduced to 6 bytes.
Routing Mechanisms
6LoWPAN supports two routing mechanisms (RFC
6606):
• Mesh-under
• Route-over

Mesh-under

Route-over
Cont…
Mesh-under Route-over
 Uses L2 addresses to forward data  Uses L3 addresses to forward data.
 Only edge router is the IP router;  Each hop acts as an IP router or
other intermediate devices are mesh- 6LoWPAN router.
under forwarder  All fragments are sent to same
 Individual fragments may take path as routing decision taken
different paths. on per packet basis
 Suitable for small and local networks  Suitable for all sized networks

An Example of a Mesh-Under An Example of a Route-Over


6LoWPAN 6LoWPAN
Neighbour Discovery (ND) Protocol
 This helps the node to determine the neighbors in the vicinity and to select the
best parent available.
 Uses ICMP Message
 RS (Router Solicitation) , RA (Router Advertisement)
 NS (Neighbour Solicitation ) , NA (Neighbour Advertisement)

Prefix Information (PIO) : The


prefix of the IPv6 address

Context Option (CO) : The


compression technique to be
used.

Authoritative Border Router


Option
(ABRO) : Border Router
address

Address Registration Option


(ARO)
6LoWPAN Security
 Security is also important for IOT systems
 It takes advantage of IEEE 802.15.4 link layer security
 Also TLS (Transport Layer Security) mechanisms works for 6LoWPAN systems

You might also like