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 24 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 the Activation-By-Personalisation method.
I assume you have watched Tutorial 22 and based on what I have done in Tutorial 22, I will continue where I left off in that video.
Make sure a LoRa gateway is your area and your LoRa end device can send messages to that gateway.
In Tutorial 21 I have explained the difference between Over-The-Air-Activation (OTAA) and Activation-By-Personalisation (ABP).
On TTN, select application: youtube_demo_app
On TTN, register a device:
Device ID: youtube_demo_device2
Device EUI: 603252361D4B9C66 (Enter a random value consisting of 8 bytes)
You can use this tool to create the device EUI:
mobilefish.com/services/guid/guid.php
In the Device Overview screen, select Settings (Top right corner)
Change Activation Method to ABP.
The Device Address (hex value), Network Session Key (msb, 16 bytes array) and App Session Key (msb, 16 bytes array) needs to be copied to our new Arduino sketch which I will explain in a moment.
In the Arduino IDE, select menu File | Examples | MCC LoRaWAN LMIC library and select the ttn-abp sketch.
Re-save the ttn-abp sketch and call it ttn-abp-mydemo.
In this sketch you must enter:
- The Network Session Key (NwkSKey). Enter as a 16 bytes array in big-endian format.
- The Application Session Key (AppSKey). Enter as a 16 bytes array in big-endian format.
- The Device Address (DevAdr). Enter as a 4 bytes hex value. Do not forget to add the prefix 0x.
Same as in Tutorial 22, the message "Hello, world!” is transmitted every 60 seconds.
If we use this transmit time interval we will NOT comply with the TTN Fair Access Policy if we run this sketch for more than 24 hours and the data rate is SF7BW125 or even worse SF12BW125.
Please do the calculations your self.
Make the same pin mapping changes as explained in Tutorial 22.
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = 5,
.dio = {2, 3, LMIC_UNUSED_PIN},
};
Modify the loop function:
void loop() {
os_runloop_once();
}
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 ttn-abp-mydemo sketch.
You should not see any errors.
Upload the ttn-abp-mydemo sketch to the Arduino Uno.
You should not see any errors.
In the Arduino IDE, select menu Tools | Serial Monitor
Select baud rate: 115200
Goto The Things Network console:
- Select the app: youtube_demo_app
- Select the registered device: youtube_demo_device2
- 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.
Please note: There is no Join-Request message send.
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 24 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 the Activation-By-Personalisation method.
I assume you have watched Tutorial 22 and based on what I have done in Tutorial 22, I will continue where I left off in that video.
Make sure a LoRa gateway is your area and your LoRa end device can send messages to that gateway.
In Tutorial 21 I have explained the difference between Over-The-Air-Activation (OTAA) and Activation-By-Personalisation (ABP).
On TTN, select application: youtube_demo_app
On TTN, register a device:
Device ID: youtube_demo_device2
Device EUI: 603252361D4B9C66 (Enter a random value consisting of 8 bytes)
You can use this tool to create the device EUI:
mobilefish.com/services/guid/guid.php
In the Device Overview screen, select Settings (Top right corner)
Change Activation Method to ABP.
The Device Address (hex value), Network Session Key (msb, 16 bytes array) and App Session Key (msb, 16 bytes array) needs to be copied to our new Arduino sketch which I will explain in a moment.
In the Arduino IDE, select menu File | Examples | MCC LoRaWAN LMIC library and select the ttn-abp sketch.
Re-save the ttn-abp sketch and call it ttn-abp-mydemo.
In this sketch you must enter:
- The Network Session Key (NwkSKey). Enter as a 16 bytes array in big-endian format.
- The Application Session Key (AppSKey). Enter as a 16 bytes array in big-endian format.
- The Device Address (DevAdr). Enter as a 4 bytes hex value. Do not forget to add the prefix 0x.
Same as in Tutorial 22, the message "Hello, world!” is transmitted every 60 seconds.
If we use this transmit time interval we will NOT comply with the TTN Fair Access Policy if we run this sketch for more than 24 hours and the data rate is SF7BW125 or even worse SF12BW125.
Please do the calculations your self.
Make the same pin mapping changes as explained in Tutorial 22.
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = 5,
.dio = {2, 3, LMIC_UNUSED_PIN},
};
Modify the loop function:
void loop() {
os_runloop_once();
}
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 ttn-abp-mydemo sketch.
You should not see any errors.
Upload the ttn-abp-mydemo sketch to the Arduino Uno.
You should not see any errors.
In the Arduino IDE, select menu Tools | Serial Monitor
Select baud rate: 115200
Goto The Things Network console:
- Select the app: youtube_demo_app
- Select the registered device: youtube_demo_device2
- 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.
Please note: There is no Join-Request message send.
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


![Git tutorials: How to use Git bisect
Git tutorials: How to use Git bisect
Commands:
git bisect start
git bisect bad [hash tag]
git bisect good [hash tag]
git bisect reset Git tutorials: How to use Git bisect](https://i.ytimg.com/vi/u9-toShXbBE/mqdefault.jpg)







