Delivered a talk to discuss developer-perspective technical introduction, stories around LoRa/LoRaWAN, also the state in Indonesia.
Use this deck for a sharing session with Maker4Nation community, back then on Oct 3, 2018 in Jakarta.
What's New in Teams Calling, Meetings and Devices March 2024
IoT Connectivity with LoRa
1. IoT Connectivity with LoRa
Developer-perspective technical intro &
stories around LoRa/LoRaWAN in Indonesia
Presented to Maker4Nation Community
at Bukalapak HQ, Jakarta - Oct 3, 2018
2.
3. Andri Yadi
Co-founder & CEO of DycodeX
Microsoft MVP, Azure
a (at) dycodex.com | http://andriyadi.com
I’m a Physicist, Developer, Maker, Entrepreneur
20 years in so<ware engineering
21 years in electronics engineering
3 years in aeronautical engineering
14 years in entrepreneurship
11 years as Microso< Most Valuable Professional (MVP)
3 years as Hackster.io Ambassador
About Me
4. This talk is not endorsed by Semtech, LoRa
Alliance, or other LoRa-related organizations
Disclaimers
6. Data Rate
Power
Range
3 Dimensions to consider for choosing IoT connectivity
Hint: No connectivity technology that satisfies high data rate, long range, and low power, all in one pack.
Need to compromise
9. Low Power Long Range LPWA
Power
Power vs Range
Range
Short Long
Low
High
10. Low Power, Wide Area Networks
Connectivity designed specifically for IoT
Low data throughput = High sensitivity =
Long range
(Relatively) low cost
Multiple Access = One-to-Many
Architecture
Using licensed or unlicensed spectrum
LPWA: Commons
12. Cost
Modules, deployment, operational cost
Usage Model / Licensing
SIGFOX – Required to utilize their public network
LoRa – Proprietary physical layer but open MAC
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
Hardware & Network Availability
Is it available NOW?
LPWA: Few Selection Factors
13. Wireless modulation technology, based on
Semtech’s proprietary Chirp Spread Spectrum (CSS)
Physical (PHY) layer for long range wireless
communications
Operates in the license-free Industrial Scientific
Medical (ISM) bands all around the world
• Sub-GHz frequency, e.g: 433, 868, 915 MHz, depends on the
country’s regulation
• Regulated power, duty-cycle, and bandwidth.
E.g: in EU, 1% per sub-band duty-cycle limitation (per hour,
meaning transmission is allowed for 36 sec in each 1 hour)
LoRa: What is it?
14. LoRa: Some Parameters
LoRa physical layer consists of many parameters which can be
configured into 6720 different settings!
SeRing Values DeSnition ETects
Bandwidth 125, …, 500 kHz Width of spectrum occupied by chirp
A higher bandwidth is required for transmiRing data at
high rates (1 kHz = 1 kcps). However, increasing this
parameter decreases the communication range and
sensitivity.
Spreading Factor
26, …, 212 chips/
symbol
Number of bits encoded per symbol.
Symbol is RF state representing some
quantity of information. SF12 means 212
chips/symbol, 12 bits of data
A higher spreading factor (SF) increases the
communication range, radio sensitivity, and the signal-
to-noise ratio (SNR). However, energy consumption
consequently increases.
Coding Rate
1, …, 4
or
4/5, …, 4/8
Propoaion of transmiRed bits that caries
actual data, as opposed to error
correction bits.
CR1 4/(4+1) = 4/5
Bigger coding rates increase the protection against
decoding errors and intecerence bursts at the expense
of longer packets, longer air time, and higher power
consumption.
Transmission
Power
−4, …, 20 dBm
Transmission power can be adjusted from
−4 to 20 dBm, in 1 dB steps. Because of
hardware implementation limits, the
range is o<en limited to 2 to 20 dBm.
The signal-to-noise ratio is increased by increasing the
transmission power at the cost of energy expenditure.
Carrier
Frequency
137, …, 1020 MHz
CF represents the central transmission
frequency used in a band, can be
programmed between 137 MHz to 1020
MHz, in steps of 61 Hz.
Lower frequency enables to achieve higher
communication ranges for the same transmission
power. However, selected CF needs to comply with
country’s regulation.
15. ISM worldwide regulation 7
Output Power vs Duty Cycle
Countries Frequency band review Max. output power
EU 868 MHz 14 dBm
USA 915 MHz 20 dBm
Korea 900 MHz
14 dBm
Japan 920 MHz
Malaysia 862 to 875 MHz
20 dBm
Philippines 868 MHz
Vietnam 920 to 925 MHz
India 865 to 867 MHz
Singapore 922 MHz
Thailand 920 to 925 MHz
Indonesia 922 MHz
ANZ 915 to 928 MHz
Taiwan 920 to 925 MHz
China 470 to 510 MHz 17 dBm
920 to 923 MHz *
LoRa: Frequency Bands
* Not yet legalized
18. LoRa Chipset: How to Use It?
Unless you’re really good at RF design, I don’t recommend to do this.
19. So, for the rest of us, we use Modules
LoRa Modules
* I only show what I’ve been using, no endorsement intended
Supported frequency range: 433 - 510 MHz,
and 868 - 929.9 MHz
Transmit power: adjustable 5 - 20dBm
(100mW), typical: 14dBm (25mW)
RX Sensitivity: -130 - -140dBM
20. Microcontroller
Sensor &
Actuator
Power
Mgt
LoRa Module
LoRa Node #1 Microcontroller
Sensor &
Actuator
Power
Mgt
LoRa Module
LoRa Node #2
Microcontroller
Sensor &
Actuator
Power
Mgt
LoRa Module
LoRa Node #3
LoRa Phy
When a node sends, every other nodes (with same
radio “parameters” - SF, BW, CR, etc) will receive
LoRa is only physical layer, has no mechanism for
targeted transmission. It’s radio frequency a<er all.
How to transmit data with LoRa?
21. Microcontroller
Sensor &
Actuator
Power
Mgt
LoRa Module
LoRa Node #1
Microcontroller
Sensor &
Actuator
Power
Mgt
LoRa Module
LoRa Node #2
Microcontroller
Sensor &
Actuator
Power
Mgt
LoRa Module
LoRa Node #3
Wrap ID, From, Destination in packet header -> for addressing
In the packet header example, only node with ID “2” will “receive”,
although every other nodes will receive but choose to ignore.
Enter Libraries, e.g: RadioHead
to 2
from 1
id 1
lags
Packet Header
However, what about ACK, retry, joining the network, and most
impoaantly security?
22. Arduino LoRa: https://github.com/sandeepmistry/arduino-
LoRa
An Arduino library for sending and receiving data using LoRa radios.
RadioHead: https://www.airspayce.com/mikem/arduino/
RadioHead/
Packet Radio library for embedded microprocessors, not only for LoRa
ESP32 LoRa Library: https://github.com/Inteform/esp32-lora-
library
C component to be integrated into ESP32-IDF for sending and receiving
data through a LoRa transceiver based on Semtech's SX127_ ICs
LoRa: Some Programming Libraries for Microcontroller
23.
24. Communications protocol & architecture utilizing
the LoRa physical layer
Open Source and freely available, specified by LoRa
Alliance
Star of Starts Topology. Nodes connect to multiple
gateways
Adds addressing, mobility, and localisation. Also
Adaptive Data Rate (ADR) to improve performance
Built-in multiple levels of security: network or
application level encryption, frame counter, etc
LoRaWAN: What is it?
25. LoRaWAN End Device / Mote
MCU/MPU
Sensor &
Actuator
Power
Mgt
LoRaWAN Module
Commonly has LoRaWAN module; or LoRa chipset
or module with LoRaWAN software run by hosy/
application MCU/MPU
Communicates with LoRaWAN gateways, never
directly with other motes
Has 64 bit globally unique identifier: DevEUI.
When joining a network, it receives a 32 bit unique
identifier: DevAddr.
Defined 3 device classes: A, B, and C
26. LoRaWAN Device Classes
Class A Class B Class C
Device-initiated communication;
lowest power
Devices are typically in deep
sleep and send messages on
intervals and/or events
After uplink transmission, device
opens two receive windows at
specified times for downlink
messages
Best fit for most battery-
powered sensor applications
Time-synchronized
communication, deterministic
downlink
Extend Class A by adding
scheduled receive windows for
downlink messages from backend
Using time-synchronized beacons
transmitted by the gateway, the
devices periodically open receive
windows
Best for most downlink intensive
applications
Network-initiated
communication; lowest latency
Extend Class A by keeping the
receive windows open unless
uplink-transmitting
The backend can send downlink
message at any given time
Best for downlink intensive
applications that require low
latencies, non battery-powered
27. * I only show what I’ve been using, no endorsement intended
LoRaWAN Modules
WARNING: Not every LoRa modules are LoRaWAN-compliant!
Miromico FMLRRHF78
iM880CMWX1ZZABZ
28. LoRaWAN Module: Common Architecture
Low Power
MCU
Matching
Network
SX127x /
Sx126x
RF Switch
SPI
UART
Application
Microcontroller
LoRaWAN Module
LoRaWAN so<ware stack is baked
inside a low power microcontroller
Module is commonly accessible
via UART intecace using some kind
of AT command or SLIP
29. * Again, I only show what I’ve been using, no endorsement intended
LoRa/LoRaWAN Dev Board
To make life easier, just use Dev Board with LoRa/LoRaWAN
Arduino MKR WAN 1300STM32L0 Discovery kit LoRaPycom LoPy
DycodeX ESPectro32 + LoRa Backpack
+
ESPectro32 LoRa Backpack
ESPect
Adafruit Feather M0 with RFM95 Sodaq ONE
32. RAK Wireless’ RAK811: https://github.com/RAKWireless/
RAK811_LoRaNode
Documentation and Arduino library for RAK811 module.
Arduino MKRWAN: https://github.com/arduino-libraries/
MKRWAN
An Arduino library for sending and receiving data using LoRaWAN
protocol and LoRa® radios, for Arduino MKR 1300 board
Arduino LMIC: https://github.com/mcci-catena/arduino-lmic
IBM LMIC (LoraMAC-in-C) library, modified to run in the Arduino
environment, to work directly with SX1272, SX1276 IC, instead of vendor-
specific LoRaWAN module
Adafruit TinyLoRa Library: https://github.com/adafruit/TinyLoRa
Library for communicating with The Things Network using a Hope RF
RFM95/96/97/98(W) LoRa Transceiver Module
LoRaWAN: Some Programming Libraries for Microcontroller
34. LoRaWAN Gateway/Concentrator
Forms the bridge between end devices and
network servers
Communicates with end devices via LoRaWAN
protocol
Communicates with network servers via TCP/IP
protocol
Contains multi-channel LoRa demodulator, able
to decode all LoRa modulation variants on
several frequencies in parallel
Runs a minimal firmware or OS, and the packet
forwarding software
35. * Again, I only show what I’ve been using, no endorsement intended
LoRaWAN Gateways: Off-the-shelf
MatchX
Gemtek Indoor Pico GatewayThe Things Gateway
DycodeX Outdoor Gateway
Some examples of ready to use, entry to
medium-level gateways
8 - 16 concurrent channels
Backhaul connectivity over WiFi, Ethernet,
or Cellular
Configurable over Web-based UI or console
Powered by OpenWRT or other optimized
Linux distros
37. LoRaWAN Gateways: Configurability via Console
Packet forwarder global configuration:
Valid throughout all networks
All global parameters for radio channels
As “safe” values for specific parameters set in local conf
Packet forwarder global configuration:
Contain parameters that are specific to each gateway:
Gateway details and GPS
Network server(s), may be active more than one
39. Cost
Modules: <$5 - $18; Gateway: $100 - $5000; No subscription fee
Usage Model / Licensing
Proprietary physical layer but open MAC
LoRaWAN is open standard, reference implementation is open source
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
Hardware & Network Availability
YES. Anyone can deploy the network, build & manufacture gateway
and end nodes
LoRa/LoRaWAN: Back to the Selection Factors
43. var bytesToInt = function(bytes) {
var i = 0;
for (var x = 0; x < bytes.length; x++) {
i |= +(bytes[x] << (x * 8));
}
return i;
};
function Decoder(bytes, port) {
// Decode an uplink message from a buffer
// (array) of bytes to an object of fields.
var decoded = {};
var t = bytesToInt(bytes.slice(0, 2)) / 100;
var p = bytesToInt(bytes.slice(2, 4)) / 100;
var h = bytesToInt(bytes.slice(4, 6)) / 100;
var l = bytesToInt(bytes.slice(6, 10)) / 100;
decoded = {
temp: t,
pres: p,
lux: l,
hum: h,
};
return decoded;
}
TTN Payload Decoder
47. PT. DycodeX Teknologi Nusantara
DycodeX’s vision is to solve big problems with technology.
Today, we're pioneering and leading in developing end-to-end
home-grown IoT & AI-based systems in Indonesia, and enable
maker movement along the way.
As seen on
About Us
48. Home-grown IoT & AI-powered devices & systems
SecurityAgricultureAsset tracking Energy Design House
SMARTernak Magic Button
A Panic Button Platform
PowtraX
Electricity metering &
reselling system
Smarterbike:
Smarter bicycle for bike fleet
management (bike sharing)
DytraX:
NB-IoT/Cellular
Asset Tracker
Hardware Kits for
Education, Makers
Custom hardware
design
End-to-end IoT
development:
firmware, cloud, AI,
web & mobile app
Products & Solutions Focus
Industrial IoT
Machinery Health
Sensor
Alora
Industrial Environmental
Sensing
49. Hardware Kits for Education & IoT MakersWe also make
And a lot more….
50. Contribution
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)
* During Low Power Wide Area (LPWA) Network
trial in Bogor city
OUR ENGINEER
Ria Sri Rahayu,
IoT Hardware Lead
51. Asset Tracking Industrial IoT & EnergyLivestock Farming Security
We’re IoT Connectivity Agnostic
Fixed Asset Tracking
DytraX:
NB-IoT/Cellular IoT Tracker
SMARTransport
SMARTernak Magic Button
Motor Vibration Sensor
for Predictive Maintenance
PowtraX
Industrial Power Meter
Alora:
Environmental Sensor
52. Short Range CellularLow Power Wide Area (LPWA)
In summary, we use these…
Unlicensed Licensed
53. Late
2015
The Beginning
The first ever
journey to LoRa
Early
2016
The LoRaWAN
Our first ever
Arduino Shield
for LoRaWAN
Jun
2016
The Product
The first product
using LoRa
Jul-Oct
2016
HAT, Shield,
Backpack
Various LoRa kits
DycodeX’s LoRa Story
57. Late
2015
The Beginning
The first ever
journey to LoRa
Early
2016
The LoRaWAN
Our first ever
Arduino Shield
for LoRaWAN
Jun
2016
The Product
The first product
using LoRa
Jul-Oct
2016
HAT, Shield,
Backpack
Various LoRa kits
Nov 5
2016
The Tracker
First attempt to
develop LoRa
Asset Tracking
Feb
2017
The Real
Deployment
Deployed 100+
LoRa Asset
Tracking
DycodeX’s LoRa Story
61. ESPectro32 LoRa Backpack
ESPectro32
no Shield Alora v2.2
Supports RAK811 / RAK811-N
LoRa module
Rainbowrd, LoRa-enabled development board
Supports iM880A and RHF76
LoRa module
Also supports:
• 2G/3G network
• WiFi
• Bluetooth
• NFC
Motor Vibration SensorAlora Sensor PackLoRa Arduino Shield
Rainbowrd - Ultimate
Connectivity, LoRa included
ESPectro32 Dev Board + LoRa Backpack
Yet another in-house custom designed LoRa/LoRaWAN boards
62. Late
2015
The Beginning
The first ever
journey to LoRa
Early
2016
The LoRaWAN
Our first ever
Arduino Shield
for LoRaWAN
Jun
2016
The Product
The first product
using LoRa
Jul-Oct
2016
HAT, Shield,
Backpack
Various LoRa kits
Nov 5
2016
The Tracker
First attempt to
develop LoRa
Asset Tracking
Feb
2017
The Real
Deployment
Deployed 100+
LoRa Asset
Tracking
Mid 2017 -
Early 2018
Stuffs
Many stuffs
Apr 25,
2018
1st LoRa
Conference
in Indonesia
DycodeX’s LoRa Story
64. makestro.com
An Indonesia Platform for Maker:
to “democratize” knowledge, hardware
kit, and software to help makers to start
making in hardware, to drive into
Internet of Things
Learning
Hardware
Marketplace
Software &
Cloud
Community
The 1st LoRa Conference organized by…
65. Late
2015
The Beginning
The first ever
journey to LoRa
Apr 29,
2018
SMARTernak
IoT & AI for
Livestock Farming
Early
2016
The LoRaWAN
Our first ever
Arduino Shield
for LoRaWAN
Jun
2016
The Product
The first product
using LoRa
Jul-Oct
2016
HAT, Shield,
Backpack
Various LoRa kits
Nov 5
2016
The Tracker
First attempt to
develop LoRa
Asset Tracking
Feb
2017
The Real
Deployment
Deployed 100+
LoRa Asset
Tracking
Mid 2017 -
Early 2018
Stuffs
Many stuffs
Apr 25,
2018
1st LoRa
Conference
in Indonesia
DycodeX’s LoRa Story
66. * “Ternak” in SMARTernak means “cattle” in Bahasa Indonesia
Internet of Things & Artificial Intelligence-powered
Cattle-Farm Assistant Platform
66
67. SMARTernak - 1,000m ViewSMARTernak: How It Works
BASE STATION
5 km coverage, 1000+
devices.
TRACKER
Catte-wearable tracker
contains a bunch of sensors
ENVIRONMENTAL
SENSORS
Collection of sensors to
monitor environmental
*optional*
SMART CAMERA
Monitor cattle’s behaviour,
body heat, to estimate
body weight through image
processing.
*optional*
FARM MANAGER /
OWNER / INVESTOR
DRONE
Provide surveillance and
to help herding.
*In development*
http://smarternak.com by DycodeX
VIRTUAL FENCE
Contain and move cattle
without physical posts and
wires.
CLOUD
where the heavy-lifting
happens.
CARETAKER
One farmer/caretaker
can easily cover a
vast grazing area and
hundreds of cattle.
68. Dual IoT Connectivity
Short Range: 1 km WiFi, Bluetooth v4.2, BLE
Mesh-supported. High speed
Long Range: LoRa/LoRaWAN or NB-IoT,
for 5-10km coverage area
Packed with Sensors
GPS / GNSS
Accelerometer, Gyroscope
Body Temperature
Ambient Temperature & Humidity
Barometric Pressure
Ambient Light
MEMS Microphone
Device Removal Detector
Powerhouse
Low Power, Dual Core Microcontroller
Smart Energy
Battery Gauge
Solar Energy Harvesting
Smart Switching Between
Main & Backup Battery
Fast Charging from USB Type-C
Firmware-optimised
power consumption
Ca)le-wearable Device
Actuators
Audio Alert/Speaker
Color LED
69. In-House
Electronics board is 100% designed and
assembled in-house, by 100% Indonesian
Device Internals
LoRaWAN Module
77.
• No massive LoRa/
LoRaWAN “live”/
commercial deployment
yet. Most deployments
are still under pilot
project/sandbox
• National utility company
did a pilot project with
1000 LoRaWAN nodes,
not yet go live
• More/less affected by
regulation
• LoRa/LoRaWAN is already
hot topic to discuss and
explore within community
• Some national
competitions/challenges
feature LoRa as tech of
choice
• LoRa popularity begin to
increase within
academics, as research &
final project topic
• No national-wide or even
city-wide coverage of
public LoRaWAN
networks ➔ opportunity!
• LPWA (or IoT in general)
regulation is not yet
legalised as per today,
However, LPWA tech
spec is very close to be
legalised.
• May need to wait for the
readiness of testing labs
to be able to perform test
on LPWA devices, for
type approval &
certification
• Handful of startups began to
adopt LoRa/LoRaWAN into
their products. Some are
ready to commercialise
• There’re interests of infra
companies to deploy city or
even national-wide public
LoRaWAN network
• System Integrators &
enterprises began to deploy
use cases in many verticals,
albeit under R&D/piloting or
small scope
g
Landscape in Indonesia
Success stories Talent & Community Infrastructure Regulations Startups & Investments
78. • Frequency band: 920 - 923 MHz
• Bandwidth: ≤ 200 KHz
• Maximum spurious emission:
-36 dBm (ETSI 300 220)
• Duty cycle:
• Downlink: ≤ 10 %
• Uplink: ≤ 1 %
• Transmission power: ≤ 100mW
or 20 dBm (EIRP)
• Transmission power: ≤ 400mW
or 26 dBm (EIRP)
• Gateway should include a filter
with out-of-band rejection
bigger than 50 dB at 915 MHz
and 925 MHz
General End Node Gateway
Indonesia’s LPWA Tech Requirements Regulation (DraW)
Edited on March 30, 2019
79. LoRaWAN Gateway Network Server Application Server
Backhaul
(Cellular, WiFi,
Ethernet, etc)
To comply with GR 82 Concerning Data
Web & Mobile
Apps
LoRa
Internet
End Device
Field
• LoRaWAN Network Server, Application Server,
and other related services are on the internet
• All those services can be deployed physically
on onshore data centres. No data traffic will
be offshore.
LoRaWAN Architecture
• LoRaWAN End Device only communicates with
LoRaWAN Gateway, never with each other or
any other gateways/base stations
• LoRaWAN Gateway only forwards data
between End Device and Network Server.
• Target Network Server can/should be
configurable in the Gateway config
80. Indonesia’s LoRa “Makers”
Academics & Hobbyists
(For research & assignments
purpose, or just for fun)
Professionals
Startups
Industrials
SI & Consultants
Disclaimer: It’s qualitative data
81. Republic of IoT (RIoT) 2017 Hackathon
LoRa Shield
The Hackathon featured these hardware kits and used LoRa
as connectivity tech of choice
RIoT is Makestro’s yearly program in collaboration with Indonesia’s Ministry of ICT
82. *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
Some Communities
Indonesia
I n d o n e s i a
Maker4Nation
Indonesia
86. Cost
Low cost, easily accessible modules
Varying alternatives of gateway, either self-build or
carrier-grade
No license or subscription fee
Fits the need
Depends on use case, low data rate is sufficient for
transmitting our sensors’ data (uplink) and infrequent
control (downlink)
Low power nature, 50mA on TX, allows longer
battery life or smaller battery
Because we can
We can deploy end-to-end LoRa/LoRaWAN-backed
connectivity by ourselves, less dependency
Why We Choose LoRa?
Albeit connectivity agnostic, we choose LoRa
for these reasons:
j
87. makestroid
makestroid
makestroid
makestro.com
An Indonesia Platform for Maker:
to “democratize” knowledge, hardware
kit, and software to help makers to start
making in hardware, to drive into
Internet of Things
Start Making at
Learning
Hardware
Marketplace
Software &
Cloud
Community
RIoT is Makestro’s program for nurturing IoT
makers, officially supported by Indonesia’s
Ministry of ICT