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

End-to-End LoRaWAN Platform

iot-usj
November 16, 2016

End-to-End LoRaWAN Platform

Description of the LoRaWAN prototype for smart agriculture

iot-usj

November 16, 2016
Tweet

Other Decks in Research

Transcript

  1. Université Saint-Joseph de Beyrouth - Faculté d’ingénierie Deploying an End-to-End

    LoRaWAN Platform LISA Project Long-range IoT for Smart Agriculture October 2016 [email protected]
  2. Presentation of LISA § Long-Range IoT for Smart Agriculture §

    Twofold objectives • Automate measurement process for agriculture research • Deploy LoRa in agricultural environment E2E LoRaWAN [email protected] 2 End node (Sensors) Microclimate data - Storage - Visualization - Analysis LoRa Gateway
  3. Project Challenges § Autonomy • Battery powered end-nodes § Packaging

    • Water-proof modules § Radio coverage • Agriculture environment § Sensor calibration • Accurate microclimate measurement § Cost E2E LoRaWAN [email protected] 3
  4. Platform Architecture E2E LoRaWAN [email protected] 4 End-node Gateway lora-gateway- bridge

    loraserver lora-app- server MQTT Broker End-node Application Backend
  5. Platform Architecture - Protocols E2E LoRaWAN [email protected] 5 End-node Lora-

    server Application Backend End-node Gateway LoRa UDP IP Eth/xG LoRaWAN/Encryption Appli … TCP LoRaWAN/MAC IP MQTT L2 TCP IP L2 MQTT TCP IP L2 gRPC … Appli … TCP IP L2 MQTT MQTT Broker lora-gateway- bridge lora-app- server
  6. End-node: Hardware Specifications § Arduino Mega • 16 MHz, 256

    KB Flash § Dragino shield • HopeRF LoRa, ICSP header § 868 MHz Antenna E2E LoRaWAN [email protected] 6
  7. End-node: Software Specifications § Arduino-LMIC • IBM LMIC (LoraMAC-in-C) library

    • https://github.com/matthijskooijman/arduino-lmic § Working features • Sending packets uplink • Taking into account duty cycling • Encryption and message integrity checking • Receiving downlink packets in the RX2 window • Custom frequencies and datarate settings • Over-the-air activation (OTAA / joining) E2E LoRaWAN [email protected] 7
  8. End-node Programming § Configure the node • DEVADDR, NWKSKEY, APPSKEY

    § Set the LoRaWAN channels • LMIC_setupChannel(0, 868100000, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_CENTI) § Set the transmit power and spreading factor • LMIC_setDrTxpow(DR_SF7,14) § Read the sensor data • analogRead(light_pin) § Send the data (periodically) to the gateway • LMIC_setTxData2 E2E LoRaWAN [email protected] 8
  9. Gateway: Software Specifications § Single Channel Packet Forwarder • Derived

    from Semtech Packet Forwarder • https://github.com/hallard/single_chan_pkt_fwd § Working features • Listen on configurable frequency and spreading factor • SF7 to SF12 • Status updates • Can forward to two servers E2E LoRaWAN [email protected] 10
  10. LoRaWAN Backend § Open-source LoRaWAN backend • https://github.com/brocaar/loraserver § GO

    programming language § Multi-OS § Pre-compiled binaries E2E LoRaWAN [email protected] 11 lora-gateway- bridge loraserver lora-app- server MQTT Broker
  11. Backend Components § loraserver • Handling (and de-duplication) of uplink

    data received by the gateway(s) and the scheduling of downlink data transmissions § lora-app-server • Node identification • Handling of received application payloads and the downlink application payload queue (MQTT) • Web-interface and API (RESTful JSON and gRPC) § lora-gateway-bridge • Abstracting the packet_forwarder UDP protocol into JSON over MQTT • Enabling to use MQTT for receiving data from and sending data to your gateways. E2E LoRaWAN [email protected] 12
  12. Gateway to Bridge § JSON/UDP/IP message with encrypted payload E2E

    LoRaWAN [email protected] 13 End-node Gateway lora-gateway- bridge loraserver lora-app- server MQTT Broker End-node Application {"rxpk":[{"tmst":150701988,"freq":868.1,"chan":0,"rfch":0,"stat":1,"modu ":"LORA","datr":"SF7BW125","codr":"4/5","rssi":- 44,"lsnr":9.0,"size":46,"data":"QAf56VqA/BEB+Ae4VsNk5kRsry0pYUDpBEXQmLXn H6+AH8gOKEv9/xd1y8PrSQ=="}]}
  13. Bridge to Broker § MQTT message with encrypted payload E2E

    LoRaWAN [email protected] 14 End-node Gateway lora-gateway- bridge loraserver lora-app- server MQTT Broker End-node Application Publish Message Topic: gateway/b827ebffffd562ed/rx Message: {"rxInfo":{"mac":"b827ebffffd562ed","time":"0001- 0101T00:00:00Z","timestamp":3554957965,"frequency":868100000,"channel":0 ,"rfChain":0,"crcStatus":1,"codeRate":"4/5","rssi":- 40,"loRaSNR":9,"size":46,"dataRate":{"modulation":"LORA", "SpreadFactor":7,"bandwidth":125}},"phyPayload": "QAf56VqA/BEB+Ae4VsNk5kRsry0pYUDpBEXQmLXnH6+AH8gOKEv9/xd1y8PrSQ=="}
  14. Broker to loraserver § MQTT message with encrypted payload E2E

    LoRaWAN [email protected] 15 End-node Gateway lora-gateway- bridge loraserver lora-app- server MQTT Broker End-node Application Publish Message Topic: gateway/b827ebffffd562ed/rx Message: {"rxInfo":{"mac":"b827ebffffd562ed","time":"0001- 0101T00:00:00Z","timestamp":3554957965,"frequency":868100000,"channel":0 ,"rfChain":0,"crcStatus":1,"codeRate":"4/5","rssi":- 40,"loRaSNR":9,"size":46,"dataRate":{"modulation":"LORA", "SpreadFactor":7,"bandwidth":125}},"phyPayload": "QAf56VqA/BEB+Ae4VsNk5kRsry0pYUDpBEXQmLXnH6+AH8gOKEv9/xd1y8PrSQ=="}
  15. loraserver to lora-app-server § gRPC message • Authenticate DevAddr •

    Get node session • Verify integrity • Decrypt payload • Identify application E2E LoRaWAN [email protected] 16 End-node Gateway lora-gateway- bridge loraserver lora-app- server MQTT Broker End-node Application
  16. lora-app-server to Broker § MQTT message with decrypted/encoded payload E2E

    LoRaWAN [email protected] 17 End-node Gateway lora-gateway- bridge loraserver lora-app- server MQTT Broker End-node Application Publish message Topic: application/70b3d57ed000087f/node/00000000374de57c/rx Message: {"devEUI":"00000000374de57c","time":"0001-01- 01T00:00:00Z","fPort":1,"gwCount":1,"rssi":- 40,"data":"eyJMIjogMTAyMiwgIk0iOiA2OTYsICJUIjogMjMuNTZ9"}
  17. Broker to Application § MQTT message with decrypted/encoded payload E2E

    LoRaWAN [email protected] 18 End-node Gateway lora-gateway- bridge loraserver lora-app- server MQTT Broker End-node Application Publish message Topic: application/70b3d57ed000087f/node/00000000374de57c/rx Message: {"devEUI":"00000000374de57c","time":"0001-01- 01T00:00:00Z","fPort":1,"gwCount":1,"rssi":- 40,"data":"eyJMIjogMTAyMiwgIk0iOiA2OTYsICJUIjogMjMuNTZ9"}
  18. Application Examples § MQTT Libraries • https://eclipse.org/paho/ § IoT Cloud

    • Emoncms (api, dashboard, app, …) • AWS IoT, … E2E LoRaWAN [email protected] 19 https://emoncms.org/dashboard/view&id=37655
  19. Project Activities § Duration: 3 years § Grant: Conseil de

    la recherche – Université Saint-Joseph de Beyrouth § Members: • ESIB (CIMTI Lab): Marc Ibrahim (PI) – Maroun Chamoun – Rima Kilany Chamoun – Samer Lahoud – Melhem El Helou • ESIA-M: Yolla Ghorra Chamoun – Maya Kharrat Sarkis E2E LoRaWAN [email protected] 21