From 43d7f28e6381098b3fd09c1f20beca940ebaaea8 Mon Sep 17 00:00:00 2001 From: Akshai M Date: Wed, 18 Nov 2020 19:29:34 +0100 Subject: [PATCH] net/lorawan : Move 'LORAMAC_APP_SKEY_DEFAULT' to 'CONFIG_' --- examples/gnrc_lorawan/Makefile | 2 +- examples/gnrc_lorawan/README.md | 2 +- sys/include/net/loramac.h | 4 ++-- sys/net/gnrc/netif/lorawan/gnrc_netif_lorawan.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/gnrc_lorawan/Makefile b/examples/gnrc_lorawan/Makefile index 1cd1ae80cc..e308eacaaa 100644 --- a/examples/gnrc_lorawan/Makefile +++ b/examples/gnrc_lorawan/Makefile @@ -34,7 +34,7 @@ CFLAGS += -DCONFIG_LORAMAC_DEV_EUI_DEFAULT=\"CCCCCCCCCCCCCCCC\" # NOTE: This values will be overriten in case of OTAA. #CFLAGS += -DLORAMAC_DEV_ADDR_DEFAULT=\"00000000\" #CFLAGS += -DLORAMAC_NWK_SKEY_DEFAULT=\"00000000000000000000000000000000\" -#CFLAGS += -DLORAMAC_APP_SKEY_DEFAULT=\"00000000000000000000000000000000\" +#CFLAGS += -DCONFIG_LORAMAC_APP_SKEY_DEFAULT=\"00000000000000000000000000000000\" #CFLAGS += -DLORAMAC_DEFAULT_RX2_DR=LORAMAC_DR_3 # Comment/uncomment as necessary diff --git a/examples/gnrc_lorawan/README.md b/examples/gnrc_lorawan/README.md index 25833a7cfb..13dd6716e2 100644 --- a/examples/gnrc_lorawan/README.md +++ b/examples/gnrc_lorawan/README.md @@ -66,7 +66,7 @@ E.g in the application Makefile: CFLAGS += -DCONFIG_LORAMAC_DEV_EUI_DEFAULT=\"AAAAAAAAAAAAAAAA\" CFLAGS += -DCONFIG_LORAMAC_APP_EUI_DEFAULT=\"BBBBBBBBBBBBBBBB\" CFLAGS += -DCONFIG_LORAMAC_APP_KEY_DEFAULT=\"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\" -CFLAGS += -DLORAMAC_APP_SKEY_DEFAULT=\"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\" +CFLAGS += -DCONFIG_LORAMAC_APP_SKEY_DEFAULT=\"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\" CFLAGS += -DLORAMAC_NWK_SKEY_DEFAULT=\"EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE\" CFLAGS += -DLORAMAC_DEV_ADDR_DEFAULT=\"FFFFFFFF\" ``` diff --git a/sys/include/net/loramac.h b/sys/include/net/loramac.h index 92f6a00b11..946877df20 100644 --- a/sys/include/net/loramac.h +++ b/sys/include/net/loramac.h @@ -68,8 +68,8 @@ extern "C" { * * 16 bytes key, only required for ABP join procedure type */ -#ifndef LORAMAC_APP_SKEY_DEFAULT -#define LORAMAC_APP_SKEY_DEFAULT "00000000000000000000000000000000" +#ifndef CONFIG_LORAMAC_APP_SKEY_DEFAULT +#define CONFIG_LORAMAC_APP_SKEY_DEFAULT "00000000000000000000000000000000" #endif /** diff --git a/sys/net/gnrc/netif/lorawan/gnrc_netif_lorawan.c b/sys/net/gnrc/netif/lorawan/gnrc_netif_lorawan.c index 69e15e0d85..80e86dd11e 100644 --- a/sys/net/gnrc/netif/lorawan/gnrc_netif_lorawan.c +++ b/sys/net/gnrc/netif/lorawan/gnrc_netif_lorawan.c @@ -209,7 +209,7 @@ static void _init(gnrc_netif_t *netif) /* Convert default keys, address and EUIs to hex */ fmt_hex_bytes(_nwkskey, LORAMAC_NWK_SKEY_DEFAULT); - fmt_hex_bytes(_appskey, LORAMAC_APP_SKEY_DEFAULT); + fmt_hex_bytes(_appskey, CONFIG_LORAMAC_APP_SKEY_DEFAULT); fmt_hex_bytes(_appkey, CONFIG_LORAMAC_APP_KEY_DEFAULT); fmt_hex_bytes(_deveui, CONFIG_LORAMAC_DEV_EUI_DEFAULT); fmt_hex_bytes(_appeui, CONFIG_LORAMAC_APP_EUI_DEFAULT);