Iot Connectivity With Lora: Developer-Perspective Technical Intro & Stories Around Lora/Lorawan in Indonesia
Iot Connectivity With Lora: Developer-Perspective Technical Intro & Stories Around Lora/Lorawan in Indonesia
Andri Yadi
Co-founder & CEO of DycodeX
Microsoft MVP, Azure
a (at) dycodex.com | http://andriyadi.com
I’m a Physicist, Developer, Maker, Entrepreneur
14 years in entrepreneurship
Data Rate
Range
Power
Hint: No connectivity technology that satisfies high data rate, long range, and low power, all in one pack.
Need to compromise
Data Rate vs Range
Data Rate
High
Low
Range
Short Long
Data Rate vs Power
Data Rate
High
Low
Power
Low High
Power vs Range
Power
High
Low
Range
Short Long
LPWA: Commons
EC-
-m
Unlicensed Spectrum Licensed Spectrum
LPWA: Few Selection Factors
Cost
Modules, deployment, operational cost
Regional Regulatory
Allowed frequency, power, duty cycle, etc
e.g. in Europe, duty-cycle is 1% for end-devices
Upstream/Downstream
SIGFOX – nearly entirely upstream
LoRa/LoRaWAN – has 3 classes supporting different balances
of upstream & downstream
Matching +
RF Switch +
Filter Host / Application
Microcontroller
LoRa Chipset
TCXO
LoRa Chipset
LoRa Chipset: How to Use It?
Microcontroller
In the packet header example, only node with ID “2” will “receive”,
although every other nodes will receive but choose to ignore.
Microcontroller LoRa Node #2
Microcontroller
RadioHead: https://www.airspayce.com/mikem/arduino/
RadioHead/
Packet Radio library for embedded microprocessors, not only for LoRa
CMWX1ZZABZ iM880
LoRaWAN Module
Pycom LoPy STM32L0 Discovery kit LoRa Arduino MKR WAN 1300
ESPect
Adafruit Feather M0 with RFM95 Sodaq ONE DycodeX ESPectro32 + LoRa Backpack
On Field On Internet
Source: http://www.frugalprototype.com/technologie-lora-reseau-lorawan/
LoRaWAN Network: A Sample Architecture
Microsoft Azure
MQTT/
MQTT AMQP
Backhaul
LoRa (Cellular)
End Device LoRaWAN
Network Server
Bridge
Azure IoT Hub
Gateway (Azure Functions)
Cost
Modules: <$5 - $18; Gateway: $100 - $5000; No subscription fee
Regional Regulatory
Frequency band: 433/470/868/915 MHz;
Power: 14 - 20 dBm; Duty cycle: 1 - 10%
Upstream/Downstream
Has 3 classes (A, B, & C) supporting different balances of upstream &
downstream
Microsoft Azure
MQTT/
MQTT AMQP
Backhaul
LoRa (Cellular)
End Device LoRaWAN
Network Server TTN-to-Azure Azure IoT Hub
Gateway Bridge
Demo: Payload
Microsoft Azure
Payload
Decoder
MQTT/
MQTT AMQP
Backhaul
LoRa (Cellular)
End Device LoRaWAN
TTN-to-Azure Bridge Azure IoT Hub
Gateway Network Server Azure Function
{ {
“temp”: 23.21, “temp”: 23.21,
9B 09 05 24 4B 9B 09 05 24 4B
Payload: 1D 65 A3 00 00 1D 65 A3 00 00
“lux”, 31.21,
“lux”, 31.21,
… …
} }
TTN Payload Decoder
decoded = {
temp: t,
pres: p,
lux: l,
hum: h,
};
return decoded;
}
TTN to Azure IoT Hub Bridge
https://github.com/TheThingsNetwork/integration-azure
'use strict'
const fs = require('fs')
const ttnazureiot = require('.')
const ttn = require('ttn')
// TTN-related settings
const appId = process.env.TTN_APP_ID || 'alora-01'
const processId = process.env.TTN_PROCESS_ID
const accessKey = process.env.TTN_APP_ACCESS_KEY || ‘YOUR_OWN_KEY’
const region = process.env.TTN_REGION || 'eu'
// Azure-related settings
const hubName = process.env.TTN_AZURE_HUBNAME || 'dycodex-iot-lab'
const keyName = process.env.TTN_AZURE_KEYNAME || 'iothubowner'
const key = process.env.TTN_AZURE_KEY || 'YOUR_OWN_KEY'
const bridge = new ttnazureiot.Bridge(region, appId, accessKey, hubName, keyName, key, options)
Microsoft Azure
MQTT/
MQTT AMQP
Backhaul
LoRa (Cellular)
End Device LoRaWAN
Network Server TTN-to-Azure Azure IoT Hub
Gateway Bridge
DycodeX’s Story around
LoRa/LoRaWAN
As seen on
Contribution
Ria Sri Rahayu,
IoT Hardware Lead
to IoT
Regulation
DycodeX is one of the parties
(representing industry) involved
in field test to support
Indonesia’s IoT tech specs
regulation, supporting Ministry
of ICT (KOMINFO)
DytraX:
NB-IoT/Cellular IoT Tracker
Alora:
Environmental Sensor
PowtraX
Fixed Asset Tracking SMARTernak Magic Button Industrial Power Meter
Unlicensed Licensed
Late
Jun
2015 2016
Early
Jul-Oct
2016 2016
The LoRaWAN
Our first ever HAT, Shield,
Arduino Shield Backpack
for LoRaWAN Various LoRa kits
Few early ready-to
-use LoRa Modules
we’ve explored.
Not yet supporting
LoRaWAN
Magic Button
From WiFi to LoRa
Jun 2016
es.
ng
DycodeX’s LoRa Story
Also supports:
• 2G/3G network
• WiFi
• Bluetooth
• NFC
Hardware
Learning Marketplace
makestro.com
Software &
Community
Cloud
DycodeX’s LoRa Story
SMART CAMERA
Monitor cattle’s behaviour,
body heat, to estimate
body weight through image CARETAKER
processing.
One farmer/caretaker
can easily cover a
*optional*
vast grazing area and
hundreds of cattle.
VIRTUAL FENCE
Contain and move cattle
without physical posts and TRACKER
wires.
Catte-wearable tracker FARM MANAGER /
contains a bunch of sensors OWNER / INVESTOR
http://smarternak.com by DycodeX
Ca)le-wearable Device
Dual IoT Connectivity Powerhouse
Short Range: 1 km WiFi, Bluetooth v4.2, BLE
Low Power, Dual Core Microcontroller
Mesh-supported. High speed
Long Range: LoRa/LoRaWAN or NB-IoT,
Actuators
for 5-10km coverage area
Audio Alert/Speaker
Color LED
LoRaWAN Module
LoRaWAN Gateway
Self-build full-fledge gateway,
10m above the ground
WebSocket,
MQTT HTTP
Backhaul
LoRa LoRaWAN
(Cellular, WiFi,
Wearable
Gateway
Devices
Ethernet)
Network
SMARTernak
Cloud SMARTernak
Server Web & Mobile
(Application Server) Apps
Microsoft Azure
SMARTernak Architecture: Data Perspective
SMARTernak Cloud
(Application Server)
MQTT
Backhaul
LoRa LoRaWAN
(Cellular, WiFi, Application
Wearable
Gateway Ethernet) Converter
Server
Devices Network
0d 67 01
Server 0d 67 01 {
DWcBMgoCAWs 32 0a 02 “type”: 7,
32 0a 02
01 6b 00 “batt”: 3.89,
01 6b 00 AAAc= 00 07 “temp”: 31.44
00 07
}
11 Bytes 63 Bytes
{
"applicationID": "1",
"applicationName": "cattle-tracker",
"deviceName": "smarternak_a8610a323XXXXXX",
"devEUI": "a8610a323XXXXXX",
"rxInfo": [{
0d 67 01 66 0a 02 01 88 00 00 07 "mac": “b827ebfffeXXXXXX",
"time": "2018-10-03T05:54:09.584858Z",
"rssi": -75,
"loRaSNR": 9.2,
"name": "pizero-gateway",
"latitude": -6.876573500000001,
"longitude": 107.58426329999999,
"altitude": 0
}],
"txInfo": {
"frequency": 923200000,
"dataRate": {
"modulation": "LORA",
"bandwidth": 125,
"spreadFactor": 7
},
"adr": true,
"codeRate": "4/5"
},
"fCnt": 25,
"fPort": 2,
DWcBZgoCAYgAAAc="
"data": "
}
Base64 encoded
g
Success stories Talent & Community Infrastructure Regulations Startups & Investments
• No massive LoRa/ • LoRa/LoRaWAN is already • No national-wide or even • LPWA (or IoT in general) • Handful of startups began to
LoRaWAN “live”/ hot topic to discuss and city-wide coverage of regulation is not yet adopt LoRa/LoRaWAN into
commercial deployment explore within community
public LoRaWAN legalised as per today, their products. Some are
yet. Most deployments networks ➔ opportunity!
However, LPWA tech ready to commercialise
• Some national
are still under pilot spec is very close to be
competitions/challenges • There’re interests of infra
project/sandbox
legalised.
• Uplink: ≤ 1 %
LoRa
Backhaul
(Cellular, WiFi,
Ethernet, etc)
End Device LoRaWAN Gateway Network Server Application Server Web & Mobile
Apps
Field Internet
• LoRaWAN End Device only communicates with • LoRaWAN Network Server, Application Server,
LoRaWAN Gateway, never with each other or and other related services are on the internet
Industrials
Startups
SI & Consultants
Professionals
LoRa Shield
Some Communities
Indonesia
Indonesia
Maker4Nation
Indonesia
*Disclaimer: I have no data of all players in Indonesia yet. Sorry if you’re not listed.
And I’m talking about electronics maker-related players
Again, there’s the 1st Ever LoRa Conference in Indonesia
I’ve been visiting 20+ cities & campuses to discuss about LoRa
Closing
Why We Choose LoRa?
Because we can
We can deploy end-to-end LoRa/LoRaWAN-backed
connectivity by ourselves, less dependency
Start Making at
Hardware
makestro.com Learning Marketplace
hYps://facebook.com/asioti/
hYp://bit.ly/asioti-tgram
hYp://bit.ly/MemberASIOTI
[email protected] | https://dycodex.com
Jalan Sarikaso No. 6A, Bandung, Indonesia