3rd Global Azure Bootcamp
organized by
https://edu.dycode.co.id/azurebootcamp/
A BIG thank you to the 2017 Global Sponsors!
For providing the “Stuff We All Get”!
Sponsor Offering
Cloudmonix
https://cloudmonix.com/
Cloudmonix offers 1 full month of unlimited
monitoring under the Ultimate plan.
SentryOne
http://www.sentryone.com/
SQL Sentry offers an extended evaluation for
every attendee.
ServiceBus360
http://www.servicebus360.com/
Servicebus360 offers an extended license until
September 30 for all attendees, and this for 3
namespaces, 3 alarms per namespace, 3
resources per namespace to monitor and 2
users.
OpsGility
http://www.Opsgility.com/
Opsgility offers a 30 day subscription free trial
for all attendees.
“Stuff We All Get”
Raffle Prizes
1 Winner: One license chosen from ReSharper, dotTrace Memory, dotTrace
Performance, dotCover, dotPeek, PhpStorm, PyCharm, IntelliJ IDEA, AppCode,
WebStorm, RubyMine. You’ll receive a voucher with a code from the organizers.
MyGet is offering a free Starter subscription for 1 year for 1 attendee per location.
Give your Full name and email to the Organizers.
1 Winner: a 1 year license of DBSentry (formerly Performance Advisor for Azure
SQL Database) for raffle per location. Give your Full name and email to the
Organizers.
They offer 3 12-month subscriptions per GAB Location.
Give your Full name, email phone and company to the Organizers.
Time to get going!

Have a GREAT Azure day!
Azure
IoT Hub
GLOBAL AZURE BOOTCAMP 2017 - Bandung, April 22
for Low-Power
Long-Range IoT
Connectivity
Internet of Things
Connectivity
First coined in 2009 by Kevin Ashton, RFID
pioneer and cofounder of the Auto-ID Center at
the Massachusetts Institute of Technology (MIT)
Internet of Things
“Network of physical objects with embedded
electronics, software, connectivity, and people to
enable connectivity to exchange data, for
intelligent applications and services„
Internet of Things
Things Connectivity People & Processes
Data Data
Internet of Things
A story in 2003
around IoT connectivity
My final year
project in 2003
was kind of IoT
Design and Implementation of Home Lighting
Control System and Home Monitoring System
using Mobile Phone over Internet
Circa 2003, original archive
Lamps
Web Cam
Modem for
SMS & GPRS
Home
Server
GPRS GPRS
My final project
Architecture
“The Thing”
GPRS
2.5G, 40 - 80 kbps
Mobile Home Server
Achieved 12 secs/frame
NOT 12 frame/secs (fps) :)
My final project
Video streaming
Circa 2003, original archive
That’s what I had in 2003
for ubiquitous (wide area) IoT connectivity
CONNECTIVITY
is one of the biggest challenges to
creating a true IoT
…yet it always fascinates me!
Fast forward to now
oh hi…
Before continuing…
fb.com/andri.yadi | a at dycode dot com
http://andriyadi.me | http://dycodex.com
Andri Yadi
makestro.comCEO
ambassador
150+ Speakings
30+ talks about IoT
for the past 2 years
Proudly coder for 

19 years
ASM, QBasic, Pascal, c, C++, Java, PHP,
Bash, C#, Visual Basic, HTML, JavaScript,
Python, Objective-C, Swift
.NET, Qt/QML, Java ME/EE/SE, Android
SDK, iOS SDK, Node.js
ARM MBED, ESP8266, Arduino/Wiring
IoT Software Lead, DycodeX
Cellular IoT (CIoT)
connectivity we NOW have
Fast, efficient 

Up to 10 Mbps for 4G LTE
Ubiquitous coverage
Reliable & secure
Not designed for IoT in mind
High power consumption
Relatively expensive: modules,
data plan
Provisioning, manageability
Advantages Considerations
Cellular IoT (CIoT)
connectivity we WILL have
EC-GSM-IoT
LTE-M / eMTC
NB-IoT
Low data throughput
Low power
Low device & deployment cost
Extended coverage
Technologies Common Traits
3
Evolution of IoT Connectivity in 3GPP/GSMA
5 MHz200 kHz 1.4 MHz 5/10/15/20 MHz
Other
influences
GSM LTE Cat-1+
Delay
Tolerant
Access
Cat-0
Cat-M1
Cat-NB1EC-GSM
UMTS
GSM is the original wide-area M2M
wireless connectivity technology. EC-GSM
enhances it to keep it competitive.
UMTS did not see any significant push
towards a low-power variant.
LTE-M (Cat-M1) is a concession to the
low-power/low-throughput device within
mainstream LTE.
NB-IoT (Cat-NB1), a new RAN technology,
is the official LPWAN contestant from the
3GPP/GSMA stable
Evolution of IoT Connectivity
in 3GPP/GSMA
LPWA
Competing technologies
Communication Technologies - Overview
Mbps
Kbps
bps
10 m 100 m 1 km 10 km
Baud rate
Range
Wi-Fi / BT
Short Range LPWAN
ST Confidential
Cellular
-M
-NB-IOT
5G
850/1900 MHz
900/1800 MHz
Sub-GHz
2.4 GHz
WIFI/BT
Short Range LPWAN
Cellular
IoT Connectivity: Range vs Speed
Cellular
Range
Battery Life
LONG
SHORT LONG
Local network
(WiFi, ZigBee, Z-Wave)
Personal network
(Bluetooth)
Low-Power Wide-Area Network
(LPWAN: Sigfox, LoRa, Dash7)
Source: Alexander Vanwynsberghe, Blog article 'Long-range radios will change how the Internet of Things communicates'
IoT Connectivity: Range vs Power
What is LPWA
Low Power, Wide Area Networks
Low data throughput = High
sensitivity = Long range
Relatively low cost
Multiple Access = One-to-Many
Architecture
Using licensed or unlicensed
spectrum
License-free Spectrum
EC-
-m
Licensed Spectrum
LPWA: Technologies
Disclaimer
Obviously, I can not go deep into each
technologies!
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 for ISM band

