|
Now, we will be configuring the project file to the AS923-2 regional parameters. You can either directly replace the 6 files attached below in the file directory or manually configure them step by step below. |
Download the 6 files below and head back to Keil.
Go to main.h tab, right click and click Open Containing Folder.
Replace the main.h file with the one you just downloaded above. Do the same for the other 5 files.
After replacing all these project files, click rebuild all target files.
There should be 0 Errors and 0 Warnings.
|
The section below shows the step by step manual configuration of the regional parameters. |
Presently, customers are using a Serial-USB converter through UART2 for flashing of code and debugging. This can be troublesome for users who want to simply "plug and play". To increase flexibility, there should be some option to use the ST_LINK USB for flashing of code and debugging. This can be done by adding one line to initialise USART1 in main.h seen below.
Go to line 65 in main.h file and add in #define USE_USART1
Go to line 43 in lora_app.h file and change the line to
#define ACTIVE_REGION LORAMAC_REGION_AS923
LORAWAN_DEFAULT_DATA_RATE provides the minimum DR for the uplinks in your application to avoid “over payload”.
Set the correct DR based on the maximum uplink payload in your application.
Example:
The below code has been added by Murata in the attached lora_app.c
This provides the proper DR-setting with LORAWAN_DEFAULT_DATA_RATE in lora_app.h before Send Request.
Go to line 44 in lorawan_conf.h file and uncomment the line #define REGION_AS923
Go to line 49 and comment away (use //) the line #define REGION_EU868
Next, go to line 55 and add in the line #define REGION_AS923_DEFAULT_CHANNEL_PLAN 2
Go to line 1149 and change DR_5 to DR_6
This is modified for Telkom-everynet certification specification
*For Indonesia, the channel frequency for LoRaWAN is 921.4MHz to 921.6MHz seen below.
Therefore, we need to configure these frequency values into our project file.
Go to line 150 onwards in RegionAS923.h file and change the respective numbers as seen below.
Go to line 270 & 275 and change the values respectively.
Go to line 292 & 299 and change the values respectively.
After editing all these project files, click rebuild all target files.
There should be 0 Errors and 0 Warnings.