GNRC LoRaWAN stack implementation.  
More...
GNRC LoRaWAN stack implementation. 
|  | 
| enum | mcps_event_t { MCPS_EVENT_RX
, MCPS_EVENT_NO_RX
 } | 
|  | MCPS events.  More... 
 | 
|  | 
| enum | mlme_activation_t { MLME_ACTIVATION_NONE
, MLME_ACTIVATION_ABP
, MLME_ACTIVATION_OTAA
 } | 
|  | LoRaWAN activation mechanism.  More... 
 | 
|  | 
| enum | mlme_mib_type_t { MIB_ACTIVATION_METHOD
, MIB_DEV_ADDR
, MIB_RX2_DR
 } | 
|  | MAC Information Base attributes.  More... 
 | 
|  | 
| enum | mlme_type_t { MLME_JOIN
, MLME_LINK_CHECK
, MLME_RESET
, MLME_SET
,
 MLME_GET
, MLME_SCHEDULE_UPLINK
 }
 | 
|  | MLME primitive types.  More... 
 | 
|  | 
| enum | mcps_type_t { MCPS_CONFIRMED
, MCPS_UNCONFIRMED
 } | 
|  | MCPS primitive types.  More... 
 | 
|  | 
|  | 
| void | gnrc_lorawan_radio_rx_timeout_cb (gnrc_lorawan_t *mac) | 
|  | Indicate the MAC layer there was a timeout event. 
 | 
|  | 
| void | gnrc_lorawan_radio_tx_done_cb (gnrc_lorawan_t *mac) | 
|  | Indicate the MAC layer when the transmission finished. 
 | 
|  | 
| static void | gnrc_lorawan_radio_rx_error_cb (gnrc_lorawan_t *mac) | 
|  | Indicate the MAC layer reception of a frame went wrong. 
 | 
|  | 
| void | gnrc_lorawan_timeout_cb (gnrc_lorawan_t *mac) | 
|  | Indicate the MAC layer that the timer was fired. 
 | 
|  | 
| void | gnrc_lorawan_init (gnrc_lorawan_t *mac, uint8_t *joineui, const gnrc_lorawan_key_ctx_t *ctx) | 
|  | Init GNRC LoRaWAN. 
 | 
|  | 
| void | gnrc_lorawan_mlme_request (gnrc_lorawan_t *mac, const mlme_request_t *mlme_request, mlme_confirm_t *mlme_confirm) | 
|  | Perform a MLME request. 
 | 
|  | 
| void | gnrc_lorawan_mcps_request (gnrc_lorawan_t *mac, const mcps_request_t *mcps_request, mcps_confirm_t *mcps_confirm) | 
|  | Perform a MCPS request. 
 | 
|  | 
| 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_mcps_indication (gnrc_lorawan_t *mac, mcps_indication_t *ind) | 
|  | MCPS indication callback. 
 | 
|  | 
| void | gnrc_lorawan_mlme_indication (gnrc_lorawan_t *mac, mlme_indication_t *ind) | 
|  | MLME indication callback. 
 | 
|  | 
| void | gnrc_lorawan_mcps_confirm (gnrc_lorawan_t *mac, mcps_confirm_t *confirm) | 
|  | MCPS Confirm callback. 
 | 
|  | 
| void | gnrc_lorawan_mlme_confirm (gnrc_lorawan_t *mac, mlme_confirm_t *confirm) | 
|  | MLME confirm callback. 
 | 
|  | 
| netdev_t * | gnrc_lorawan_get_netdev (gnrc_lorawan_t *mac) | 
|  | Get netdev pointer from mac descriptor. 
 | 
|  | 
| int | gnrc_lorawan_phy_set_channel_mask (gnrc_lorawan_t *mac, uint16_t channel_mask) | 
|  | Set the channel mask in order to enable or disable LoRaWAN channels. 
 | 
|  | 
| void | gnrc_lorawan_set_timer (gnrc_lorawan_t *mac, uint32_t us) | 
|  | Set a timer with the given time. 
 | 
