From 5c006d45e867ff41856a1695db1b3116bffd2b9b Mon Sep 17 00:00:00 2001 From: Lee Lup Yuen Date: Fri, 31 Dec 2021 09:09:16 +0000 Subject: [PATCH] Commit from GitHub Actions --- articles/lorawan3.html | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/articles/lorawan3.html b/articles/lorawan3.html index 56470ef1d..555e3530c 100644 --- a/articles/lorawan3.html +++ b/articles/lorawan3.html @@ -245,7 +245,7 @@ git clone --recursive --branch lorawan https://github.com/lupyuen/incubator-nutt

How do we set the Device EUI, Join EUI and App Key in our code?

Edit the file…

nuttx/libs/liblorawan/src/peripherals/soft-se/se-identity.h
-

Look for these lines in se-identity.h

+

Look for these lines in se-identity.h

/*!
  * When set to 1 DevEui is LORAWAN_DEVICE_EUI
  * When set to 0 DevEui is automatically set with a value provided by MCU platform
@@ -275,7 +275,7 @@ git clone --recursive --branch lorawan https://github.com/lupyuen/incubator-nutt
 
 
 

Device EUI and Join EUI

-

Next find this in the same file: se-identity.h

+

Next find this in the same file se-identity.h

#define SOFT_SE_KEY_LIST \
   { \
     { \
@@ -314,6 +314,30 @@ git clone --recursive --branch lorawan https://github.com/lupyuen/incubator-nutt
 

The App Key will be exposed if somebody dumps the firmware on our NuttX Device, but it’s probably OK during development.

5 LoRaWAN Frequency

TODO

+
    +
  1. +

    Find the LoRaWAN Frequency for our region…

    +

    “Frequency Plans by Country”

    +
  2. +
  3. +

    Edit our LoRaWAN Test App

    +
    apps/examples/lorawan_test/lorawan_test_main.c
  4. +
  5. +

    Find this in lorawan_test_main.c

    +
    #ifndef ACTIVE_REGION
    +#warning "No active region defined, LORAMAC_REGION_AS923 will be used as default."
    +#define ACTIVE_REGION LORAMAC_REGION_AS923
    +#endif
  6. +
  7. +

    Change AS923 (both occurrences) to our LoRaWAN Frequency…

    +

    US915, CN779, EU433, AU915, AS923, CN470, KR920, IN865 or RU864

    +
  8. +
  9. +

    Do the same for LmHandler.c

    +
    nuttx/libs/liblorawan/src/apps/LoRaMac/common/LmHandler/LmHandler.c
    +

    (We ought to define this parameter in Kconfig instead)

    +
  10. +

6 Run The Firmware

TODO

7 LoRaWAN Nonce