LoRaWAN for exploring the Internet of Things Talk Hard

A technical, political, and cultural look
at LoRaWAN for IoT

Benedict R. Gaster / @cuberoo_


Agenda

Internet of Things

LPWAN

LoRa and LoRaWAN

The Things Network

LoRaWAN Bristol

Questions

Well I suppose we can say these applications are fine, but

Do we need a billion

ways to buy something ☹

IoT could change our lives

Air Pollution Kills

200 people a year in Bristol

Bristol Evening Post

Citizen Sensing project

IoT Architecture high-level view

IoT can be many things to many people

Following example based on material
from The Things Network
The IoT network is about enabling low power Devices to use long range Gateways to connect
to a decentralized network

Devices

Connect Things to the IoT via a Cloud network

Gateways

Extend the network by installing more Gateways

Network

Manage applications and devices via the cloud

Applications

Exchange data with Devices on the network

Low Power Wide Area Networks (LPWAN)

Type of wireless telecommunication network

Supports communication

over long range

(many kilometers)

low bit rates

devices operated by battery

Miles of Range

Years of Battery Life

Messy Networks

And Why they are great for IoT

Cell phone networks aren’t messy

Carefully planned, minimal overlap

Maximize the efficiency of the network

Handoff is all important in a cell phone network

IoT networks can be messy

Don't care about handoff

Don't carry calls, only messages

Don’t need to be (very) intelligent

They just forward packets from devices to/from the cloud

Implication

With the help of open source hardware and software WE the People

can build IoT networks

LoRa and LoRaWAN

Based on radio modulation technology

developed in 2010 by French startup Cycleo

(acquired by Semtech in 2012)

LoRa for Wide Area Networks (LoRaWAN)


MAC layer added to standardize and

extend physical layer

Specification open sourced by

Key features include

End 2 End encryption and security

Adaptive data rate optimization


Quality of service

Laid out as "star-of-stars" topology

Best compromise between

  • range of communication
  • number of base stations (i.e. Gateways)
  • device battery life

Communication between

device and gateway


"spread" on different frequency channels and data rates

Data rates between

300 bps to 5kbps for a 125 kHz bandwidth

Adaptive Data Rate

manages individual data rates of connected device

End device

  • Changes channel in a pseudo-random fashion for every transmission
  • Resulting frequency diversity makes the system more robust (against interference)

Regional ISM Bands

  • 868 MHz or 433 Mhz for Europe
  • 915 MHz for North America
  • Asia 430 MHz

Example: EU 868 ISM Band

  • Unlicensed spectrum
  • Device must respect the maximum transmit duty cycle
    • 1% for devices
    • 10% for gateways

LoRaWAN Network Layers

LoRaWAN Chips are Low Cost

(€ 8 For Single LoRa Radio + Software stack!)

Microchip's

EU 868 and 433 IS Bands

LoRaWAN Complient S/W

Simply serial protocol

#include <rn2xx3.h>
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

rn2xx3 myLora(mySerial);

void initialize_radio() {
  // code to check radio working, etc.
  
  bool join_result;
  // now connect Device to Cloud(App)
  join_result = myLora.initOTAA(
    // AppEUI                        AppKey
    "70B3D57ED00001A6", "A23C96EE13804963F8C2BD6285448198");

}

void loop() {
  // gather data to send, read sensors and so on
  myLora.tx("!");
}

It's easy to build your own device!

  • Arduino (whatever)
  • Microchip RN2483 + Breakout board
  • Wire it up
  • Program with ~code shown previously

Lots of great off the shelf ones

But what about Gateways?

Build A Gateway

Open source software

Raspberry Pi

~€200

Data moved through TTN with Node.js

(MQTT is an alternative)

var appEUI = '70B3D57ED0000C55';
var accessKey = 'dv7JeCp/vOd3uL4dvYHEsHi8CgEpbOpkoNjOSNPNAXM=';
var client = new ttn.Client(
  'staging.thethingsnetwork.org', appEUI, accessKey);

client.on('connect', function() {
  console.log('[DEBUG]', 'Connected');
  });

client.on('error', function (err) {
  console.error('[ERROR]', err.message);
});

client.on('activation', function (e) {
  console.log('[INFO] ', 'Activated: ', e.devEUI);
});

client.on('uplink', function (msg) {
  console.info('[INFO] ', 'Uplink: ' + JSON.stringify(msg, null, 2));
}

In Bristol

5 bikes stolen each day



Evening Post, 25th Jan 2016

Bike Tracker

UWE Final Year Student Project

Josh Harwood


LoRaWAN Like Bike Tracker Demo

LoRaWAN Bristol

LoRaWAN for the City of Bristol


Free for all...


bristolloraweb.org

Questions?