Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with...

127
© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 1 19065 IoT4 Getting Up and Running with LoRaWAN™ Long-Range Networking

Transcript of Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with...

Page 1: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 1

19065 IoT4

Getting Up and Running with LoRaWAN™

Long-Range Networking

Page 2: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 2

Objectives

l At the end of this class, the student will be able to:l List 3 advantages of the LoRaWAN™ Network

Protocol

l Configure, Activate (Join), and Communicate with the RN2903 Wireless Module

l Create a LoRaWAN™ End-device application using the LoRa™ Technology Mote

Page 3: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 3

l Internet of Things ( IoT )

l LoRaWAN™ Network Protocol

l LoRa™ Technology Wireless Modules

l Getting Started with RN2903 Module

l Hands-on Labs

Agenda

Page 4: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 4

l Internet of Things ( IoT )

l LoRaWAN™ Network Protocol

l LoRa™ Technology Wireless Modules

l Getting Started with RN2903 Module

l Hands-on Labs

Agenda

Page 5: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 5

Internet of Things ( IoT )

l Loosely defined paradigml Connected devices

l Communication happens without human intervention

l “Thing” can contribute to “big data”l Cloud-handled data

l Queries on the cloud data can offer a high-level view

Page 6: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 6

Internet of Things ( IoT )

Bluetooth®Bluetooth® Wi-Fi®Wi-Fi® Cellular (2G, 3G, 4G-LTE)Cellular (2G, 3G, 4G-LTE)

Personal Area Local Area Wide Area

Types of Wireless Networks

Page 7: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 7

LoRaWAN™ Network

Smart Agriculture

Smart Energy

Smart City

Smart Home and Security

Monitoring / Control

Light Control

Internet of Things ( IoT )

Page 8: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 8