|  | 
| void | gnrc_lorawan_remove_timer (gnrc_lorawan_t *mac) | 
|  | Remove the current timer. 
 | 
|  | 
| static void | gnrc_lorawan_set_uncnf_redundancy (gnrc_lorawan_t *mac, uint8_t redundancy) | 
|  | Set unconfirmed uplink redundancy. 
 | 
|  | 
◆ GNRC_LORAWAN_REQ_STATUS_DEFERRED
      
        
          | #define GNRC_LORAWAN_REQ_STATUS_DEFERRED   (1) | 
      
 
the MLME or MCPS confirm message is asynchronous 
Definition at line 47 of file lorawan.h.
 
 
◆ GNRC_LORAWAN_REQ_STATUS_SUCCESS
      
        
          | #define GNRC_LORAWAN_REQ_STATUS_SUCCESS   (0) | 
      
 
MLME or MCPS request successful status. 
Definition at line 46 of file lorawan.h.
 
 
◆ mcps_event_t
MCPS events. 
| Enumerator | 
|---|
| MCPS_EVENT_RX | MCPS RX event.  | 
| MCPS_EVENT_NO_RX | MCPS no RX event.  | 
Definition at line 52 of file lorawan.h.
 
 
◆ mcps_type_t
MCPS primitive types. 
| Enumerator | 
|---|
| MCPS_CONFIRMED | confirmed data  | 
| MCPS_UNCONFIRMED | unconfirmed data  | 
Definition at line 90 of file lorawan.h.
 
 
◆ mlme_activation_t
LoRaWAN activation mechanism. 
| Enumerator | 
|---|
| MLME_ACTIVATION_NONE | MAC layer is not activated.  | 
| MLME_ACTIVATION_ABP | MAC layer activated by ABP.  | 
| MLME_ACTIVATION_OTAA | MAC layer activated by OTAA.  | 
Definition at line 60 of file lorawan.h.
 
 
◆ mlme_mib_type_t
MAC Information Base attributes. 
| Enumerator | 
|---|
| MIB_ACTIVATION_METHOD | type is activation method  | 
| MIB_DEV_ADDR | type is dev addr  | 
| MIB_RX2_DR | type is rx2 DR  | 
Definition at line 69 of file lorawan.h.
 
 
◆ mlme_type_t
MLME primitive types. 
| Enumerator | 
|---|
| MLME_JOIN | join a LoRaWAN network  | 
| MLME_LINK_CHECK | perform a Link Check  | 
| MLME_RESET | reset the MAC layer  | 
| MLME_SET | set the MIB  | 
| MLME_GET | get the MIB  | 
| MLME_SCHEDULE_UPLINK | schedule uplink indication  | 
Definition at line 78 of file lorawan.h.
 
 
◆ gnrc_lorawan_get_netdev()
Get netdev pointer from mac descriptor. 
- Note
- Supposed to be implemented by the user of GNRC LoRaWAN
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  
 
- Returns
- pointer to the netdev_t structure 
 
 
◆ gnrc_lorawan_init()
Init GNRC LoRaWAN. 
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  | [in] | joineui | pointer to Join EUI |  | [in] | ctx | pointer to LoRaWAN context |  
 
 
 
◆ gnrc_lorawan_mcps_confirm()
MCPS Confirm callback. 
- Note
- Supposed to be implemented by the user of GNRC LoRaWAN
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  | [in] | confirm | pointer to the confirm (see mcps_confirm_t) |  
 
 
 
◆ gnrc_lorawan_mcps_indication()
MCPS indication callback. 
- Note
- Supposed to be implemented by the user of GNRC LoRaWAN
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  | [in] | ind | pointer of the indication (see mcps_indication_t) |  
 
 
 
◆ gnrc_lorawan_mcps_request()
Perform a MCPS request. 
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  | [in] | mcps_request | the MCPS request |  | [out] | mcps_confirm | the MCPS confirm. mlme_confirm->statuscould either be GNRC_LORAWAN_REQ_STATUS_SUCCESS if the request was OK, GNRC_LORAWAN_REQ_STATUS_DEFERRED if the confirmation is deferred or an standard error number |  
 
 
 
◆ gnrc_lorawan_mlme_confirm()
MLME confirm callback. 
- Note
- Supposed to be implemented by the user of GNRC LoRaWAN
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  | [in] | confirm | pointer to the confirm (see mlme_confirm_t) |  
 
 
 
◆ gnrc_lorawan_mlme_indication()
MLME indication callback. 
- Note
- Supposed to be implemented by the user of GNRC LoRaWAN
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  | [in] | ind | pointer of the indication (see mlme_indication_t) |  
 
 
 
◆ gnrc_lorawan_mlme_request()
Perform a MLME request. 
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  | [in] | mlme_request | the MLME request |  | [out] | mlme_confirm | the MLME confirm. mlme_confirm->statuscould either be GNRC_LORAWAN_REQ_STATUS_SUCCESS if the request was OK, GNRC_LORAWAN_REQ_STATUS_DEFERRED if the confirmation is deferred or an standard error number |  
 
 
 
◆ gnrc_lorawan_phy_set_channel_mask()
      
        
          | int gnrc_lorawan_phy_set_channel_mask | ( | gnrc_lorawan_t * | mac, | 
        
          |  |  | uint16_t | channel_mask ) | 
      
 
Set the channel mask in order to enable or disable LoRaWAN channels. 
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  | [in] | channel_mask | the channel mask. LSB maps to channel 0 |  
 
- Returns
- 0 on success 
- 
-EINVAL if channel_maskis zero or if the channel mask tries to enable an undefined channel
 
 
◆ gnrc_lorawan_radio_rx_done_cb()
      
        
          | void gnrc_lorawan_radio_rx_done_cb | ( | gnrc_lorawan_t * | mac, | 
        
          |  |  | uint8_t * | data, | 
        
          |  |  | size_t | size ) | 
      
 
Fetch a LoRaWAN packet from the radio. 
   To be called on radio RX done event.
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  | [in] | data | pointer to the psdu. Must not be NULL. Use gnrc_lorawan_radio_rx_error_cb instead if the reception was not successful. |  | [in] | size | size of the PSDU |  
 
 
 
◆ gnrc_lorawan_radio_rx_error_cb()
Indicate the MAC layer reception of a frame went wrong. 
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  
 
Definition at line 185 of file lorawan.h.
 
 
◆ gnrc_lorawan_radio_rx_timeout_cb()
Indicate the MAC layer there was a timeout event. 
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  
 
 
 
◆ gnrc_lorawan_radio_tx_done_cb()
Indicate the MAC layer when the transmission finished. 
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  
 
 
 
◆ gnrc_lorawan_remove_timer()
Remove the current timer. 
- Note
- Supposed to be implemented by the user of GNRC LoRaWAN
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  
 
 
 
◆ gnrc_lorawan_set_timer()
Set a timer with the given time. 
- Note
- Supposed to be implemented by the user of GNRC LoRaWAN
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  |  | us | timeout microseconds |  
 
 
 
◆ gnrc_lorawan_set_uncnf_redundancy()
  
  | 
        
          | static void gnrc_lorawan_set_uncnf_redundancy | ( | gnrc_lorawan_t * | mac, |  
          |  |  | uint8_t | redundancy ) |  | inlinestatic | 
 
Set unconfirmed uplink redundancy. 
- Precondition
- redundancy<= 14
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |  | [in] | redundancy | number of unconfirmed uplink retransmissions |  
 
Definition at line 332 of file lorawan.h.
 
 
◆ gnrc_lorawan_timeout_cb()
Indicate the MAC layer that the timer was fired. 
- Parameters
- 
  
    | [in] | mac | pointer to the MAC descriptor |