Professional Documents
Culture Documents
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 1
Agenda - Argentina
1. Introducción rápida a LoRaWAN
a) Introduccion a Yeap!
2. Herramientas de Microchip para LoRaWAN
a) RN2903A >> Comandos básicos
b) RN2903A >> Planes de frecuencia
3. LoRaWAN en la vida real
a) Alta de cuenta Yeap
b) Alta de dispositivo
c) Flujo de datos
d) DASS
4. My Devices
a) Creación de cuenta
b) Nuevo dispositivo LoRaWAN
5. Node-RED
a) Fundamentos
b) Ejemplo con LoRaWAN
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 2
Class Objectives
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 3
Agenda
What is LoRa® and LoRaWAN™ (20min)
Microchip’s LoRa® and LoRaWAN™ Solutions
IoT Sensor: The SmartHuman board (15min)
Demo 1 – Collect Data (temp and EUI) on SmartHuman (10min)
Network Server: Yeap! (15min)
Lab 1 – TTN Account (pre-created accounts) (15min)
Lab 2 – Connect SmartHuman to Gateway and see data in the
Yeap DASS Interface (40min)
User Application: Node-RED (20min)
Demo 2 – Node-RED Application (20min)
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 4
Agenda
The IoT with LoRaWAN™
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 5
Agenda
The IoT with LoRaWAN™
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 6
Agenda
The IoT with LoRaWAN™
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 7
Sub-Agenda
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 8
Sub-Agenda
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 9
LoRaWAN™ Network Protocol
LoRa® Technology Modulation
Proprietary Spread Spectrum Technology
Developed by Semtech Corporation (http://www.semtech.com/)
Chirped-FM
Processing gain = increased receive sensitivity
Enables longer range at expense of lower data rate
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 10
LoRaWAN™ Network Protocol
LoRa® Technology Modulation
Spreading Factor (SF)
Programmable SF:
7, 8, 9, 10, 11, 12
The higher the SF the more information transmitted per bit;
therefore higher processing gain
Bandwidth (BW)
Programmable signal BW settings:
125 kHz, 250 kHz, 500 kHz
For a given SF, a narrower BW = increased receive sensitivity;
however, increased time on air
Forward Error Correction (FEC) Code Rate (CR)
Additional coding rate provides more redundancy to detect errors
and correct them
Great info @ https://youtu.be/T3dGLqZrjIQ?t=2122
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 11
LoRaWAN™ Network Protocol
LoRaWAN™ Modulation Settings for North America
0 1 2 3 4 Data Rate (DR)
LoRa® Modulation
Range
10 9 8 7 8 Spreading Factor (SF)
125 125
125 125 500 Bandwidth (BW) (kHz)
5468
3125
1757
976
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 12
LoRaWAN™ Network Protocol
LoRaWAN™ Modulation Settings for North America
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 13
LoRaWAN™ Network Protocol
LoRaWAN™ Modulation Settings for North America
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 14
LoRaWAN™ Network Protocol
LoRaWAN™ Modulation Settings for Europe
0 1 2 3 4 5 6 7 Data Rate (DR)
LoRa® Modulation FSK
Range
12 11 10 9 8 7 7 -- Spreading Factor (SF)
125 125 125 --
125 125 125 250 50K Bandwidth (BW) (kHz)
10937
Bitrate (BR) (bps)
5468
3125
1757
-120
976 -123 -122
292 537 -126
-132
-129 Receive Sensitivity (dBm)
-137 -135
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 15
LoRaWAN™ Network Protocol
LoRaWAN™ Modulation Settings for Europe
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 16
LoRaWAN™ Network Protocol
LoRaWAN™ Modulation Settings for Europe
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 17
LoRaWAN™ Network Protocol
LoRaWAN™ Channels
License free Sub-GHz Frequencies
North America: 915 MHz Band
Upstream: 64 channels numbered 0 to 63, DR0 to DR3
Upstream: 8 channels numbered 64 to 71, DR4
Downstream: 8 channels numbered 0 to 7, DR8 to DR13
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 20
Sub-Agenda
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 21
LoRaWAN™ Network Protocol
What is LoRaWAN™ Network Protocol?
Low Power Wide Area Network (LPWAN)
Bidirectional
Simple Star Network Topology Enables simpler network
Low data rate architecture:
• No repeaters
Low cost
• No mesh routing complexity
Long battery life
Ideal for:
Internet of Things (IoT)
Machine-to-Machine (M2M)
Industrial Automation
Low Power Applications
Battery Operated Sensors
Smart City
Smart Meter
Smart Agriculture
http://lora-alliance.org/What-Is-LoRa/Technology
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 22
LoRaWAN™ Network Protocol
LoRaWAN™ Network
Application
Server
Network
Server
Gateways
End-Devices
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 23
LoRaWAN™ Network Protocol
How does LoRaWAN™ Technology Work?
Physical Topology
End-Devices Gateways Network Application
Server Servers
* May physically be
one server
Sub-GHz RF IP IP
Sub-GHz RF IP IP
Sub-GHz RF IP IP
Sub-GHz RF IP IP
Sub-GHz RF
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 33
Sub-Agenda
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 35
LoRaWAN™ Network Protocol
End-Device Classes
Each end-device class has different
behavior depending on the choice of
optimization:
Battery Powered – Class A
Low Latency – Class B
No Latency – Class C
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 36
LoRaWAN™ Network Protocol
End-Device Classes
Battery Powered – Class A
Bidirectional communications
Unicast messages
Small payloads
Long intervals
End-device initiates communication (uplink)
Server communicates with end-device (downlink) during
predetermined response windows:
RxDelay2
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 37
LoRaWAN™ Network Protocol
End-Device Classes
Battery Powered – Class A
Pros
Lowest power consumption = longest battery life
Cons
Long latency
Examples
Battery powered sensors
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 38
LoRaWAN™ Network Protocol
End-Device Classes
Low Latency – Class B
Bidirectional with scheduled receive slots
Unicast and Multicast messages
Small payloads
Long intervals
Periodic beacon from gateway
Extra receive window (ping slot)
Server can initiate transmission at fixed intervals
BCN PNG Transmit RX1 RX2 BCN
RxDelay1
RxDelay2
Ping Slot
Beacon Period
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 39
LoRaWAN™ Network Protocol
End-Device Classes
Low Latency – Class B
Pros
Deterministic latency
Cons
Higher power consumption
Examples
Battery powered actuator end-device
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 40
LoRaWAN™ Overview
End-Device Classes
No Latency – Class C
Bidirectional communications
Unicast and Multicast messages
Small payloads
Server can initiate transmission at any time
End-device is constantly receiving
RxDelay1
RxDelay2
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 41
LoRaWAN™ Network Protocol
End-Device Classes
No Latency – Class C
Pros
Lowest receive latency
End-device has continuous receive window
Cons
Highest power consumption
(expect end-device to be mains powered)
Examples
Mains power low-latency actuator end-device
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 42
Sub-Agenda
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 44
LoRaWAN™ Network Protocol
End-Device Activation (Joining)
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 45
LoRaWAN™ Network Protocol
End-Device Activation (Joining)
Device Address (DevAddr)
32-bit identifier
Unique within the network
Present in each data frame
Shared between End-device, Network Server, and
Application Server
Differentiates nodes within the network,
allowing the network to use the correct
encryption keys and properly interpret the data
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 46
LoRaWAN™ Network Protocol
End-Device Activation (Joining)
Network Session Key (NwkSKey)
128-bit AES encryption key
Unique per end-device
Shared between end-device and Network Server
Provides message integrity for the
communication
Provides security for end-device to Network
Server communication
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 47
LoRaWAN™ Network Protocol
End-Device Activation (Joining)
Application Session Key (AppSKey)
128-bit AES encryption key
Unique per end-device
Shared between end-device and Application Server
Used to encrypt / decrypt application data messages
Provides security for application payload
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 48
LoRaWAN™ Network Protocol
End-Device Activation (Joining)
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 49
LoRaWAN™ Network Protocol
End-Device Activation (Joining)
Over-the-Air-Activation (OTAA)
End-device transmits Join Request to application
server containing:
Globally unique end-device identifier (DevEUI)
Application identifier (AppEUI)
Authentication with Application key (AppKey)
End-device receives Join Accept from application
server
(continued…)
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 50
LoRaWAN™ Network Protocol
End-Device Activation (Joining)
Over-the-Air-Activation (OTAA)
End-device authenticates Join Accept
End-device decrypts Join Accept
End-device extracts and stores Device Address
(DevAddr)
End-device derives:
Network Session Key (NwkSKey) Security
Application Session Key (AppSKey) Keys
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 51
LoRaWAN™ Network Protocol
End-Device Activation (Joining)
Activation By Personalization (ABP)
The following information is configured at
production time:
Device Address (DevAddr)
Network Session Key (NwkSKey)
Application Session Key (AppSKey)
No over the air handshaking
Device is ready to communicate on the network
without any additional procedure.
Note that the end result is the same, the DevAddr
and security keys are now known to the end-
device
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 52
LoRaWAN™ Network Protocol
Security
Logical Data Flow (Programmer’s Model)
End-Devices
Gateway Network Application
Server Server
IP IP
Application
Sub-GHz RF
Application
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 53
LoRaWAN™ Network Protocol
Security
Based on 802.15.4 Security
AES-128
Enhancement
Network Session Key (NwkSKey)
Application Session Key (AppSKey)
Network Server authenticates Application Data
Network Server cannot decrypt Application
Data*
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 54
Sub-Agenda
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 55
LoRaWAN™ Network Protocol
End-Device Data Communications (Class A)
Uplink Message
End-Device to Network Server relayed by one or
many Gateways
Network Application
End-Devices Gateways
Server Servers
Uplink
Sub-GHz RF IP IP
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 56
LoRaWAN™ Network Protocol
End-Device Data Communications (Class A)
Downlink Message
Sent by the Network Server to only one End-Device
and is relayed by a single Gateway
Network Application
End-Devices Gateways
Server Servers
Downlink
Sub-GHz RF IP IP
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 57
LoRaWAN™ Network Protocol
End-Device Data Communications (Class A)
Unconfirmed-Data Message
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 58
LoRaWAN™ Network Protocol
End-Device Data Communications (Class A)
Unconfirmed-Data Message
Gateways Network Application
Server Servers
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 59
LoRaWAN™ Network Protocol
End-Device Data Communications (Class A)
Unconfirmed-Data Message
Gateways Network Application
Server Servers
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 60
LoRaWAN™ Network Protocol
End-Device Data Communications (Class A)
Unconfirmed-Data Message
Gateways Network Application
Server Servers
Data
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 62
LoRaWAN™ Network Protocol
End-Device Data Communications
Confirmed-Data Message
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 63
LoRaWAN™ Network Protocol
End-Device Data Communications (Class A)
Confirmed-Data Message
Gateways Network Application
Server Servers
Data
ACK
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 70
LoRaWAN™ Network Protocol
End-Device Data Communications (Class A)
Application Server Data Message
Gateways Network Application
Server Servers
Data
Data
Zzz…
Data
Data
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 74
LoRaWAN™ Network Protocol
End-Device Data Communications (Class A)
Application Server Data Message
Gateways Network Application
Server Servers
Data
Data
Data
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 79
LoRaWAN™ Network Protocol
Adaptive Data Rate (ADR)
LoRaWAN™ can manage
data rate and
RF power output
for each end-device to
Optimize for fastest data rate,
Maximize battery life, and
Maximize network capacity
based on range from gateway
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 80
Agenda
What is LoRa® and LoRaWAN™
Microchip’s LoRa® and LoRaWAN™ Solutions
IoT Sensor: The SODAQ ExpLoRer
Lab 1 – Collect Data (temp and EUI) on ExpLoRer
IoT Gateway: A LoRaWAN™ Gateway
Network Server: The Things Network
Lab 2 – TTN Account (pre-created accounts)
Lab 3 – Connect ExpLoRer to Gateway and see data in the TTN
Dashboard
User Application: Node-RED
Lab 4 – Node-RED Application
Lab 5 – Bonus: Two-Way Communication
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 82
LoRa® Technology Wireless Modules
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 83
Open Module Scheme
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 84
Open Module Memory Estimation
ROM RAM
NA915 Free 40% Free
45% 55% 60%
Occupied Occupied
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 85
LoRa® Roadmap Strategy
ARM-based Module – Available 2H’17
• Easy to use Modules SiP feature set in module form-factor
Size & cost optimized
• LoRa® Alliance Certified SAMR--M Enhanced crypto/authentication options
• Regulatory Certified
• Custom Code Development ARM-based SiP – Available 2H’17
• Reduce Cost and Size • Cortex® M0+ MCU + Radio
• Atmel Studio + ASF LoRa Library
• Low power Sleep
• Smallest form-factor
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 86
Agenda
The IoT with LoRaWAN™
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 87
Smart Human Board
General Purpose Pins
CCS811 – Air
quality Sensor
ENS210 – Humidity
and temp sensor
PIC18F26J50
USB bridge
Power LED
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 88
Demo 1
Collect Data on
SmartHuman
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 89
Demo 1 Objectives
Understand SmartHuman
Collects temperature data from the
temperature sensor.
Collects DevEUI and AppKey of RN2903
Displays temperature, DevEUI, and
AppKey in terminal
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 90
Agenda
What is LoRa® and LoRaWAN™
Microchip’s LoRa® and LoRaWAN™ Solutions
IoT Sensor: The SODAQ ExpLoRer
Lab 1 – Collect Data (temp and EUI) on ExpLoRer
IoT Gateway: A LoRaWAN™ Gateway
Network Server: YEAP!
Lab 1 – YEAP! Accounts
Lab 2 – Connect SmartHuman to YEAP! and see data on the
dashboard
User Application: Node-RED
Demo 2 – Node-RED Application
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 91
Lab 2
The Things Network
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 93
Lab 2 Objectives
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 95
Lab 3
Connect ExpLoRer to
Gateway and see data in
the TTN Dashboard
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 96
Lab 3 Objectives
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 97
Lab 3 Summary
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 98
Agenda
What is LoRa® and LoRaWAN™
Microchip’s LoRa® and LoRaWAN™ Solutions
IoT Sensor: The SODAQ ExpLoRer
Lab 1 – Collect Data (temp and EUI) on ExpLoRer
IoT Gateway: A LoRaWAN™ Gateway
Network Server: The Things Network
Lab 2 – TTN Account (pre-created accounts)
Lab 3 – Connect ExpLoRer to Gateway and see data in the TTN
Dashboard
User Application: Node-RED
Lab 4 – Node-RED Application
Lab 5 – Bonus: Two-Way Communication
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 99
Agenda
The IoT with LoRaWAN™
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 100
LoRaWAN™ API
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 102
IoT API
Node-Red
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 103
Node-Red
What is Node-Red
Node-RED is a programming tool for wiring together
hardware devices, APIs and online services in new and
interesting ways.
It provides a browser-based editor that makes it easy to
wire together flows using the wide range of nodes in the
palette that can be deployed to its runtime in a single-
click.
JavaScript functions can be created within the editor
using a rich text editor.
A built-in library allows you to save useful
functions, templates or flows for re-use.
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 104
Node-Red
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 105
Node-Red
Built on Node.js
The light-weight runtime is built on
Node.js, taking full advantage of its event-
driven, non-blocking model. This makes it
ideal to run at the edge of the network on
low-cost hardware such as the Raspberry Pi
as well as in the cloud.
With over 225,000 modules in Node's
package repository, it is easy to extend the
range of palette nodes to add new
capabilities.
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 106
Node-Red
What is Node.js?
Node.js is a server-side platform built on Google
Chrome's JavaScript Engine (V8 Engine).
Node.js was developed by Ryan Dahl in 2009
and its latest version is v0.10.36.
Node.js is an open source, cross-platform
runtime environment for developing server-side
and networking applications. Node.js
applications are written in JavaScript, and can
be run within the Node.js runtime on OS
X, Microsoft Windows, and Linux.
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 107
Node-Red
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 109
Node-Red
Adding TTN node (flows.node-red.org)
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 110
Node-Red
Launching Node-red
Browsing
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 111
Node-Red
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 112
Node-Red
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 113
Node-Red
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 114
Node-Red
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 115
Node-Red
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 116
Lab 4
Node-RED Application
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 117
Lab 4 Objectives
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 118
Lab 4 Summary
Today we covered:
How to collect temperature data with an
ARDUINO® Sketch.
How a global LoRaWAN™ network like
The Things Network works.
How to create a full IoT ecosystem by
sending data through the entire IoT data
path
IoT device Gateway Network Server User Application
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 120
Additional Resources
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 121
Dev Tools For This Class
SODAQ ExpLoRer
SODAQ ExpLoRer Support Page
Purchase on MicrochipDirect
Gateway
The Things Network
Microchip
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 122
Appendix
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 123
LoRa® RN2xx3 Module
Details
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 124
LoRa® Technology Wireless Modules
General Features
Fully integrated module
On-board LoRaWAN™ Class A protocol stack
ASCII Command Interface over UART
UART Device Firmware Upgrade (DFU)
Integrated MCU and Crystal
EUI-64 Node Identity Serial EEPROM
14 GPIOs
Compact form factor: 17.8 x 26.7 x 3 mm
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 125
LoRa® Technology Wireless Modules
Block Diagram
Host MCU
RN2483 / RN2903
MCU
UART
Command Interface
Status LEDs,
switches, External Antenna(s)
logic IOs, etc.
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 126
LoRa® Technology Wireless Modules
RN2483 LoRa® Technology Transceiver Module
RN2483
VDD
RFL RFH
GND
TX RX Status LEDs,
RX TX switches,
Host MCU UART GPIOs 14
CTS RTS logic IOs,
RTS CTS etc.
Note: Optional RTS and CTS control lines will be supported in future firmware releases.
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 127
LoRa® Technology Wireless Modules
RN2903 LoRa® Technology Transceiver Module
915 MHz
RN2903
VDD
RFH
GND
TX RX Status LEDs,
RX TX switches,
Host MCU UART GPIOs 14
CTS RTS logic IOs,
RTS CTS etc.
Note: Optional RTS and CTS control lines will be supported in future firmware releases.
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 128
LoRa® Technology Wireless Modules
Development Tools
RN-2483-MOTE
RN-2903-MOTE RN-2483-PICTAIL™
RN-2903-PICTAIL
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 129
LoRa® Technology Wireless Modules
OLED
Display
USB Host MCU
Mini-B
Connector USB SPI
EUSART
TMR1 RN2483/RN2903
LEDs GPIO Module
ADC
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 130
LoRa® Technology Wireless Modules
Control Interface
UART (TX/RX) communication
Default Baud Rate: 57600, 8N1, no flow control
Supports Auto Baud Detection
Command Interface
Human Readable Text
Command Request => Command Reply / Replies
Command Request initiated by Host MCU
Command Reply initiated by the LoRa® Technology
Wireless Module
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 131
LoRa® Technology Wireless Modules
Command Syntax
Key word(s) issued, followed by optional parameter(s)
Separated by space Character
Key Word(s) Case Sensitive
Parameter(s) Case Insensitive
CR+LF Command Delimiter
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 132
LoRa® Technology Wireless Modules
Command Interface
Command Interface
mac
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 133
LoRa® Technology Wireless Modules
Command Interface
Command Interface
mac
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 134
LoRa® Technology Wireless Modules
mac : Issues LoRaWAN™ Class A protocol
network communication behaviors, actions
and configurations commands
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 135
LoRa® Technology Modules
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 136
LoRa® Technology Wireless Modules
Command Interface
Command Interface
mac
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 137
LoRa® Technology Wireless Modules
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 138
LoRa® Technology Wireless Modules
< radio cw on
> ok
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 139
LoRa® Technology Wireless Modules
Command Interface
sys : Issues system level behavior actions, gathers status
information on the firmware and hardware version, or
accesses the module user EEPROM memory
Command Interface
mac
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 140
LoRa® Technology Wireless Modules
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 141
LoRa® Technology Wireless Modules
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 142
Appendix MQTT
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 143
Appendix MQTT
machine-to-machine (M2M)/"Internet of
Things" connectivity protocol
The protocol uses a publish/subscribe
architecture
TCP/IP
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 144
MQTT methods
Connect
Waits for a connection to be established with the server.
Disconnect
Waits for the MQTT client to finish any work it must do, and for the TCP/IP session
to disconnect.
Subscribe
Waits for completion of the Subscribe or UnSubscribe method.
UnSubscribe
Requests the server unsubscribe the client from one or more topics.
Publish
Returns immediately to the application thread after passing the request to the MQTT
client.
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 145
MQTT QoS
Quality of service
QoS 0 – at most once
The minimal level is zero and it guarantees a best effort
delivery. A message won’t be acknowledged by the receiver or
stored and redelivered by the sender.
QoS 1 – at least once
It is guaranteed that a message will be delivered at least once
to the receiver.
QoS 2 – only once
It guarantees that each message is received only once by the
counterpart.
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 146
MQTT LWT
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 147
Command : MQTT
Device Broker
SUBSCRIBE
/$CMD/group_id/device_id/<cmd>
PUBLISH
/$CMD/group_id/device_id/<cmd>
acknowledgement (based on QoS)
PUBLISH
/$CMD/group_id/device_id/<cmd>/req_id
acknowledgement (based on QoS)
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 149
LEGAL NOTICE
SOFTWARE:
You may use Microchip software exclusively with Microchip products. Further, use of Microchip software is subject to the copyright notices, disclaimers, and any license
terms accompanying such software, whether set forth at the install of each program or posted in a header or text file.
Notwithstanding the above, certain components of software offered by Microchip and 3rd parties may be covered by “open source” software licenses – which include
licenses that require that the distributor make the software available in source code format. To the extent required by such open source software licenses, the terms of
such license will govern.
MICROCHIP DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING ANY IMPLIED WARRANTIES OF
NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY DIRECT OR
INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL, OR CONSEQUENTIAL LOSS, DAMAGE, COST, OR EXPENSE OF ANY KIND RELATED TO THESE MATERIALS OR
ACCOMPANYING INFORMATION PROVIDED TO YOU BY MICROCHIP OR OTHER THIRD PARTIES, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
POSSIBLITY OF SUCH DAMAGES OR THE DAMAGES ARE FORESEEABLE. PLEASE BE AWARE THAT IMPLEMENTATION OF INTELLECTUAL PROPERTY
PRESENTED HERE MAY REQUIRE A LICENSE FROM THIRD PARTIES.
TRADEMARKS:
The Microchip name and logo, the Microchip logo, AnyRate, AVR, AVR logo, AVR
Freaks, BeaconThings, BitCloud, CryptoMemory, CryptoRF, dsPIC, FlashFlex, flexPWR, Heldo, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, LINK
MD, maXStylus, maXTouch, MediaLB, megaAVR, MOST, MOST logo, MPLAB, OptoLyzer, PIC, picoPower, PICSTART, PIC32 logo, Prochip
Designer, QTouch, RightTouch, SAM-BA, SpyNIC, SST, SST Logo, SuperFlash, tinyAVR, UNI/O, and XMEGA are registered trademarks of Microchip Technology
Incorporated in the U.S.A. and other countries.
ClockWorks, The Embedded Control Solutions Company, EtherSynch, Hyper Speed Control, HyperLight Load, IntelliMOS, mTouch, Precision Edge, and Quiet-Wire are
registered trademarks of Microchip Technology Incorporated in the U.S.A.
Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, BodyCom, chipKIT, chipKIT
logo, CodeGuard, CryptoAuthentication, CryptoCompanion, CryptoController, dsPICDEM, dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, EtherGREEN, In-
Circuit Serial Programming, ICSP, Inter-Chip Connectivity, JitterBlocker, KleerNet, KleerNet logo, Mindi, MiWi, motorBench, MPASM, MPF, MPLAB Certified
logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, PureSilicon, QMatrix, RightTouch logo, REAL
ICE, Ripple Blocker, SAM-ICE, Serial Quad I/O, SMART-I.S., SQI, SuperSwitcher, SuperSwitcher II, Total
Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and
other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries.
GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries.
All other trademarks mentioned herein are property of their respective companies.
© 2017, Microchip Technology Incorporated, All Rights Reserved.
© 2017 Microchip Technology Incorporated. All Rights Reserved. 21080 IoT3 Slide 150