Man Arduino
Man Arduino
In LoRaWAN, LoRa end devices (also called LoRa nodes) gather useful data and
transmits them to a network server using LoRa protocol. Usually LoRa nodes are
embedded circuits with built-in LoRa technology with several sensors.
LoRa nodes are implemented in most low power wireless sensor network applications
such as irrigation systems, smart metering, smart cities, smartphone detection, building
automation, etc. There are a lot of industrial grade LoRa sensors available in the market,
but in this tutorial, we will teach you how to build your own LoRa node!
OBJECTIVE
In this tutorial, you will learn:
How to build and configure a LoRa Node using Cytron LoRa-RFM Shield +
Arduino
How to create an account in The Things Network
How to add an application to your network
How to register your LoRa Node to the network
How to activate your LoRa Node
HARDWARE REQUIREMENT
1. Cytron LoRa-RFM Shield
2. CT-UNO or other Arduino-compatible boards
SOFTWARE REQUIREMENT
1. Arduino IDE
STEPS
BUILD LORA NODE FROM ZERO
1. The build is easy. Prepare CT-UNO (or other Arduino-compatible board).
2. Plug the Cytron LoRa-RFM shield onto CT-UNO.
3. Install the antenna.
That is all for the hardware setup. Next, we will setup its firmware yet. We are going to
use the famous Arduino IDE to build firmware for it.
ADD AN APPLICATION
Devices need to be registered with an application to communicate with. Let’s add one.
4. Device ID: For LoRaWAN applications, use lower case alphanumeric characters
without consecutive – and _ .
5. Device EUI: Leave empty so it will be randomly generated.
6. App Key: Leave empty so it will be randomly generated.
7. App EUI: Use the default settings.
8. Click Register to finish. (You will be redirected to the newly registered device)
There are 2 types of device activation, Over-The-Air Activation (OTAA) and Activation
By Personalization (ABP).
OTAA – A secret key called App Key is generated upon device registration. It is
used to request session keys from network server, where each request will result
in different session key.
ABP – Session keys are fixed and have to be hard-coded into devices. In TTN,
you set or generate the session keys via the console and hard-code them on your
device. The device will use those keys forever for any data transmission until a
different set of session keys is hard coded into them.
1. In the newly registered device page (Applications > Your Application ID >
Devices > Your Device ID), choose Settings from menu located on top-right.
2. Change activation method from OTAA to ABP
3. At the same page, uncheck Frame Counter Checks box as well as shown in
picture below to disable frame counter check for testing purpose.