webnesday - introduction to lorawan

38
Introduction to LoRaWAN Martin Haas Webnesday (11.01.2017) 12.06.2022 1

Upload: martin-haas

Post on 14-Apr-2017

286 views

Category:

Engineering


4 download

TRANSCRIPT

Page 1: Webnesday - Introduction to LoRaWAN

03.05.2023 1

Introduction toLoRaWAN

Martin HaasWebnesday (11.01.2017)

Page 2: Webnesday - Introduction to LoRaWAN

03.05.2023 2

About me• Martin Haas (@tineler)• Founder & Engineer @adnexo_gmbh

https://www.adnexo.ch

Page 3: Webnesday - Introduction to LoRaWAN

03.05.2023 3

Overview• What?• Why?• How?

Page 4: Webnesday - Introduction to LoRaWAN

03.05.2023 4

LoRaWHAAAAT?

Page 5: Webnesday - Introduction to LoRaWAN

03.05.2023 5

LoRa WANLong Range Wide Area Network

Page 6: Webnesday - Introduction to LoRaWAN

03.05.2023 6

LoRa• Layer 1 (physical)• Enables long-range communication

link• Highly dependent on environment

• Cities / buildings: ~ 2.5km• Countryside: up to 45km+

• Data rate 0.3 – 50 kbps• Frequency band (Europe): 868 MHz• Duty cycle 1%• 36 Sekunden / h

Page 7: Webnesday - Introduction to LoRaWAN

03.05.2023 7

Data Rates• Adaptive data rate scheme (ADR)• “Use lower spreading factor if signal is

strong”

Source: https://blog.surf.nl/en/lora-the-internet-of-things

Page 8: Webnesday - Introduction to LoRaWAN

03.05.2023 8

LoRaWAN• Defines communication protocol and

system architecture• Specified by LoRa Alliance (cisco, IBM,

Semtech, TTN, Swisscom, BFH, …)

Page 9: Webnesday - Introduction to LoRaWAN

03.05.2023 9

Architecture

Source: https://www.lora-alliance.org/portals/0/documents/whitepapers/LoRaWAN101.pdf

Page 10: Webnesday - Introduction to LoRaWAN

03.05.2023 10

Device Classes• Class A• Two short receive windows after uplink

• Class B• Slotted communication

• Class C• Receives continuously

Page 11: Webnesday - Introduction to LoRaWAN

03.05.2023 11

Information stored in end-device• Device Address (DevAddr, 32 bits)• 7 MSB: Network Identifier (NwkID)• 25 LSB: Network Address (NwkAddr)

• Application Identifier (AppEUI)• Network session key (NwkSKey)• Application session key (AppSKey)

• Frame Counters

Page 12: Webnesday - Introduction to LoRaWAN

03.05.2023 12

Activation by Personalization (ABP)• Manually configured• DevAddr• NwkSKey (unique!)• AppSKey (unique!)

Page 13: Webnesday - Introduction to LoRaWAN

03.05.2023 13

Over-the-Air Activation (OTAA)• Manually configured• End-device identifier (DevEUI, 64 bits)• AppEUI• AES-128 key (AppKey)

• From accept message• DevAddr• NwkSKey• AppSKey

Page 14: Webnesday - Introduction to LoRaWAN

03.05.2023 14

Network Architecture

Source: https://www.lora-alliance.org/portals/0/documents/whitepapers/LoRaWAN101.pdf

Page 15: Webnesday - Introduction to LoRaWAN

03.05.2023 15

Security• Security on network level• Unique Network Key

• Security on application level• Unique Application Key

• Secure usage required!• Find more on the Internet…

Page 16: Webnesday - Introduction to LoRaWAN

03.05.2023 16

YAWT???Yet Another Wireless Technology?

Page 17: Webnesday - Introduction to LoRaWAN

03.05.2023 17

Different Wireless Technologies

Source: Swisscom

Page 18: Webnesday - Introduction to LoRaWAN

03.05.2023 18

IoT challenges• Sensing a complex environment• Connectivity• Power is critical• Security is vital• IoT is complex• Cloud is important• Device Updates

Page 19: Webnesday - Introduction to LoRaWAN

03.05.2023 19

Page 20: Webnesday - Introduction to LoRaWAN

03.05.2023 20