In Europe, duty-cycle is 1% for end-devices
Upstream/Downstream
SIGFOX – nearly entirely upstream 

LoRaWAN – has 3 classes supporting different balances of upstream & downstream
Hardware & Network Availability
Is it available NOW?
LPWA: Selection Factors
LoRa?
Wireless modulation technology
Physical (PHY) layer for long range
communications
Operates in the license-free ISM bands all
around the world
• 433, 868, 915 Mhz
• Regulated (power, duty-cycle, bandwidth) E.g: EU:
0.1% or 1% per sub-band duty-cycle limitation (per
hour)
Sensitivity: -142 dBm
Link budget (EU): 156 dB
What is LoRa
ISM Regulation 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
919 to 923MHz
Communications protocol and
architecture that utilizes the LoRa
physical layer
Data rates are defined that range from
300bps to 5.5kbps 

Has 2 high-speed channels at 11kbps and 50kbps
(using FSK modulation)
It supports
• secure bi-directional communication,
• mobility
• localization
What is LoRaWAN
LoRa/LoRaWAN Architecture
DEMO
ENVIRONMENTAL
Demo…
Demo Node: ESPectro + LoRa + Alora Kit
by DycodeX
ESPectro
ESP8266
by DycodeX
Alora Kit
by DycodeX
WiFi
WiFi Access

Point
Cellular
(3G/4G)
Backend-side
Sensor
Node
Demo #1: WiFi Connection
Things-side
Azure IoT Hub
Demo #1: Code
WiFiClientSecure	tlsClient;	
AzureIoTHubMQTTClient	client(tlsClient,	IOTHUB_HOSTNAME,	DEVICE_ID,	DEVICE_KEY);	
void	setup()	{	
				Serial.begin(115200);	
		Serial.print("Connecting	to	WiFi...");	
				//Begin	WiFi	joining	with	provided	Access	Point	name	and	password	
				WiFi.begin(AP_SSID,	AP_PASS);	
				//Should	wait	for	WiFi	connection	here…

				Serial.print("nBeginning	Azure	IoT	Hub	Client...	");	
				if	(client.begin())	{	
								Serial.println("OK");	
				}	
}	
void	loop()	{	
				//MUST	CALL	THIS	in	loop()	
				client.run();	
				if	(client.connected())	{	//	Publish	a	message	roughly	every	3	second.	Only	after	time	is	retrieved	and	set	properly.	
								if(millis()	-	lastMillis	>	3000	&&	timeStatus()	!=	timeNotSet)	{	
												lastMillis	=	millis();	
			//Read	the	actual	temperature	from	sensor	
												float	temp,	press;	
												readSensor(&temp,	&press);	
						//Get	current	timestamp,	using	Time	lib	
												time_t	currentTime	=	now();	
												//Publish	to	Azure	IoT	Hub	
												AzureIoTHubMQTTClient::KeyValueMap	keyVal	=	{{"MTemperature",	temp},	{"MPressure",	press},	{"DeviceId",	DEVICE_ID},	{"EventTime",	currentTime}};	
												client.sendEventWithKeyVal(keyVal);	
								}	
				}	
				delay(10);	//	<-	fixes	some	issues	with	WiFi	stability	
}	
Sample & Library: 

https://github.com/andriyadi/AzureIoTHubMQTTClient
Demo #2: Leverage LoRa/LoRaWAN
LoRa
LoRaWAN

Gateway
Bridge
Cellular
(3G/4G)
Backend-side
Sensor
Node Azure IoT Hub
Things-side
Network Server
MQTT AMQP
LoRaWAN Gateway
Demo #2: Payload Format
LoRa
LoRaWAN

