18#ifndef NET_GNRC_NETIF_LORAWAN_H
19#define NET_GNRC_NETIF_LORAWAN_H
32#define GNRC_NETIF_LORAWAN_FLAGS_LINK_CHECK (0x1U)
41#if IS_USED(MODULE_GNRC_LORAWAN_1_1)
81#if IS_USED(MODULE_GNRC_LORAWAN_1_1)
82 if (
sizeof(lw_netif->appkey) < len) {
85 memcpy(lw_netif->appkey, key, len);
103#if IS_USED(MODULE_GNRC_LORAWAN_1_1)
104 return lw_netif->appkey;
122 const uint8_t *key,
size_t len)
128#if IS_USED(MODULE_GNRC_LORAWAN_1_1)
129 if (
sizeof(lw_netif->snwksintkey) < len) {
132 memcpy(lw_netif->snwksintkey, key, len);
150 const uint8_t *key,
size_t len)
156#if IS_USED(MODULE_GNRC_LORAWAN_1_1)
157 if (
sizeof(lw_netif->nwksenckey) < len) {
160 memcpy(lw_netif->nwksenckey, key, len);
#define LORAMAC_NWKSENCKEY_LEN
Network session encryption key length in bytes.
#define LORAMAC_FNWKSINTKEY_LEN
Forwarding Network session integrity key length in bytes.
#define LORAMAC_APPKEY_LEN
Application key length in bytes.
#define LORAMAC_JOINEUI_LEN
Join EUI length in bytes.
#define LORAMAC_DEVEUI_LEN
Device EUI length in bytes.
#define LORAMAC_JSINTKEY_LEN
Join session integrity key length in bytes.
#define LORAMAC_JSENCKEY_LEN
Join session encryption key length in bytes.
#define LORAMAC_NWKKEY_LEN
Network key length in bytes.
#define LORAMAC_APPSKEY_LEN
Application session key length in bytes.
#define LORAMAC_SNWKSINTKEY_LEN
Serving Network session integrity key length in bytes.
GNRC LoRaWAN API definition.
static int gnrc_netif_lorawan_set_snwksintkey(gnrc_netif_lorawan_t *lw_netif, const uint8_t *key, size_t len)
Set the serving network session integrity key in the interface descriptor.
static int gnrc_netif_lorawan_set_nwksenckey(gnrc_netif_lorawan_t *lw_netif, const uint8_t *key, size_t len)
Set the network session encryption key in the interface descriptor.
static int gnrc_netif_lorawan_set_appkey(gnrc_netif_lorawan_t *lw_netif, const uint8_t *key, size_t len)
Set the app key in the interface descriptor.
static uint8_t * gnrc_netif_lorawan_get_appkey(gnrc_netif_lorawan_t *lw_netif)
Get the app key from the interface descriptor.
GNRC LoRaWAN mac descriptor.
GNRC LoRaWAN interface descriptor.
ztimer_t timer
General purpose timer.
gnrc_lorawan_t mac
gnrc lorawan mac descriptor
uint8_t num_gateways
number of gateways of last link check
uint8_t otaa
whether the next transmission is OTAA or not
uint8_t port
LoRaWAN port for the next transmission.
ztimer_t backoff_timer
Backoff timer.
uint8_t datarate
LoRaWAN datarate for the next transmission.
uint8_t demod_margin
value of last demodulation margin
uint8_t flags
flags for the LoRaWAN interface
uint8_t ack_req
Request ACK in the next transmission.