Kind of…• Sensing a complex environment • Connectivity • Power is critical • Security is vital • IoT is complex • Cloud is important • Device Updates

helps helps not improves

Page 21: Webnesday - Introduction to LoRaWAN

03.05.2023 21

How?

Page 22: Webnesday - Introduction to LoRaWAN

03.05.2023 22

What you need• End-Device• Access to a Network• Gateway• Account

• Little programming skills

Page 23: Webnesday - Introduction to LoRaWAN

03.05.2023 23

End-Device

Page 24: Webnesday - Introduction to LoRaWAN

03.05.2023 24

Send message (MicroPython)

Page 25: Webnesday - Introduction to LoRaWAN

03.05.2023 25

Gateways

Page 26: Webnesday - Introduction to LoRaWAN

03.05.2023 26

Networks (in Switzerland)• The Things Network• LORIOT• Swisscom LPN

Page 27: Webnesday - Introduction to LoRaWAN

03.05.2023 27

The Things Network• Worldwide, free Network for makers• Driven by communities

Page 28: Webnesday - Introduction to LoRaWAN

03.05.2023 28

The Things Network in Switzerland• https://ttn-ch.slack.com

Page 29: Webnesday - Introduction to LoRaWAN

03.05.2023 29

The Things Network• Free of charge• Open Source• Active user base• Register Applications and Gateways here:

• https://console.thethingsnetwork.org• Streaming Data using MQTT (more to come)

• Clients available for Java, Node-RED, Node.js• Define Payload functions online• Data Storage Integration

https://www.thethingsnetwork.org/

Page 30: Webnesday - Introduction to LoRaWAN

03.05.2023 30

TTN – Node.js Clientvar ttn = require('ttn'); var client = new ttn.Client(region, appId, appAccessKey, [options]);

client.on('connect', function cb(connack) {});

client.on('message', [deviceId], [field], function cb(deviceId, data) {});

Page 31: Webnesday - Introduction to LoRaWAN

03.05.2023 31

Response"port": 1,"counter": 10,"payload_raw": {

"type": "Buffer","data": [ 1 ]

},"payload_fields": { "led": true }, "metadata": {

"time": "2016-09-07T12:50:07.068771281Z","frequency": 868.1,"modulation": "LORA","data_rate": "SF7BW125","coding_rate": "4/5","gateways": [{

"gtw_id": "0000024B08060112","timestamp": 3955426155,"time": "2016-09-07T12:50:07.053048Z","channel": 4,"rssi": -109,"snr": 5.8,"rf_chain": 1 ]}

}

Page 32: Webnesday - Introduction to LoRaWAN

03.05.2023 32

LORIOT• Free of charge up to 10 end-devices

and 1 Gateway• Possibility of “private networks”

Page 33: Webnesday - Introduction to LoRaWAN

03.05.2023 33

LORIOT• Build-in Output Types• Amazon AWS IoT• IBM Bluemix IoT Foundation• HTTP Push• Iron.io IronMQ• PubNub• TLS Socket• WebSocket• Azure IoT Hub

Page 34: Webnesday - Introduction to LoRaWAN

03.05.2023 34

Swisscom• 80% of Swiss population covered• For enterprise customers• HTTP request

Page 35: Webnesday - Introduction to LoRaWAN

03.05.2023 35

Swisscom

Page 36: Webnesday - Introduction to LoRaWAN

03.05.2023 36

Swisscom

Source: Swisscom

Page 37: Webnesday - Introduction to LoRaWAN

03.05.2023 37

Swisscom• Disclaimer

«Die Abdeckungskarten zeigen die Verfügbarkeit des LPN-Services für den Aussenbereich (Strassen, Trottoirs, öffentliche Plätze, etc.). Die ausgewiesene Versorgung beruht auf Prädiktionen, die nicht alle Feinheiten der Ausbreitungscharakteristik eines LoRa-Funksignals berücksichtigen können. Die Angaben zur zukünftigen Abdeckung stellen die momentane Planung dar, die definitiv realisierte Abdeckung kann davon abweichen. Bei den vorliegenden Karten und Abdeckungs-Angaben handelt es sich deshalb um eine ungefähre Indikation und Swisscom kann für die aufgezeigte LPN-Service-Abdeckung entsprechend keine Gewähr übernehmen.»

Page 38: Webnesday - Introduction to LoRaWAN

03.05.2023 38

The End!