Gateway
Bridge
Cellular
Backend-side
Sensor
Node
Azure IoT Hub
Things-side
Network Server
MQTT AMQP
9B 09 05 24 4B 
1D 18 09 32 1E 
65 A3 00 00 79 
01 FF FF 55 B8 
D2 BB AB 47 4A 
00 C7 02 E5 FE 
D6 FF F6 FF F5 
FF 2B E2 50 00
9B 09 05 24 4B 
1D 18 09 32 1E 
65 A3 00 00 79 
01 FF FF 55 B8 
D2 BB AB 47 4A 
00 C7 02 E5 FE 
D6 FF F6 FF F5 
FF 2B E2 50 00
{
“lux”, 31.21,
“temp”: 23.21
}
{
“lux”, 31.21,
“temp”: 23.21
}
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 mqttCertPath = process.env.TTN_MQTT_CERT || `${__dirname}/mqtt-ca.pem`
const options = { protocol: ‘mqtts', ca: fs.readFileSync(mqttCertPath) }
const bridge = new ttnazureiot.Bridge(region, appId, accessKey, hubName, keyName, key, options)
bridge.on('info', message => { console.log('[INFO]', message) })
bridge.on('error', message => { console.warn('[ERROR]', message) })
bridge.on('warn', message => { console.warn('[WARN]', message) })
Why the hassle?
SCALABILITY!
IoT in Agriculture
LoRaWAN Architecture
Source: http://www.frugalprototype.com/technologie-lora-reseau-lorawan/
Source: https://www.thethingsnetwork.org/wiki/Backend/Home
The Things Network Architecture
Source: https://www.thethingsnetwork.org/wiki/Backend/Home
The Things Network Architecture
Azure Domains
Backend-side
Azure IoT Hub
MQTT
AMQP
HTTPS
… ?
Devices Device Connectivity Storage Analytics Presentation & Action
Event Hubs SQL Database
Machine
Learning
App Service
IoT Hubs
Table/Blob
Storage
Stream
Analytics
Power BI
Service Bus DocumentDB HDInsight
Notification
Hubs
External Data
Sources
External Data
Sources
Data Factory Mobile Services
BizTalk Services
{ }
ASSET TRACKING
A real-world use case, that we did…
(Planned) tens of thousand of assets
to track
Deployed in country-side: no cellular
coverage, hard to reach once
deployed
Battery should last at least 3 years
Trigger alert if asset is moved and
track its movement
Requirement
Low power MCU: Microchip/Atmel ATSAMD21
Sufficient clock, flash, RAM, peripherals

Interrupt: RTC, external -> useful for wake-up
Brain
Sensor
IMU sensor: gyroscope, accelerometer,
magnetometer. Will wake up MCU upon
significant movement
Obviously, need GPS module to track location
Battery
Lithium-thionyl chloride cells (Li-SoCl2) to
reduce self-discharging rate
19Ah enough for 3+ years
Solution: Hardware-side
Most deployment areas are not covered by
any cellular services
Cellular
Wi-Fi
Nearby “civilization” is 5 km away.
Not having clean LoS to use directional
antenna
Power consumption consideration
LPWA
Can be an option, but which one? It should be:
Private network

Easy and cheap enough to implement now
Options: Connectivity
3 - 5km LoRaWAN

Gateway
LoRaWAN
Network

Server
LoRaWAN
Application

Server
Cellular
(3G/4G)
Makestro Cloud
as Backend
Tracker
Node
Solution: Architecture
System only wake up upon: timer interrupt and
external interrupt (significant motion & displacement)
During sleeping:

Turn off unneeded MCU peripherals

Turn off GPS and radio

Keep IMU sensor alive with the lowest update
frequency
Only transmit data:

By timer (depends on OTA configuration)

Upon alert/interrupt
Circuit design optimation: reduce pull-ups, etc
Low power technique
by DycodeX
LoRaWAN Tracker Node
GPS/GNSS
Module
Backup/RTC
Battery
GPS
Antenna
LoRa
Antenna
MCU: Atmel
SAMD21
IMU* & Temperature
Sensor
LoRa 

Module
Battery
Gauge
Battery
Charger
Battery
Connector
*IMU = Inertial Measurement Unit: accelerometer,
gyroscope
Internals
LoRaWAN GatewayLoRaWAN Node
How to start?
Use development board + modules!
ESPectro + LoRa + Alora Kit
Rainbowrd
3G & GNSS
WiFi & BLE
NFC
LoRa/
LoRaWAN
Ultimate IoT
connectivity board!
Be a maker!
A movement to “democratize”
knowledge, hardware kit, and software
to help makers to start making in
hardware.
Disclosure: it’s initiated and supported by DycodeX, but doesn’t own it
ENABLING MAKER MOVEMENT
Learning
Shop
Community
Software
Projects, tutorials, videos, news,

professional trainings
Hardware marketplace: kits,
devboards, maker tools
IoT Cloud infrastructure, software 

libraries, sample code
Offline meetups, seminars,
training/hands-on, challenges
makestroid
makestroid
makestroid
DycodeX IS HIRING!
Interns are welcome
x@dycode.com | http://dycodex.com
IoT & maker movement enabler

Global Azure Bootcamp 2017 - Azure IoT Hub with LoRa Connectivity