Uploaded October 2018 | Updated September 2026, 2 weeks ago
If you like this video and want to support me, go this page for my donation Paypal or crypto addresses:
youtube.com/c/mobilefish/about
This is part 25 of the LoRa/LoRaWAN tutorial.
In this video series different topics will be explained which will help you to understand LoRa/LoRaWAN.
It is recommended to watch each video sequentially as I may refer to certain LoRa/LoRaWAN topics explained earlier.
In this tutorial I will demonstrate how downlink messages are send from The Things Network to my self build LoRa development board using the MCCI Arduino LMIC library.
I assume you have watched Tutorial 22.
In that video I created the ttn-otaa-mydemo sketch and demonstrated the OTAA activation method.
For security reasons, in the TTN console, the registered device “youtube_demo_device” the DevEUI and AppKey are modified.
To keep these videos as short as possible, in this Tutorial I already have re-saved the ttn-otaa-mydemo sketch and called it ttn-otaa-downlink and changed the DevEUI and AppKey accordingly.
Make sure a LoRa gateway is in your area and your LoRa end device can send messages to that gateway.
Open the Arduino IDE and modify the ttn-otaa-downlink sketch.
Add the codes marked:
//------ Added ----------------
Code
//-----------------------------
in mobilefish.com/download/lora/ttn-otaa-downlink.ino.txt
Please note this sketch still transmits the message "Hello, world!” every 60 seconds.
To detect the received downlink messages, two leds, green and yellow, including 220Ω resistors are connected to the Arduino Uno.
mobilefish.com/images/developer/lorawan_rfm95_arduino_leds.jpg
mobilefish.com/images/developer/lorawan_rfm95_arduino_leds_overview.jpg
Connect the self build LoRa development board to your computer using the USB cable.
In the Arduino IDE, select menu Tools | Board and select: Arduino/Genuino Uno
In the Arduino IDE, select menu Tools | Port and select: your_port
Compile and upload the ttn-otaa-downlink sketch.
You should not see any errors.
In the Arduino IDE, select menu Tools | Serial Monitor
Select baud rate: 9600
Goto The Things Network console:
- Select the app: youtube_demo_app
- Select the registered device: youtube_demo_device
- Select reset frame counters. Do this each time your end device is powered up.
In the Device Overview screen, top right corner, select Data.
The message “Hello, world!” (in hex: 48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21) is received by a gateway and send to the network server and displayed in the The Things Network console.
Go back to the Device Overview screen and scroll down to the Downlink section.
Send the following hex values from TTN console to the end device.
Hex value = 00, Yellow Led = Off, Green led = Off
Hex value = 01, Yellow Led = On, Green led = Off
Hex value = 02, Yellow Led = Off, Green led = On
Hex value = 03, Yellow Led = On, Green led = On
Depending on the hex value send, the yellow and green leds can be On or Off.
The TTN Fair Access Policy allows at most 10 downlink messages per day, including the ACKs for confirmed uplinks.
More information about TTN Fair Access Policy can be found at:
thethingsnetwork.org/docs/lorawan/duty-cycle.html
Check out all my other LoRa/LoRaWAN tutorial videos:
youtube.com/playlist?list=PLmL13yqb6OxdeOi97EvI8QeO8o-PqeQ0g
Subscribe to my YouTube channel:
youtube.com/channel/UCG5_CT_KjexxjbgNE4lVGkg?sub_confirmation=1
The presentation used in this video tutorial can be found at:
mobilefish.com/developer/lorawan/lorawan_quickguide_tutorial.html
#mobilefish #lora #lorawan
If you like this video and want to support me, go this page for my donation Paypal or crypto addresses:
youtube.com/c/mobilefish/about
This is part 25 of the LoRa/LoRaWAN tutorial.
In this video series different topics will be explained which will help you to understand LoRa/LoRaWAN.
It is recommended to watch each video sequentially as I may refer to certain LoRa/LoRaWAN topics explained earlier.
In this tutorial I will demonstrate how downlink messages are send from The Things Network to my self build LoRa development board using the MCCI Arduino LMIC library.
I assume you have watched Tutorial 22.
In that video I created the ttn-otaa-mydemo sketch and demonstrated the OTAA activation method.
For security reasons, in the TTN console, the registered device “youtube_demo_device” the DevEUI and AppKey are modified.
To keep these videos as short as possible, in this Tutorial I already have re-saved the ttn-otaa-mydemo sketch and called it ttn-otaa-downlink and changed the DevEUI and AppKey accordingly.
Make sure a LoRa gateway is in your area and your LoRa end device can send messages to that gateway.
Open the Arduino IDE and modify the ttn-otaa-downlink sketch.
Add the codes marked:
//------ Added ----------------
Code
//-----------------------------
in mobilefish.com/download/lora/ttn-otaa-downlink.ino.txt
Please note this sketch still transmits the message "Hello, world!” every 60 seconds.
To detect the received downlink messages, two leds, green and yellow, including 220Ω resistors are connected to the Arduino Uno.
mobilefish.com/images/developer/lorawan_rfm95_arduino_leds.jpg
mobilefish.com/images/developer/lorawan_rfm95_arduino_leds_overview.jpg
Connect the self build LoRa development board to your computer using the USB cable.
In the Arduino IDE, select menu Tools | Board and select: Arduino/Genuino Uno
In the Arduino IDE, select menu Tools | Port and select: your_port
Compile and upload the ttn-otaa-downlink sketch.
You should not see any errors.
In the Arduino IDE, select menu Tools | Serial Monitor
Select baud rate: 9600
Goto The Things Network console:
- Select the app: youtube_demo_app
- Select the registered device: youtube_demo_device
- Select reset frame counters. Do this each time your end device is powered up.
In the Device Overview screen, top right corner, select Data.
The message “Hello, world!” (in hex: 48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21) is received by a gateway and send to the network server and displayed in the The Things Network console.
Go back to the Device Overview screen and scroll down to the Downlink section.
Send the following hex values from TTN console to the end device.
Hex value = 00, Yellow Led = Off, Green led = Off
Hex value = 01, Yellow Led = On, Green led = Off
Hex value = 02, Yellow Led = Off, Green led = On
Hex value = 03, Yellow Led = On, Green led = On
Depending on the hex value send, the yellow and green leds can be On or Off.
The TTN Fair Access Policy allows at most 10 downlink messages per day, including the ACKs for confirmed uplinks.
More information about TTN Fair Access Policy can be found at:
thethingsnetwork.org/docs/lorawan/duty-cycle.html
Check out all my other LoRa/LoRaWAN tutorial videos:
youtube.com/playlist?list=PLmL13yqb6OxdeOi97EvI8QeO8o-PqeQ0g
Subscribe to my YouTube channel:
youtube.com/channel/UCG5_CT_KjexxjbgNE4lVGkg?sub_confirmation=1
The presentation used in this video tutorial can be found at:
mobilefish.com/developer/lorawan/lorawan_quickguide_tutorial.html
#mobilefish #lora #lorawan










