lorawan: Add support for SystemMaxRxError
SystemMaxRxError is used to negotiate overall timing error for Rx in the loramac-node library. Hence, add support for configuring this parameter from Kconfig. Signed-off-by: Kuba Sanak <contact@kuba.fyi> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
This commit is contained in:
parent
0ea457e0dc
commit
b44dcf88d9
2 changed files with 11 additions and 0 deletions
|
@ -17,6 +17,13 @@ module = LORAWAN
|
|||
module-str = lorawan
|
||||
source "subsys/logging/Kconfig.template.log_config"
|
||||
|
||||
config LORAWAN_SYSTEM_MAX_RX_ERROR
|
||||
int "LoRaWAN System Max Rx Error"
|
||||
default 20
|
||||
help
|
||||
System Max Rx timing error value in ms to be used by LoRaWAN stack
|
||||
for calculating the RX1/RX2 window timing.
|
||||
|
||||
choice
|
||||
prompt "LoRaWAN Region Selection"
|
||||
default LORAMAC_REGION_UNKNOWN
|
||||
|
|
|
@ -511,6 +511,10 @@ int lorawan_start(void)
|
|||
}
|
||||
|
||||
/* TODO: Move these to a proper location */
|
||||
mib_req.Type = MIB_SYSTEM_MAX_RX_ERROR;
|
||||
mib_req.Param.SystemMaxRxError = CONFIG_LORAWAN_SYSTEM_MAX_RX_ERROR;
|
||||
LoRaMacMibSetRequestConfirm(&mib_req);
|
||||
|
||||
mib_req.Type = MIB_PUBLIC_NETWORK;
|
||||
mib_req.Param.EnablePublicNetwork = true;
|
||||
LoRaMacMibSetRequestConfirm(&mib_req);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue