Go to the documentation of this file.
23 #ifndef NET_GNRC_LORAWAN_H
24 #define NET_GNRC_LORAWAN_H
45 #ifndef CONFIG_GNRC_LORAWAN_TIMER_DRIFT
46 #define CONFIG_GNRC_LORAWAN_TIMER_DRIFT 10
52 #ifndef CONFIG_GNRC_LORAWAN_MIN_SYMBOLS_TIMEOUT
53 #define CONFIG_GNRC_LORAWAN_MIN_SYMBOLS_TIMEOUT 30
57 #define GNRC_LORAWAN_REQ_STATUS_SUCCESS (0)
58 #define GNRC_LORAWAN_REQ_STATUS_DEFERRED (1)
@ MCPS_CONFIRMED
confirmed data
@ MCPS_EVENT_NO_RX
MCPS no RX event.
GNRC LoRaWAN internal header.
@ MLME_RESET
reset the MAC layer
@ MIB_ACTIVATION_METHOD
type is activation method
int16_t status
status of the MCPS confirm
void gnrc_lorawan_mcps_indication(gnrc_lorawan_t *mac, mcps_indication_t *ind)
MCPS indication callback.
void gnrc_lorawan_mlme_request(gnrc_lorawan_t *mac, const mlme_request_t *mlme_request, mlme_confirm_t *mlme_confirm)
Perform a MLME request.
MAC (sub) Layer Management Entity (MLME) request representation.
mlme_activation_t
LoRaWAN activation mechanism.
@ MCPS_UNCONFIRMED
unconfirmed data
GNRC LoRaWAN mac descriptor.
mlme_link_req_confirm_t link_req
Link Check confirmation data.
mlme_mib_t mib
MIB holder.
@ MLME_JOIN
join a LoRaWAN network
mlme_mib_type_t type
MIB attribute identifier.
iolist_t * msdu
pointer to the msdu
mcps_type_t
MCPS primitive types.
Mac Common Part Sublayer (MCPS) confirm representation.
@ MLME_SCHEDULE_UPLINK
schedule uplink indication
void gnrc_lorawan_mcps_confirm(gnrc_lorawan_t *mac, mcps_confirm_t *confirm)
MCPS Confirm callback.
mcps_type_t type
type of the MCPS indication
mcps_data_t data
MCPS data holder.
Mac Common Part Sublayer (MCPS) indication representation.
mlme_type_t type
type of the MLME confirm
void gnrc_lorawan_mlme_confirm(gnrc_lorawan_t *mac, mlme_confirm_t *confirm)
MLME confirm callback.
mlme_lorawan_join_t join
Join Data holder.
@ MIB_DEV_ADDR
type is dev addr
iolist structure definition
MAC (sub) Layer Management Entity (MLME) confirm representation.
mcps_data_t data
MCPS Data holder.
int16_t status
status of the MLME confirm
@ MLME_LINK_CHECK
perform a Link Check
Mac Common Part Sublayer (MCPS) request representation.
Structure to hold driver state.
mlme_activation_t activation
holds activation mechanism
@ MLME_ACTIVATION_OTAA
MAC layer activated by OTAA.
void gnrc_lorawan_radio_rx_timeout_cb(gnrc_lorawan_t *mac)
Indicate the MAC layer there was a timeout event.
mlme_type_t type
type of the MLME indication
@ MLME_ACTIVATION_ABP
MAC layer activated by ABP.
mlme_mib_t mib
MIB confirmation data.
@ MCPS_EVENT_RX
MCPS RX event.
netdev_t * gnrc_lorawan_get_netdev(gnrc_lorawan_t *mac)
Get netdev pointer from mac descriptor.
void gnrc_lorawan_mlme_indication(gnrc_lorawan_t *mac, mlme_indication_t *ind)
MLME indication callback.
mcps_type_t type
type of the MCPS request
void gnrc_lorawan_init(gnrc_lorawan_t *mac, uint8_t *nwkskey, uint8_t *appskey)
Init GNRC LoRaWAN.
MAC (sub) Layer Management Entity (MLME) indication representation.
MAC Information Base descriptor for MLME Request-Confirm.
@ MIB_RX2_DR
type is rx2 DR
@ MLME_ACTIVATION_NONE
MAC layer is not activated.
mlme_type_t type
type of the MLME request
mlme_type_t
MLME primitive types.
void gnrc_lorawan_radio_rx_done_cb(gnrc_lorawan_t *mac, uint8_t *data, size_t size)
Fetch a LoRaWAN packet from the radio.
void gnrc_lorawan_radio_tx_done_cb(gnrc_lorawan_t *mac)
Indicate the MAC layer when the transmission finished.
MLME Link Check confirmation data.
mlme_mib_type_t
MAC Information Base attributes.
void * dev_addr
pointer to the dev_addr
void gnrc_lorawan_mcps_request(gnrc_lorawan_t *mac, const mcps_request_t *mcps_request, mcps_confirm_t *mcps_confirm)
Perform a MCPS request.
mcps_type_t type
type of the MCPS confirm