Connecting a SAM R34 SiP/SAM R34 Module LoRaWAN® End Device to a LoRaWAN Network Server
LoRaWAN® Application Configuration
Provisioning LoRaWAN™ Gateway to Network Servers |
Application Configuration
This section provides you with information on how to configure the SAM R34-based LoRaWAN® application examples on Advanced Software Framework 3 (ASF3) to be able to join the network server/join server based on the provisioning parameters used to register/enroll a device.
Every application example on ASF3 pertaining to the SAM R34 device/WLR089U0 module has an application configuration file called conf_app.h, which is available at PACKAGE_ROOT/src/config.
This application provides the method of end-device activation.
#define DEMO_APP_ACTIVATION_TYPE OVER_THE_AIR_ACTIVATION //#define DEMO_APP_ACTIVATION_TYPE ACTIVATION_BY_PERSONALIZATION
This application provides the message type for sending data from the end-device.
#define DEMO_APP_TRANSMISSION_TYPE UNCNF //#define DEMO_APP_TRANSMISSION_TYPE CNF
This application mentions the port for uplink data.
#define DEMO_APP_FPORT 1
This application can modify or set the DevEUI (64-bit) to be used with OTAA. The SAMR34 Xplained Pro board has the DevEUI stored in its EDBG controller; the user has to define EDBG_EUI_READ as 1 to read the DevEUI from edbg and to set it. Otherwise, the value DEMO_DEVICE_EUI configured in conf_app.h will be used as a DevEUI.
The WLR089 Xplained Pro board has the DevEUI stored in its internal flash; the user has to define MODULE_EUI_READ as 1 to read the DevEUI from flash and to set it. Otherwise, the value DEMO_DEVICE_EUI configured in conf_app.h will be used as a DevEUI.
#define DEMO_DEVICE_EUI {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}
The application can modify or set the AppEUI (64-bit) to be used with OTAA.
#define DEMO_APPLICATION_EUI {0xDA, 0xBB, 0xAD, 0x00, 0xDA, 0xBB, 0xAD, 0x00}
This application can modify or set the AppKey (128-bit) to be used with OTAA.
#define DEMO_APPLICATION_KEY {0xBA, 0xAD, 0xF0, 0x0D, 0xBA, 0xAD, 0xF0, 0x0D, 0xBA, 0xAD, 0xF0, 0x0D, 0xBA, 0xAD, 0xF0,0x0D}
Ensure class A device is defined.
#define DEMO_APP_ENDDEVICE_CLASS CLASS_A