Simulate LoRaWAN network with Javascript for IoT solutions

Cf1d269c9fd8e5b6bdf19e76a82f464f?s=47 Toni
November 30, 2018

Simulate LoRaWAN network with Javascript for IoT solutions

The Internet of Things (IoT) is disrupting every industry sector. And processing all the captured data can lead to new even more revolutionary opportunities. LoRaWAN communication protocol is a low power and long range technology which allows easier access to IoT solutions. I will explain the basis of Internet of Things, LoRaWAN technology and will present a few real/life usecases. Then, with open-source tools, we'll be able to simulate a device, send an uplink message to a packet-forwarder simulated gateway connected to LORIOT Network Server. I'll end with simulated device/gateway demo.



November 30, 2018


  1. Simulate LoRaWAN network with Javascript for IoT solutions Antonio Bustos

    | @antoniobusrod Madrid | November 30 - December 1, 2018
  2. Internet of Things Network of physical devices, vehicles, home appliances

    and other items embedded with electronics, software, sensors, actuators, and connectivity which enables these objects to connect and exchange data
  3. Use cases • Smart grids • Smart homes • Intelligent

    transportation • Smart cities
  4. None
  5. None
  6. LoRa • Physical layer • Spread spectrum modulation • Powerful

    gateway baseband allows multiple receive channels • Patented wireless data communication technology (Semtech) • Provides the core long range capability • Up to 5km range in urban environment, up to 15km suburban
  7. LoRaWAN • Network protocol stack, Medium access control (MAC) •

    Layer protocol for managing communication between LPWAN gateways and end-node devices • Open by the LoRa TM Alliance • Specification v1.0 released in June 2015 • Flat & modern "software defined" architecture: • Routing complexity is centralized in the cloud data center • Gateways are relatively basic Radio Frequency to IP packet forwarders
  8. LoRaWAN • A Large-Scale, Bi-directional, Secured, Cellular Network • Designed

    for low data-rate (~1kbps), low duty-cycle (~100mins), high capacity (~100k nodes) & long battery life (~10yrs) • Deployable as both public or private networks • Scalable from a single gateway to national coverage
  9. ✔ Long Range, greater than existing infrastructure 
 ✔ Long

    battery autonomy, 10 years or more
 ✔ Low cost: infrastructure, nodes, service
 ✔ Scalable & robust infrastructure 
 ✔ Secure and trusted
 ✔ Simple commissioning
 ✔ Open & interoperable standard
 ✔ "Killer-App" features
 ✕ High data rate, not needed in most IoT systems Essential requirements
  10. None
  11. LoRaWAN device • DevAddr • Consists of 32 bits identifies

    the end-device within the current network. • DevEUI • Global end-device ID in IEEE EUI64 address space that uniquely identifies the end-device • AppKey • 128-bit security key known by the device and by the application
  12. LoRaWAN device • AppSKey • Application session key specific for

    the end-device. It is used to encrypt/decrypt the payload field of application- specific data messages and to calculate/verify an application-level MIC (payload of application-specific data messages) • NwkSKey • Network session key specific for the end-device. It is used to calculate and verify the MIC (message integrity code) of all data messages to ensure data integrity.
  13. None
  14. UDP Packet Forwarder • Program running on the host of

    a Lora gateway (by default) • Forwards RF packets received by the concentrator to a server through a IP/UDP link (uplink) • Emits RF packets that are sent by the server (downlink)
  15. UDP Packet Forwarder • Basic protocol for demonstration or use

    private and reliable networks • No authentication of the gateway or the server • Acknowledges only used for network quality assessment, not to correct UDP datagrams losses (no retries).
  16. Gateway Server When 1-N RF packets are received PUSH_DATA (token

    X, GW MAC, JSON payload) PUSH_ACK (token X) process packets *after* ack
  17. JavaScript simulator • packet-forwarder • Virtual LoRa packet forwarder that

    forwards RF packets from API to a server through a IP/UDP link, and emits RF packets that are sent by the server. To be used for Node.js applications. • packet-forwarder-json-builder • Build JSON packet forwarder message for an uplink (rxpk) which will be sent Virtual LoRa packet forwarder.
  18. Demo Hands-on

  19. Thank you for your attention Questions?