Upgrade to Pro — share decks privately, control downloads, hide ads and more …

LoRaWAN crash course

LoRaWAN crash course

What is LoRaWAN? Think of it as WiFi for sensors! In this workshop, you will learn all about LoRaWAN, and how to develop a simple sensor that sends data to the Internet via the free/open The Things Network.

Gonzalo Casas

October 28, 2020
Tweet

More Decks by Gonzalo Casas

Other Decks in How-to & DIY

Transcript

  1. THE THINGS NETWORK A global community, building open source to

    operate a crowd-sourced network for the Internet of Things.
  2. THE THINGS NETWORK A global community, building open source to

    operate a crowd-sourced network for the Internet of Things. FREE/OPEN GLOBAL WIFI SENSORS
  3. LORAWAN • LoRa (Long Range): Radio modulation technique • LoRaWAN:

    MAC protocol for Wide Area Networks (OSI Layer 2 and 3) sensors nodes gateways backend application backend LoRa ip ip
  4. LONG RANGE 2km - 5km in urban setting 40km+ in

    rural setting © ttnmapper.org , Open Street Map
  5. INSANELY LONG RANGE (under extreme conditions) 201 km ground-to-ground by

    Andreas Spiess, TTN Basel http://www.sensorsiot.org/ © ttnmapper.org
  6. INSANELY LONG RANGE (under extreme conditions) 333 km air-to-ground (helium

    balloon) by @telkamp (mapping @jpmeijers) © ttnmapper.org
  7. LOW COST Node/transceiver: CHF 8.5 Gateway: ~CHF 90 (indoor) Open

    source stack + ISM bands Low CAPEX, almost negligible OPEX Photos by @gnz, CC-BY-SA
  8. LOW POWER Class A Class B Class C Always send,

    receive after send. Up to 10 years. Deep sleep: ~10 μA TX ~40 mA RX ~14 mA Time-synchronized receive windows. Always-on receive mode. Not supported Support not ready, but planned
  9. LIMITATIONS Bandwidth Payload size Regulatory limits 0.3 bps to 50

    kbps 51 bytes (DR0) 222 bytes (DR4) Fair usage policy 1% Duty Cycle 30 seconds/day airtime 10 downlinks/day
  10. CAN I TRUST… …the gateway won’t be shut down? REDUNDANCY

    …sensitive information stays private? CRYPTOGRAPHY …the backend to be up-and-running? DECENTRALIZATION
  11. CAN I TRUST… …it will be around in a few

    years time? OSS + OPEN STANDARDS
  12. WIRING Type ST Board Nano Type GND GND COMMAND PB8

    D3 RTS BUSY PA8 D2 CTS USART1_RX PA10 TX UART TX USART1_TX PA9 RX UART RX Diagram by Thomas Amberg (@tamberg)
  13. STEPS 1. Get Dev EUI from device 2. Register device

    on TTN 3. Get App EUI & Key from TTN 4. Use join(appeui, appkey)
  14. MORE RESOURCES • Working with bytes: https://www.thethingsnetwork.org/docs/devices/bytes.html • LoRa crash

    course (RF, link budget, lots of technical details) https://www.youtube.com/watch?v=T3dGLqZrjIQ
  15. LORAWAN SESSIONS Network Session Key: Message Integrity Application Session Key:

    Join, Encryption and Decryption Devices Gateways Network Server Application
  16. ASYMMETRIC KEYS Network Session Key: Message Integrity Application Session Key:

    Join, Encryption and Decryption Devices Gateways Network Server Application Dual-band Provisioning, Asymmetric Cryptography
  17. ASYMMETRIC KEYS Network Session Key: Message Integrity Application Session Key:

    Join, Encryption and Decryption Devices Gateways Network Server Application Dual-band Provisioning, Asymmetric Cryptography IoT Platform