l The LoRa™ Alliance (http://lora-alliance.org/) is an open, non-profit association of members.

l Mission: to standardize Low Power Wide Area Networks (LPWAN)

l Alliance members will collaborate to drive the global success of the LoRaWAN™ protocol

Internet of Things ( IoT )Who is the LoRa™ Alliance?

Page 9: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 9

l Internet of Things ( IoT )

l LoRaWAN™ Network Protocol

l LoRa™ Technology Wireless Modules

l Getting Started with RN2903 Module

l Hands-on Labs

Agenda

Page 10: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 10

l LoRaWAN™ Network Protocoll LoRa™ Technology Modulation

l How does LoRaWAN™ Technology Work?

l End-Device Classes

l End-Device Activation (Joining)

l Security

l End-Device Data Communication (Class A)

l Adaptive Data Rate (ADR)

Sub-Agenda

Page 11: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 11

l LoRaWAN™ Network Protocoll LoRa™ Technology Modulation

l How does LoRaWAN™ Technology Work?

l End-Device Classes

l End-Device Activation (Joining)

l Security

l End-Device Data Communication (Class A)

l Adaptive Data Rate (ADR)

Sub-Agenda

Page 12: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 12

l Proprietary Spread Spectrum Technologyl Developed by Semtech Corporation (http://www.semtech.com/)

l Chirped-FM

l Processing gain = increased receive sensitivity

l Enables longer range at expense of lower data rate

LoRaWAN™ Network ProtocolLoRa™ Technology Modulation

Page 13: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 13

l Spreading Factor (SF)l Programmable SF:

7, 8, 9, 10, 11, 12

l The higher the SF the more information transmitted per bit; therefore higher processing gain

l Bandwidth (BW)l Programmable signal BW settings:

125 kHz, 250 kHz, 500 kHz

l For a given SF, a narrower BW = increased receive sensitivity; however, increased time on air

l Forward Error Correction (FEC) Code Rate (CR)l Additional coding rate provides more redundancy to detect errors

and correct them

LoRaWAN™ Network ProtocolLoRa™ Technology Modulation

Page 14: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 14

12 11 10 9 8 7

292 537 9761757

3125

5468

10937

7

0 1

LoRa Modulation

3 4 5 6

Range

Bitrate (BR) (bps)

Spreading Factor (SF)

Data Rate (DR)

-137 -135 -132-129

-126-123

Receive Sensitivity (dBm)

-120

LoRaWAN™ Modulation Settings for Europe

125125

125125

125125

250 Bandwidth (BW) (kHz)

LoRaWAN™ Network Protocol

7FSK

--

--50K

-122

2

Page 15: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 15

Longest Distance on LoRa Modulation

l Data Rate (DR) = 0

l LoRa™ modulation

l Spreading Factor (SF) = SF12

l Bandwidth (BW) = 125 kHz

l Coding Rate (CR) = 4/5

l Bit Rate = 292 bps

l Max Application Payload Size = 51 bytesl Time On Air = 2466 ms

LoRaWAN™ Network ProtocolLoRaWAN™ Modulation Settings for Europe

Page 16: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 16

Highest Bit Rate on LoRa Modulation

l Data Rate (DR) = 6

l LoRa™ modulation

l Spreading Factor (SF) = SF7

l Bandwidth (BW) = 250 kHz

l Coding Rate (CR) = 4/5

l Bit Rate = 10937 bps

l Max Application Payload Size = 222 bytes

l Time On Air = 185 ms

LoRaWAN™ Network ProtocolLoRaWAN™ Modulation Settings for Europe

Page 17: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 17

Highest Bit Rate on GFSK Modulation

l Data Rate (DR) = 7

l FSK modulation

l Maximum Bit Rate = 50 kbps

l Max Application Payload Size = 222 bytes

l Time On Air = 39 ms

LoRaWAN™ Network ProtocolLoRaWAN™ Modulation Settings for Europe

Page 18: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 18

LoRaWAN™ Modulation Settings for North America

LoRaWAN™ Network Protocol

10 9 8 7 8

0 1 2 3 4

Range

Bitrate (BR) (bps)

Spreading Factor (SF)

Data Rate (DR)

125125

125125

500 Bandwidth (BW) (kHz)

9761757

3125

5468

12500

LoRa Modulation

Page 19: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 19

Longest Distance on LoRa Modulation

l Data Rate (DR) = 0l LoRa™ modulation

l Spreading Factor (SF) = SF10

l Bandwidth (BW) = 125 kHz

l Coding Rate (CR) = 4/5

l Bit Rate = 976 bps

l Max Application Payload Size = 11 bytes

l Time On Air = 371 ms

LoRaWAN™ Network ProtocolLoRaWAN™ Modulation Settings for North America

Page 20: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 20

Highest Bit Rate on LoRa Modulation

l Data Rate (DR) = 4l LoRa™ modulation

l Spreading Factor (SF) = SF8

l Bandwidth (BW) = 500 kHz

l Coding Rate (CR) = 4/5

l Bit Rate = 12500 bps

l Max Application Payload Size = 242 bytes

l Time On Air = 175 ms

LoRaWAN™ Network ProtocolLoRaWAN™ Modulation Settings for North America

Page 21: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 21

l License free Sub-GHz Frequenciesl Europe: 868 MHz Band

l Network channels can be freely attributed by the network operator

l Three mandatory channels that all gateways should constantly receive:

LoRaWAN™ Network ProtocolLoRaWAN™ Channels

Page 22: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 22

l License free Sub-GHz Frequenciesl North America: 915 MHz Band

l Upstream: 64 channels numbered 0 to 63, DR0 to DR3

l Upstream: 8 channels numbered 64 to 71, DR4

l Downstream: 8 channels numbered 0 to 7, DR8 to DR13

LoRaWAN™ Network ProtocolLoRaWAN™ Channels

Page 23: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 23

l LoRaWAN™ Network Protocoll LoRa Technology Modulation

l How does LoRaWAN™ Technology Work?

l End-Device Classes

l End-Device Activation (Joining)

l Security

l End-Device Data Communication (Class A)

l Adaptive Data Rate (ADR)

Sub-Agenda

Page 24: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 24

l Low Power Wide Area Network (LPWAN)l Bidirectional

l Simple Star Network Topology

l Low data rate

l Low cost

l Long battery life

l Ideal for:l Internet of Things (IoT)

l Machine-to-Machine (M2M)

l Industrial Automation

l Low Power Applications

l Battery Operated Sensors

l Smart City

l Smart Meter

l Smart Agriculture

http://lora-alliance.org/What-Is-LoRa/Technology

What is LoRaWAN™ Network Protocol?

LoRaWAN™ Network Protocol

Enables simpler network architecture:• No repeaters• No mesh routing complexity

Page 25: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 25

LoRaWAN™ Network

LoRaWAN™ Network Protocol

End-Devices

Network Server

Gateways

ApplicationServer

Page 26: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 26

Physical Topology

LoRaWAN™ Network ProtocolHow does LoRaWAN™ Technology Work?

Gateways Network Server

Application Servers

Advanced Network Topology

Sub-GHz RF

End-Devices

IP IP

Page 27: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 27

Physical Topology

LoRaWAN™ Network ProtocolHow does LoRaWAN™ Technology Work?

Gateways Network Server

Application Servers

Advanced Network Topology

* May physically be one server

IP IPSub-GHz RF

End-Devices

Page 28: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 28

Physical Topology

LoRaWAN™ Network ProtocolHow does LoRaWAN™ Technology Work?

IP IP

Advanced Network Topology

Gateways Network Server

Application Servers

Sub-GHz RF

End-Devices

Page 29: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 29

Physical Topology

LoRaWAN™ Network ProtocolHow does LoRaWAN™ Technology Work?

IP IP

Advanced Network Topology

Gateways Network Server

Application Servers

Sub-GHz RF

End-Devices

Page 30: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 30

Physical Topology

LoRaWAN™ Network ProtocolHow does LoRaWAN™ Technology Work?

IP IP

Advanced Network Topology

Gateways Network Server

Application Servers

Sub-GHz RF

End-Devices

Page 31: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 31

End-Device

LoRaWAN™ Network Protocol

l The “Thing” in IoT

l Single-hop wireless communication to one or many Gateway(s).

Sensors

Host MCU

Ap

pli

cati

on

Actuators UART

Lo

RaW

AN

Pro

toco

l

Wireless Module

Rad

io T

ran

sceiv

er

Inte

rnet

Pro

toco

l

Rad

io T

ran

sceiv

er

Page 32: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 32

Gateway

LoRaWAN™ Network Protocol

l Interface the LoRaWAN RF Network to LoRaWAN Backend Services

l Data is “passed through” to Servers

l Connected to Network Server via standard IP connection.

IPIn

tern

et

Pro

toco

l

Rad

io T

ran

sceiv

er

Inte

rnet

Pro

toco

l

Netw

ork

Serv

er

Page 33: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 33

Inte

rnet

Pro

toco

l

Ap

pli

cati

on

Serv

er

Network Server

LoRaWAN™ Network Protocol

Inte

rnet

Pro

toco

l

Netw

ork

Serv

er

IPIP

Inte

rnet

Pro

toco

l

Rad

io T

ran

sceiv

er

l Network Server authenticates data

l If data is addressed to Network Server, data is processed

l Else data will be forwarded to Application Server

l Connected to the Application Server via standard IP connection.

Page 34: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 34

Application Server

LoRaWAN™ Network Protocol

l Consumer of data

l Application Server decrypts data

l Multiple Application Servers can exist within the same LoRaWAN Network

Inte

rnet

Pro

toco

l

Ap

pli

cati

on

Serv

er

IP

Inte

rnet

Pro

toco

l

Netw

ork

Serv

er

Example: Each Application Server handles specific type of data

Electric Meter

Vending Machine

Smoke alarms

Page 35: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 35

LoRaWAN™ Network Protocol

Gateways Network Server

Multiple Application Servers Example

Application Servers

Sub-GHz RF

Page 36: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 36

Logical Data Flow (Programmer’s Model)

LoRaWAN™ Network ProtocolHow does LoRaWAN™ Technology Work?

End-DevicesGateway Network

ServerApplication

Server

IP IP

End-device to/from Network Server

End-device to/from Application Server

Data Data

Page 37: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 37

l LoRaWAN™ Network Protocoll Lora™ Technology Modulation

l How does LoRaWAN™ Technology Work?

l End-Device Classes

l End-Device Activation (Joining)

l Security

l End-Device Data Communication (Class A)

l Adaptive Data Rate (ADR)

Sub-Agenda

Page 38: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 38

l Each end-device class has different behavior depending on the choice of optimization:l Battery Powered – Class A

l Low Latency – Class B

l No Latency – Class C

LoRaWAN™ Network ProtocolEnd-Device Classes

Page 39: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 39

l Battery Powered – Class Al Bidirectional communications

l Unicast messages

l Small payloads

l Long intervals

l End-device initiates communication (uplink)

l Server communicates with end-device (downlink) during predetermined response windows:

End-Device Classes

LoRaWAN™ Network Protocol

RX2

RxDelay1

RxDelay2

Transmit RX1

Page 40: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 40

l Battery Powered – Class Al Pros

l Lowest power consumption = longest battery life

l Cons

l Long latency

l Examplesl Battery powered sensors

End-Device Classes

LoRaWAN™ Network Protocol

Page 41: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 41

l Low Latency – Class Bl Bidirectional with scheduled receive slots

l Unicast and Multicast messages

l Small payloads

l Long intervals

l Periodic beacon from gateway

l Extra receive window (ping slot)

l Server can initiate transmission at fixed intervals

End-Device Classes

LoRaWAN™ Network Protocol

Ping Slot

Beacon Period

RX2

RxDelay1

RxDelay2

Transmit BCNBCN PNG RX1

Page 42: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 42

l Low Latency – Class Bl Pros

l Deterministic latency

l Cons

l Higher power consumption

l Examplesl Battery powered actuator end-device

End-Device Classes

LoRaWAN™ Network Protocol

Page 43: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 43

LoRaWAN™ Overview

l No Latency – Class Cl Bidirectional communications

l Unicast and Multicast messages

l Small payloads

l Server can initiate transmission at any time

l End-device is constantly receiving

RX1 RX2

RxDelay1

RxDelay2

Transmit RX2

Extends RX2 until next TX

End-Device Classes

Page 44: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 44

l No Latency – Class Cl Pros

l Lowest receive latency

l End-device has continuous receive window

l Cons

l Highest power consumption (expect end-device to be mains powered)

l Examplesl Mains power low-latency actuator end-device

End-Device Classes

LoRaWAN™ Network Protocol

Page 45: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 45

l LoRaWAN™ Network Protocoll LoRa™ Technology Modulation

l How does LoRaWAN™ Technology Work?

l End-Device Classes

l End-Device Activation (Joining)

l Security

l End-Device Data Communication (Class A)

l Adaptive Data Rate (ADR)

Sub-Agenda

Page 46: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 46

l Before an end-device can communicate on the LoRaWAN network, it must be activated

l The following information is required:l Device Address (DevAddr)

l Network Session Key (NwkSKey)

l Application Session Key (AppSKey)

Let’s look at each of these in detail…

End-Device Activation (Joining)

LoRaWAN™ Network Protocol

Page 47: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 47

l Device Address (DevAddr)l 32-bit identifier

l Unique within the network

l Present in each data frame

l Shared between End-device, Network Server, and Application Server

l Differentiates nodes within the network, allowing the network to use the correct encryption keys and properly interpret the data

End-Device Activation (Joining)

LoRaWAN™ Network Protocol

Page 48: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 48

l Network Session Key (NwkSKey)l 128-bit AES encryption key

l Unique per end-device

l Shared between end-device and Network Server

l Provides message integrity for the communication

l Provides security for end-device to Network Server communication

End-Device Activation (Joining)

LoRaWAN™ Network Protocol

Page 49: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 49

l Application Session Key (AppSKey)l 128-bit AES encryption key

l Unique per end-device

l Shared between end-device and Application Server

l Used to encrypt / decrypt application data messages

l Provides security for application payload

End-Device Activation (Joining)

LoRaWAN™ Network Protocol

Page 50: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 50

l To exchange this information, two activation methods are available:

End-Device Activation (Joining)

LoRaWAN™ Network Protocol

Activation By Personalization (ABP)

l Shared keys stored at production time

l Locked to a specific network

Over-the-Air Activation(OTAA)

l Based on Globally Unique Identifier

l Over the air message handshaking

Page 51: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 51

l Over-the-Air-Activation (OTAA)l End-device transmits Join Request to application

server containing:l Globally unique end-device identifier (DevEUI)

l Application identifier (AppEUI)

l Authentication with Application key (AppKey)

l End-device receives Join Accept from application server

(continued…)

End-Device Activation (Joining)

LoRaWAN™ Network Protocol

Page 52: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 52

l Over-the-Air-Activation (OTAA)l End-device authenticates Join Accept

l End-device decrypts Join Accept

l End-device extracts and stores Device Address (DevAddr)

l End-device derives: l Network Session Key (NwkSKey)

l Application Session Key (AppSKey)

End-Device Activation (Joining)

LoRaWAN™ Network Protocol

SecurityKeys

Page 53: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 53

l Activation By Personalization (ABP)l The following information is configured at

production time:l Device Address (DevAddr)

l Network Session Key (NwkSKey)

l Application Session Key (AppSKey)

l No over the air handshaking

l Device is ready to communicate on the network without any additional procedure.

l Note that the end result is the same, the DevAddr and security keys are now known to the end-device

End-Device Activation (Joining)

LoRaWAN™ Network Protocol

Page 54: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 54

l LoRaWAN™ Network Protocoll LoRa™ Technology Modulation

l How does LoRaWAN™ Technology Work?

l End-Device Classes

l End-Device Activation (Joining)

l Security

l End-Device Data Communication (Class A)

l Adaptive Data Rate (ADR)

Sub-Agenda

Page 55: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 55

Logical Data Flow (Programmer’s Model)

LoRaWAN™ Network ProtocolSecurity

End-DevicesGateway Network

ServerApplication

Server

Sub-GHz RF

IP IP

Network Session Key (NwkSKey)

Application Session Key (AppSKey)Ap

plic

ati

on

Ap

plic

atio

n

Data Data

Page 56: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 56

l Based on 802.15.4 Security l AES-128

l Enhancementl Network Session Key (NwkSKey)

l Application Session Key (AppSKey)

l Network Server authenticates Application Data

l Network Server cannot decrypt Application Data

LoRaWAN™ Network ProtocolSecurity

Page 57: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 57

l LoRaWAN™ Network Protocoll LoRa™ Technology Modulation

l How does LoRaWAN™ Technology Work?

l End-Device Classes

l End-Device Activation (Joining)

l Security

l End-Device Data Communication (Class A)

l Adaptive Data Rate (ADR)

Sub-Agenda

Page 58: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 58

l Uplink Messagel End-Device to Network Server relayed by one or

many Gateways

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

GatewaysNetwork Server

Application Servers

Sub-GHz RF

End-Devices

IP IP

Uplink

Page 59: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 59

l Downlink Messagel Sent by the Network Server to only one End-Device

and is relayed by a single Gateway

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

GatewaysNetwork Server

Application Servers

Sub-GHz RF

End-Devices

IP IP

Downlink

Page 60: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 60

End-Device Data Message does not require an acknowledgement

Let’s look at an example…

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Unconfirmed-Data Message

Page 61: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 61

LoRaWAN™ Network Protocol

Gateways Network Server

Application Servers

End-Device Data Communications (Class A)

Unconfirmed-Data Message

1. Electric meter transmits data

Page 62: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 62

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Unconfirmed-Data Message

2. Gateway receives data and passes to Network Server

Page 63: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 63

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Unconfirmed-Data Message

3. The Network Server authenticates data and passes it to Electric Meter Application Server

Page 64: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 64

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Unconfirmed-Data Message

4. Electric Meter Application Server decrypts data

Data

Page 65: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 65

End-Device Data Message has to be acknowledged by the receiver

Let’s look at an example…

LoRaWAN™ Network ProtocolEnd-Device Data Communications

Confirmed-Data Message

Page 66: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 66

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Confirmed-Data Message

1. Vending Machine transmits data. It is received by two Gateways.

Page 67: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 67

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Confirmed-Data Message

2. Both gateways “pass through” the data to the Network Server.

Data

Page 68: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 68

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Confirmed-Data Message

3. The Network Server forwards the data to the Vending Machine Applications Server

Page 69: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 69

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Confirmed-Data Message

4. The Vending Machine Applications Server sends an acknowledgement

Page 70: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 70

Gateways Network Server

Application Servers

ACK

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Confirmed-Data Message

5. The Network Server selects the best path (gateway) to transmit the acknowledgement to the end-device.

Page 71: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 71

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Confirmed-Data Message

6. The Gateway transmits the acknowledgement to the end-device

Page 72: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 72

If the Application Server has a Data Message for the End-Device…

… the Application Server has to wait until the End-Device initiates a transmission.

Let’s look at an example…

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Application Server Data Message

Page 73: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 73

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Data

Application Server Data Message

1. The Smoke Detector Application Server has Data for the highlighted Smoke Detector

Page 74: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 74

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

Zzz…

2. However, it has to wait until the Smoke Detector wakes up and transmits a Data Message

Application Server Data Message

Data

Page 75: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 75

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

3. When the Smoke Detect transmits, the Data Message moves Upstream

Application Server Data Message

Data

Page 76: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 76

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

4. Passed through the Gateway…

Application Server Data Message

Data

Page 77: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 77

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

5. … and the Network Server sends to the Smoke Detector Application Server.

Application Server Data Message

DataData

Page 78: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 78

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

6. The Smoke Detector Application Server can now send the data message to the Smoke Detector.

Application Server Data Message

Data

Page 79: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 79

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

7. The Network Server sends the Data Message to the appropriate Gateway.

Application Server Data Message

Page 80: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 80

Gateways Network Server

Application Servers

LoRaWAN™ Network ProtocolEnd-Device Data Communications (Class A)

8. The Data Message is transmitted to the Smoke Detector during one of the two Receive Windows.

Application Server Data Message

Page 81: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 81

l LoRaWAN™ Network Protocoll LoRa™ Technology Modulation

l How does LoRaWAN™ Technology Work?

l End-Device Classes

l End-Device Activation (Joining)

l Security

l End-Device Data Communication

l Adaptive Data Rate (ADR)

Sub-Agenda

Page 82: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 82

l LoRaWAN can managel data rate and

l RF power output

for each end-device to

l Optimize for fastest data rate,

l Maximize battery life, and

l Maximize network capacity

based on range from gateway

Adaptive Data Rate (ADR)

LoRaWAN™ Network Protocol

Page 83: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 83

12 11 10 9 8 7

292 537 9761757

3125

5468

10937

7

0 1 2 3 4 5 6

Range

Bitrate (BR) (bps)

Spreading Factor (SF)

Data Rate (DR)

Adaptive Data Rate (ADR)

125125

125125

125125

250 Bandwidth (BW) (kHz)

LoRaWAN™ Network Protocol

7

--

--50K

Note: European data rates shown

Page 84: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 84

l LoRaWAN™ Network Protocoll LoRa™ Technology Modulation

l How does LoRaWAN™ Technology Work?

l End-Device Classes

l End-Device Activation (Joining)

l Security

l End-Device Data Communication

l Adaptive Data Rate (ADR)

Summary

Page 85: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 85

l Internet of Things ( IoT )

l LoRaWAN™ Network Protocol

l LoRa™ Technology Wireless Modules

l Getting Started with RN2903 Module

l Hands-on Labs

Agenda

Page 86: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 86

LoRa™ Technology Wireless Modules

l RN2483 LoRa™ Technology Transceiver Modulel European (EU) 868/433 MHz

l R&TTE Directive Assessed Radio Module

l TX Power: up to +14 dBm

l Power Consumption: 1.6 uA in Sleep

l RN2903 LoRa™ Technology Transceiver Modulel North American (NA) 915 MHz

l FCC and IC modular certification

l TX Power: up to +20 dBm

l Power Consumption: 2.2 uA in Sleep

Page 87: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 87

LoRa™ Technology Wireless Modules

l General Featuresl Fully integrated module

l On-board LoRaWAN™ Class A protocol stack

l ASCII Command Interface over UART

l UART Device Firmware Upgrade (DFU)

l Integrated MCU and Crystal

l EUI-64 Node Identity Serial EEPROM

l 14 GPIOs

l Compact form factor: 17.8 x 26.7 x 3 mm

Page 88: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 88

LoRa™ Technology Wireless ModulesBlock Diagram

LoRa™ TechnologyRadio Transceiver

I2C Real Time Clock SPI

LoRaWAN™ Protocol StackGPIO

14

Status LEDs,switches,

logic IOs, etc.

External Antenna(s)

Command Interface

UARTMCU

32768 HzCrystal

EUI-64EEPROM

Host MCURN2483 / RN2903

Page 89: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 89

LoRa™ Technology Wireless Modules

RFHRFL

RX

TX

RTS

CTS

UART GPIOs 14

Status LEDs,switches,logic IOs,

etc.

Host MCU

TX

RX

CTS

RTS

Note: Optional RTS and CTS control lines will be supported in future firmware releases.

433 MHz 868 MHz

RN2483 LoRa™ Technology Transceiver Module

RN2483

VDD

GND

Page 90: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 90

LoRa™ Technology Wireless Modules

RFH

RX

TX

RTS

CTS

UART GPIOs 14

Status LEDs,switches,logic IOs,

etc.

Host MCU

TX

RX

CTS

RTS

Note: Optional RTS and CTS control lines will be supported in future firmware releases.

915 MHz

RN2903 LoRa™ Technology Transceiver Module

RN2903

VDD

GND

Page 91: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 91

LoRa™ Technology Wireless Modules

Development Tools

RN-2483-MOTERN-2903-MOTE RN-2483-PICTAIL™

RN-2903-PICTAIL

Page 92: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 92

LoRa™ Technology Wireless Modules

LoRa™ Technology Mote Block Diagram

RN2483/RN2903Module

TMR1

SPI

GPIO

USB

Host MCU

Mote

LEDs

PushButtons

LightSensor

TemperatureSensor

OLEDDisplay

USBMini-B

Connector

ADC EU

SA

RT

Page 93: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 93

l Control Interfacel UART (TX/RX) communication

l Default Baud Rate: 57600, 8N1, no flow control

l Supports Auto Baud Detection

l Command Interface

l Human Readable Text

l Command Request => Command Reply / Replies

l Command Request initiated by Host MCU

l Command Reply initiated by the LoRa Technology Wireless Module

LoRa™ Technology Wireless Modules

Page 94: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 94

l Command Syntaxl Key word(s) issued, followed by optional parameter(s)

l Separated by space Character

l Key Word(s) Case Sensitive

l Parameter(s) Case Insensitive

l CR+LF Command Delimiter

l Command Request example: < mac set devaddr 048E436e\r\n

l Command Reply example:> ok\r\n

LoRa™ Technology Wireless Modules

Page 95: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 95

LoRa™ Technology Wireless Modules

Command Interface

LoRaWAN™ Protocol

Radio Driver

Radio HardwareHardware (GPIO, System Timer, etc.)

mac

radio

sys

Command Interface

Page 96: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 96

LoRa™ Technology Wireless Modules

Command Interface

Command Interface

LoRaWAN™ Protocol

Radio Driver

Radio HardwareHardware (GPIO, System Timer, etc.)

mac

radio

sys

mac : Issues LoRaWAN™ Class A protocol network

communication behaviors, actions and configurations commands

Page 97: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 97

mac : Issues LoRaWAN™ Class A protocol

network communication behaviors, actions and configurations commands

LoRa™ Technology Wireless Modules

Page 98: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 98

LoRa™ Technology Modules

< mac set devaddr 048E436E

> ok

< mac join abp

> ok

> accepted

Page 99: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 99

LoRa™ Technology Wireless Modules

Command Interface

Command Interface

LoRaWAN™ Protocol

Radio Driver

Radio HardwareHardware (GPIO, System Timer, etc.)

mac

radio

sys

radio : Issues radio specific configurations, directly

accessing and updating the transceiver setup

Page 100: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 100

LoRa™ Technology Wireless Modules

radio : Issues radio specific configurations, directly

accessing and updating the transceiver setup

Page 101: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 101

< radio cw on

> ok

< radio get mod

> lora

LoRa™ Technology Wireless Modules

Page 102: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 102

LoRa™ Technology Wireless Modules

Command Interface

Command Interface

LoRaWAN™ Protocol

Radio Driver

Radio HardwareHardware (GPIO, System Timer, etc.)

mac

radio

sys

sys : Issues system level behavior actions, gathers status

information on the firmware and hardware version, or accesses the module user EEPROM memory

Page 103: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 103

sys : Issues system level behavior actions, gathers status

information on the firmware and hardware version, or accesses the module user EEPROM memory

LoRa™ Technology Wireless Modules

Page 104: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 104

< sys sleep 5000

> ok

< sys reset

> RN2483 0.9.5 Mar 24 2015 14:17:03

LoRa™ Technology Wireless Modules

Page 105: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 105

l Internet of Things ( IoT )

l LoRaWAN™ Network Protocol

l LoRa™ Technology Wireless Modules

l Getting Started with RN2903 Module

l Hands-on Labs

Agenda

Page 106: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 106

Getting Started with RN2903 Module

End-Device Gateway Network Server

Application Server

IP IP

Page 107: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 107

End-Device with Over-the-Air Activation (OTAA) and uplink data transmission

l Configurationl mac set deveui C3D1000030000001

l mac set appeui DEDEAAAA00000030

l mac set appkey ABAAAA9AAAAA7B695455556555558496

l Activationl mac join otaa

l Communicationl mac tx uncnf 16 48454c4c4f

Getting Started with RN2903 Module

Page 108: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 108

End-Device with Activation By Personalization (ABP) and uplink data transmission

l Configurationl mac set devaddr 0482FF05

l mac set nwkskey D95AC917E01FF24B69F4D9F9A0C4EC8D

l mac set appskey 70169735FDC5CD64F3C3ECE938DFCFE2

l Activationl mac join abp

l Communicationl mac tx uncnf 16 48454c4c4f

Getting Started with RN2903 Module

Page 109: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 109

l Internet of Things ( IoT )

l LoRaWAN™ Network Protocol

l LoRa™ Technology Wireless Modules

l Getting Started with RN2903 Module

l Hands-on Labs

Agenda

Page 110: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 110

Lab Summary

l In the following labs you will:l Configure the RN2903

l Activate the RN2903

l Communicate with the Application Server

l Setup RN2903 Mote for stand-alone operation and observe sensor data on Application Server

l Modify existing host MCU source code to send lightsensor data to app server

Lab 1

Lab 2

Using Serial Terminal

Lab 3Using MPLAB®

X IDE

Page 111: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 111

Lab 1:

RN2903 Module configuration and Over-the-Air Activation

(OTAA)

Page 112: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 112

Lab 1 Objectives

l Configure the RN2903 Module

l Activate the RN2903 Module using Over-the-Air Activation (OTAA) with the ASCII command set

Page 113: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 113

Lab 1

Tim

e

Join accept delay

TXRX

PC with Serial Terminal

Page 114: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 114

Lab 1 Summary

l In this lab we have... l Successfully configured and activated RN2903

Module using the ASCII command set

Page 115: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 115

Lab 2:

RN2903 Module bidirectional communication

Page 116: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 116

Lab 2 Objectives

l Communicate with the Application Server by using RN2903 Module ASCII command setl Uplink and Downlink

l Confirmed and Unconfirmed

Page 117: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 117

Lab 2

Tim

e

RX windows

delay

RX windows

delay

Unconfirmed uplink

Unconfirmed uplink with downlink

data

TXRX

PC with Serial Terminal

Page 118: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 118

Lab 2 Summary

l In this lab we have...

l Successfully transmitted and received data by using the RN2903 Module command set

Page 119: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 119

Lab 3:

Stand-alone end-device application

Page 120: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 120

Lab 3 Objectives

l Setup RN2903 Mote for stand-alone operation and observe sensor data on Application Server

l Modify existing host MCU source code to send light sensor data to Application Server

Page 121: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 121

Lab 3

Page 122: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 122

Lab 3 Summary

l In this lab we have...

l Successfully operated an end-device application

Page 123: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 123

l Internet of Things ( IoT )

l LoRaWAN™ Network Protocol

l LoRa™ Technology Wireless Modules

l Getting Started with RN2903 Module

l Hands-on Labs

Summary

Page 124: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 124

Additional Resources

l http://lora-alliance.org/

l http://www.microchip.com/lora

l RN2483 Low-Power Long Range LoRa™ Technology Transceiver Module

l RN2483 LoRa™ Technology Module Command Reference User’s Guide

l RN2903 Low-Power Long Range LoRa™ Technology Transceiver Module

l RN2903 LoRa™ Technology Module Command Reference User’s Guide

Page 125: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 125

Q & A

Page 126: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 126

Thank You!

Page 127: Getting Up and Running with LoRaWAN™ Long-Range Networking · Getting Up and Running with LoRaWAN™ Long-Range Networking ... 14

© 2015 Microchip Technology Incorporated. All Rights Reserv ed. 19065 IoT4 Slide 127

LEGAL NOTICESOFTWARE:

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.

NOTICE & DISCLAIMER:

These materials and accompanying information (including, for example, any software, and references to 3rd party companies and 3rd party websites) are for informational purposes only and provided “AS IS.” Microchip assumes no responsibility for statements made by 3rd party companies, or materials or information that such 3rd parties may provide.

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, dsPIC, FlashFlex, flexPWR, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, MediaLB, MOST, MOST logo, MPLAB, OptoLyzer, PIC, PICSTART, PIC32 logo, RightTouch, SpyNIC, SST, SST Logo, SuperFlash and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.

The Embedded Control Solutions Company and mTouch are registered trademarks of Microchip Technology Incorporated in the U.S.A.

Analog-for-the-Digital Age, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, ECAN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, KleerNet, KleerNet logo, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, RightTouch logo, REAL ICE, SQI, Serial Quad I/O, 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 trademarks 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.

© 2015, Microchip Technology Incorporated, All Rights Reserved.