LoRaMAC
4.5.2
Documentation of the API
|
This module specifies the API implementation of the LoRaMAC layer. This is a placeholder for a detailed description of the LoRaMac layer and the supported features. More...
Data Structures | |
struct | RxChannelParams_t |
struct | LoRaMacParams_t |
union | PingSlotInfo_t |
struct | BeaconInfo_t |
union | LoRaMacFlags_t |
struct | LoRaMacNvmDataGroup1_t |
struct | LoRaMacNvmDataGroup2_t |
struct | LoRaMacNvmData_t |
struct | RequestReturnParam_t |
struct | McpsReqUnconfirmed_t |
struct | McpsReqConfirmed_t |
struct | McpsReqProprietary_t |
struct | McpsReq_t |
struct | McpsConfirm_t |
struct | McpsIndication_t |
struct | MlmeReqJoin_t |
struct | MlmeReqTxCw_t |
struct | MlmeReqPingSlotInfo_t |
struct | MlmeReqDeriveMcKEKey_t |
struct | MlmeReqDeriveMcSessionKeyPair_t |
struct | MlmeReq_t |
struct | MlmeConfirm_t |
struct | MlmeIndication_t |
union | MibParam_t |
struct | MibRequestConfirm_t |
struct | LoRaMacTxInfo_t |
struct | LoRaMacPrimitives_t |
struct | LoRaMacCallback_t |
Macros | |
#define | MAX_ACK_RETRIES 8 |
#define | UP_LINK 0 |
#define | DOWN_LINK 1 |
#define | LORA_MAC_MLME_CONFIRM_QUEUE_LEN 5 |
#define | LORAMAC_CRYPTO_MULTICAST_KEYS 127 |
#define | LORA_MAC_COMMAND_MAX_LENGTH 128 |
#define | LORAMAC_NVM_NOTIFY_FLAG_NONE 0x00 |
#define | LORAMAC_NVM_NOTIFY_FLAG_CRYPTO 0x01 |
#define | LORAMAC_NVM_NOTIFY_FLAG_MAC_GROUP1 0x02 |
#define | LORAMAC_NVM_NOTIFY_FLAG_MAC_GROUP2 0x04 |
#define | LORAMAC_NVM_NOTIFY_FLAG_SECURE_ELEMENT 0x08 |
#define | LORAMAC_NVM_NOTIFY_FLAG_REGION_GROUP1 0x10 |
#define | LORAMAC_NVM_NOTIFY_FLAG_REGION_GROUP2 0x20 |
#define | LORAMAC_NVM_NOTIFY_FLAG_CLASS_B 0x40 |
#define | LORAMAC_CERT_FPORT 224 |
Functions | |
LoRaMacStatus_t | LoRaMacInitialization (LoRaMacPrimitives_t *primitives, LoRaMacCallback_t *callbacks, LoRaMacRegion_t region) |
LoRaMAC layer initialization. More... | |
LoRaMacStatus_t | LoRaMacStart (void) |
Starts LoRaMAC layer. More... | |
LoRaMacStatus_t | LoRaMacStop (void) |
Stops LoRaMAC layer. More... | |
bool | LoRaMacIsBusy (void) |
Returns a value indicating if the MAC layer is busy or not. More... | |
void | LoRaMacProcess (void) |
LoRaMacStatus_t | LoRaMacQueryTxPossible (uint8_t size, LoRaMacTxInfo_t *txInfo) |
Queries the LoRaMAC if it is possible to send the next frame with a given application data payload size. The LoRaMAC takes scheduled MAC commands into account and reports, when the frame can be send or not. More... | |
LoRaMacStatus_t | LoRaMacChannelAdd (uint8_t id, ChannelParams_t params) |
LoRaMAC channel add service. More... | |
LoRaMacStatus_t | LoRaMacChannelRemove (uint8_t id) |
LoRaMAC channel remove service. More... | |
LoRaMacStatus_t | LoRaMacMcChannelSetup (McChannelParams_t *channel) |
LoRaMAC multicast channel setup service. More... | |
LoRaMacStatus_t | LoRaMacMcChannelDelete (AddressIdentifier_t groupID) |
LoRaMAC multicast channel removal service. More... | |
uint8_t | LoRaMacMcChannelGetGroupId (uint32_t mcAddress) |
LoRaMAC multicast channel get groupId from MC address. More... | |
LoRaMacStatus_t | LoRaMacMcChannelSetupRxParams (AddressIdentifier_t groupID, McRxParams_t *rxParams, uint8_t *status) |
LoRaMAC multicast channel Rx parameters setup service. More... | |
LoRaMacStatus_t | LoRaMacMibGetRequestConfirm (MibRequestConfirm_t *mibGet) |
LoRaMAC MIB-Get. More... | |
LoRaMacStatus_t | LoRaMacMibSetRequestConfirm (MibRequestConfirm_t *mibSet) |
LoRaMAC MIB-Set. More... | |
LoRaMacStatus_t | LoRaMacMlmeRequest (MlmeReq_t *mlmeRequest) |
LoRaMAC MLME-Request. More... | |
LoRaMacStatus_t | LoRaMacMcpsRequest (McpsReq_t *mcpsRequest) |
LoRaMAC MCPS-Request. More... | |
LoRaMacStatus_t | LoRaMacDeInitialization (void) |
LoRaMAC deinitialization. More... | |
This module specifies the API implementation of the LoRaMAC layer. This is a placeholder for a detailed description of the LoRaMac layer and the supported features.
struct RxChannelParams_t |
struct LoRaMacParams_t |
Global MAC layer parameters
Data Fields | ||
---|---|---|
uint32_t | SystemMaxRxError |
System overall timing error in milliseconds. [-SystemMaxRxError : +SystemMaxRxError] Default: +/-10 ms |
uint8_t | MinRxSymbols |
Minimum required number of symbols to detect an Rx frame Default: 6 symbols |
uint32_t | MaxRxWindow |
LoRaMac maximum time a reception window stays open |
uint32_t | ReceiveDelay1 |
Receive delay 1 |
uint32_t | ReceiveDelay2 |
Receive delay 2 |
uint32_t | JoinAcceptDelay1 |
Join accept delay 1 |
uint32_t | JoinAcceptDelay2 |
Join accept delay 1 |
uint8_t | ChannelsNbTrans |
Number of uplink messages repetitions [1:15] (unconfirmed messages only) |
uint8_t | Rx1DrOffset |
Datarate offset between uplink and downlink on first window |
RxChannelParams_t | Rx2Channel |
LoRaMAC 2nd reception window settings |
RxChannelParams_t | RxCChannel |
LoRaMAC continuous reception window settings |
uint8_t | UplinkDwellTime |
Uplink dwell time configuration. 0: No limit, 1: 400ms |
uint8_t | DownlinkDwellTime |
Downlink dwell time configuration. 0: No limit, 1: 400ms |
float | MaxEirp |
Maximum possible EIRP |
float | AntennaGain |
Antenna gain of the node |
union PingSlotInfo_t |
LoRaMAC data structure for a PingSlotInfoReq MLME_PING_SLOT_INFO
LoRaWAN Specification
Data Fields | ||
---|---|---|
uint8_t | Value |
Parameter for byte access |
struct sInfoFields | Fields |
struct BeaconInfo_t |
LoRaMAC data structure for the MLME_BEACON MLME-Indication
LoRaWAN Specification
Data Fields | ||||||||
---|---|---|---|---|---|---|---|---|
SysTime_t | Time |
Timestamp in seconds since 00:00:00, Sunday 6th of January 1980 (start of the GPS epoch) modulo 2^32 | ||||||
uint32_t | Frequency |
Frequency | ||||||
uint8_t | Datarate |
Datarate | ||||||
int16_t | Rssi |
RSSI | ||||||
int8_t | Snr |
SNR | ||||||
uint8_t | Param |
Param
Prec field is used to interpret the precision of beacon's transmit time as 10^(-6+prec) and the default value is 0. RFU will be set to Zero and Prec can take values between 0:3. | ||||||
struct sGwSpecific | GwSpecific |
union LoRaMacFlags_t |
LoRaMac tx/rx operation state
Data Fields | ||
---|---|---|
uint8_t | Value |
Byte-access to the bits |
struct sMacFlagBits | Bits |
struct LoRaMacNvmDataGroup1_t |
struct LoRaMacNvmDataGroup2_t |
Data Fields | ||
---|---|---|
LoRaMacRegion_t | Region | |
LoRaMacParams_t | MacParams | |
LoRaMacParams_t | MacParamsDefaults | |
int8_t | ChannelsTxPowerDefault |
Channels TX power |
int8_t | ChannelsDatarateDefault |
Channels data rate |
uint32_t | NetID | |
uint32_t | DevAddr | |
MulticastCtx_t | MulticastChannelList[LORAMAC_MAX_MC_CTX] |
Multicast channel list |
DeviceClass_t | DeviceClass | |
bool | PublicNetwork | |
bool | AdrCtrlOn | |
uint8_t | MaxDCycle | |
bool | DutyCycleOn | |
bool | ChannelsDatarateChangedLinkAdrReq | |
bool | DownlinkReceived | |
bool | IsCertPortOn | |
uint16_t | AggregatedDCycle | |
SysTime_t | InitializationTime | |
Version_t | Version | |
ActivationType_t | NetworkActivation | |
uint32_t | Crc32 |
CRC32 value of the MacGroup2 data structure. |
struct LoRaMacNvmData_t |
LoRaMAC data structure for non-volatile memory (NVM). This structure contains data which must be stored in NVM.
Data Fields | ||
---|---|---|
LoRaMacCryptoNvmData_t | Crypto |
Parameters related to the crypto layer. Change with every TX/RX procedure. |
LoRaMacNvmDataGroup1_t | MacGroup1 |
Parameters related to the MAC which change with high probability after every TX/RX procedure. |
LoRaMacNvmDataGroup2_t | MacGroup2 |
Parameters related to the MAC which do not change very likely with every TX/RX procedure. |
SecureElementNvmData_t | SecureElement |
Parameters related to the secure-element. |
RegionNvmDataGroup1_t | RegionGroup1 |
Parameters related to the regional implementation which change with high probability after every TX/RX procedure. |
RegionNvmDataGroup2_t | RegionGroup2 |
Parameters related to the regional implementation which do not change very likely with every TX/RX procedure. |
LoRaMacClassBNvmData_t | ClassB |
Parameters related to class b. |
struct RequestReturnParam_t |
struct McpsReqUnconfirmed_t |
LoRaMAC MCPS-Request for an unconfirmed frame
struct McpsReqConfirmed_t |
LoRaMAC MCPS-Request for a confirmed frame
struct McpsReqProprietary_t |
struct McpsReq_t |
LoRaMAC MCPS-Request structure
Data Fields | ||
---|---|---|
Mcps_t | Type |
MCPS-Request type |
union uMcpsParam | Req | |
RequestReturnParam_t | ReqReturn |
MCPS-Request return parameters |
struct McpsConfirm_t |
LoRaMAC MCPS-Confirm
Data Fields | ||
---|---|---|
Mcps_t | McpsRequest |
Holds the previously performed MCPS-Request |
LoRaMacEventInfoStatus_t | Status |
Status of the operation |
uint8_t | Datarate |
Uplink datarate |
int8_t | TxPower |
Transmission power |
bool | AckReceived |
Set if an acknowledgement was received |
uint8_t | NbTrans |
Provides the number of retransmissions |
TimerTime_t | TxTimeOnAir |
The transmission time on air of the frame |
uint32_t | UpLinkCounter |
The uplink counter value related to the frame |
uint32_t | Channel |
The uplink channel related to the frame |
struct McpsIndication_t |
LoRaMAC MCPS-Indication primitive
Data Fields | ||
---|---|---|
Mcps_t | McpsIndication |
MCPS-Indication type |
LoRaMacEventInfoStatus_t | Status |
Status of the operation |
uint8_t | Multicast |
Multicast |
uint8_t | Port |
Application port |
uint8_t | RxDatarate |
Downlink datarate |
uint8_t | FramePending |
Frame pending status |
uint8_t * | Buffer |
Pointer to the received data stream |
uint8_t | BufferSize |
Size of the received data stream |
bool | RxData |
Indicates, if data is available |
int16_t | Rssi |
Rssi of the received packet |
int8_t | Snr |
Snr of the received packet |
LoRaMacRxSlot_t | RxSlot |
Receive window |
bool | AckReceived |
Set if an acknowledgement was received |
uint32_t | DownLinkCounter |
The downlink counter value for the received frame |
uint32_t | DevAddress |
The device address of the frame |
bool | DeviceTimeAnsReceived |
Set if a DeviceTimeAns MAC command was received. |
TimerTime_t | ResponseTimeout |
Response timeout for a class b or c device when a confirmed downlink has been received. In all other cases this variable is 0. |
struct MlmeReqJoin_t |
LoRaMAC MLME-Request for the join service
Data Fields | ||
---|---|---|
ActivationType_t | NetworkActivation |
LoRaWAN Network End-Device Activation ( ACTIVATION_TYPE_NONE, ACTIVATION_TYPE_ABP or OTTA ) Related MIB type: MIB_NETWORK_ACTIVATION |
uint8_t | Datarate |
Datarate used for join request. |
struct MlmeReqTxCw_t |
struct MlmeReqPingSlotInfo_t |
LoRaMAC MLME-Request for the ping slot info service
Data Fields | ||
---|---|---|
PingSlotInfo_t | PingSlot |
struct MlmeReqDeriveMcKEKey_t |
LoRaMAC MLME-Request to derive the McKEKey from the AppKey or NwkKey
Data Fields | ||
---|---|---|
KeyIdentifier_t | KeyID |
Key identifier of the root key to use to perform the derivation ( NwkKey or AppKey ) |
uint16_t | Nonce |
Nonce value ( nonce <= 15) |
uint8_t * | DevEUI |
DevEUI Value |
struct MlmeReqDeriveMcSessionKeyPair_t |
LoRaMAC MLME-Request to derive a Multicast group key pair ( McAppSKey, McNwkSKey ) from McKey
Data Fields | ||
---|---|---|
AddressIdentifier_t | GroupID |
Address identifier to select the multicast group |
struct MlmeReq_t |
LoRaMAC MLME-Request structure
Data Fields | ||
---|---|---|
Mlme_t | Type |
MLME-Request type |
union uMlmeParam | Req | |
RequestReturnParam_t | ReqReturn |
MLME-Request return parameters |
struct MlmeConfirm_t |
LoRaMAC MLME-Confirm primitive
Data Fields | ||
---|---|---|
Mlme_t | MlmeRequest |
Holds the previously performed MLME-Request |
LoRaMacEventInfoStatus_t | Status |
Status of the operation |
TimerTime_t | TxTimeOnAir |
The transmission time on air of the frame |
uint8_t | DemodMargin |
Demodulation margin. Contains the link margin [dB] of the last successfully received LinkCheckReq |
uint8_t | NbGateways |
Number of gateways which received the last LinkCheckReq |
uint8_t | NbRetries |
Provides the number of retransmissions |
TimerTime_t | BeaconTimingDelay |
The delay which we have received through the BeaconTimingAns |
uint8_t | BeaconTimingChannel |
The channel of the next beacon |
struct MlmeIndication_t |
LoRaMAC MLME-Indication primitive
Data Fields | ||
---|---|---|
Mlme_t | MlmeIndication |
MLME-Indication type |
LoRaMacEventInfoStatus_t | Status |
Status of the operation |
BeaconInfo_t | BeaconInfo |
Beacon information. Only valid for MLME_BEACON, status LORAMAC_EVENT_INFO_STATUS_BEACON_LOCKED |
union MibParam_t |
LoRaMAC MIB parameters
Data Fields | ||
---|---|---|
DeviceClass_t | Class |
LoRaWAN device class Related MIB type: MIB_DEVICE_CLASS |
ActivationType_t | NetworkActivation |
LoRaWAN Network End-Device Activation ( ACTIVATION_TYPE_NONE, ACTIVATION_TYPE_ABP or OTTA ) Related MIB type: MIB_NETWORK_ACTIVATION |
uint8_t * | DevEui |
LoRaWAN device EUI Related MIB type: MIB_DEV_EUI |
uint8_t * | JoinEui |
LoRaWAN Join server EUI Related MIB type: MIB_JOIN_EUI |
uint8_t * | SePin |
Secure-element pin Related MIB type: MIB_SE_PIN |
bool | AdrEnable |
Activation state of ADR Related MIB type: MIB_ADR |
uint32_t | NetID |
Network identifier Related MIB type: MIB_NET_ID |
uint32_t | DevAddr |
End-device address Related MIB type: MIB_DEV_ADDR |
uint8_t * | AppKey |
Application root key Related MIB type: MIB_APP_KEY |
uint8_t * | NwkKey |
Network root key Related MIB type: MIB_NWK_KEY |
uint8_t * | JSIntKey |
Join session integrity key Related MIB type: MIB_J_S_INT_KEY |
uint8_t * | JSEncKey |
Join session encryption key Related MIB type: MIB_J_S_ENC_KEY |
uint8_t * | FNwkSIntKey |
Forwarding Network session integrity key Related MIB type: MIB_F_NWK_S_INT_KEY |
uint8_t * | SNwkSIntKey |
Serving Network session integrity key Related MIB type: MIB_S_NWK_S_INT_KEY |
uint8_t * | NwkSEncKey |
Network session encryption key Related MIB type: MIB_NWK_S_ENC_KEY |
uint8_t * | AppSKey |
Application session key Related MIB type: MIB_APP_S_KEY |
uint8_t * | McKEKey |
Multicast key encryption key Related MIB type: MIB_MC_KE_KEY |
uint8_t * | McKey0 |
Multicast root key index 0 Related MIB type: MIB_MC_KEY_0 |
uint8_t * | McAppSKey0 |
Multicast Application session key index 0 Related MIB type: MIB_MC_APP_S_KEY_0 |
uint8_t * | McNwkSKey0 |
Multicast Network session key index 0 Related MIB type: MIB_MC_NWK_S_KEY_0 |
uint8_t * | McKey1 |
Multicast root key index 0 Related MIB type: MIB_MC_KEY_0 |
uint8_t * | McAppSKey1 |
Multicast Application session key index 1 Related MIB type: MIB_MC_APP_S_KEY_1 |
uint8_t * | McNwkSKey1 |
Multicast Network session key index 1 Related MIB type: MIB_MC_NWK_S_KEY_1 |
uint8_t * | McKey2 |
Multicast root key index 2 Related MIB type: MIB_MC_KEY_2 |
uint8_t * | McAppSKey2 |
Multicast Application session key index 2 Related MIB type: MIB_MC_APP_S_KEY_2 |
uint8_t * | McNwkSKey2 |
Multicast Network session key index 2 Related MIB type: MIB_MC_NWK_S_KEY_2 |
uint8_t * | McKey3 |
Multicast root key index 2 Related MIB type: MIB_MC_KEY_2 |
uint8_t * | McAppSKey3 |
Multicast Application session key index 2 Related MIB type: MIB_MC_APP_S_KEY_2 |
uint8_t * | McNwkSKey3 |
Multicast Network session key index 2 Related MIB type: MIB_MC_NWK_S_KEY_2 |
bool | EnablePublicNetwork |
Enable or disable a public network Related MIB type: MIB_PUBLIC_NETWORK |
ChannelParams_t * | ChannelList |
LoRaWAN Channel Related MIB type: MIB_CHANNELS |
RxChannelParams_t | Rx2Channel |
Channel for the receive window 2 Related MIB type: MIB_RX2_CHANNEL |
RxChannelParams_t | Rx2DefaultChannel |
Channel for the receive window 2 Related MIB type: MIB_RX2_DEFAULT_CHANNEL |
RxChannelParams_t | RxCChannel |
Channel for the receive window C Related MIB type: MIB_RXC_CHANNEL |
RxChannelParams_t | RxCDefaultChannel |
Channel for the receive window C Related MIB type: MIB_RXC_DEFAULT_CHANNEL |
uint16_t * | ChannelsMask |
Channel mask Related MIB type: MIB_CHANNELS_MASK |
uint16_t * | ChannelsDefaultMask |
Default channel mask Related MIB type: MIB_CHANNELS_DEFAULT_MASK |
uint8_t | ChannelsNbTrans |
Number of frame repetitions Related MIB type: MIB_CHANNELS_NB_TRANS |
uint32_t | MaxRxWindow |
Maximum receive window duration Related MIB type: MIB_MAX_RX_WINDOW_DURATION |
uint32_t | ReceiveDelay1 |
Receive delay 1 Related MIB type: MIB_RECEIVE_DELAY_1 |
uint32_t | ReceiveDelay2 |
Receive delay 2 Related MIB type: MIB_RECEIVE_DELAY_2 |
uint32_t | JoinAcceptDelay1 |
Join accept delay 1 Related MIB type: MIB_JOIN_ACCEPT_DELAY_1 |
uint32_t | JoinAcceptDelay2 |
Join accept delay 2 Related MIB type: MIB_JOIN_ACCEPT_DELAY_2 |
int8_t | ChannelsMinTxDatarate |
Channels minimum tx data rate Related MIB type: MIB_CHANNELS_MIN_TX_DATARATE |
int8_t | ChannelsDefaultDatarate |
Channels data rate Related MIB type: MIB_CHANNELS_DEFAULT_DATARATE |
int8_t | ChannelsDatarate |
Channels data rate Related MIB type: MIB_CHANNELS_DATARATE |
int8_t | ChannelsDefaultTxPower |
Channels TX power Related MIB type: MIB_CHANNELS_DEFAULT_TX_POWER |
int8_t | ChannelsTxPower |
Channels TX power Related MIB type: MIB_CHANNELS_TX_POWER |
McChannelParams_t | MulticastChannel |
Multicast channels Related MIB type: MIB_MULTICAST_CHANNEL |
uint32_t | SystemMaxRxError |
System overall timing error in milliseconds. Related MIB type: MIB_SYSTEM_MAX_RX_ERROR |
uint8_t | MinRxSymbols |
Minimum required number of symbols to detect an Rx frame Related MIB type: MIB_MIN_RX_SYMBOLS |
float | AntennaGain |
Antenna gain Related MIB type: MIB_ANTENNA_GAIN |
float | DefaultAntennaGain |
Default antenna gain Related MIB type: MIB_DEFAULT_ANTENNA_GAIN |
LoRaMacNvmData_t * | Contexts |
Returns a pointer to the structure holding all data which shall be stored in the NVM. Related MIB type: MIB_NVM_CTXS |
Version_t | AbpLrWanVersion | |
struct sLrWanVersion | LrWanVersion | |
uint32_t | BeaconInterval |
Beacon interval in ms Related MIB type: MIB_BEACON_INTERVAL |
uint32_t | BeaconReserved |
Beacon reserved time in ms Related MIB type: MIB_BEACON_RESERVED |
uint32_t | BeaconGuard |
Beacon guard time in ms Related MIB type: MIB_BEACON_GUARD |
uint32_t | BeaconWindow |
Beacon window time in ms Related MIB type: MIB_BEACON_WINDOW |
uint32_t | BeaconWindowSlots |
Beacon window time in number of slots Related MIB type: MIB_BEACON_WINDOW_SLOTS |
uint32_t | PingSlotWindow |
Ping slot length time in ms Related MIB type: MIB_PING_SLOT_WINDOW |
uint32_t | BeaconSymbolToDefault |
Default symbol timeout for beacons and ping slot windows Related MIB type: MIB_BEACON_SYMBOL_TO_DEFAULT |
uint32_t | BeaconSymbolToExpansionMax |
Maximum symbol timeout for beacons Related MIB type: MIB_BEACON_SYMBOL_TO_EXPANSION_MAX |
uint32_t | PingSlotSymbolToExpansionMax |
Maximum symbol timeout for ping slots Related MIB type: MIB_PING_SLOT_SYMBOL_TO_EXPANSION_MAX |
uint32_t | BeaconSymbolToExpansionFactor |
Symbol expansion value for beacon windows in case of beacon loss in symbols Related MIB type: MIB_BEACON_SYMBOL_TO_EXPANSION_FACTOR |
uint32_t | PingSlotSymbolToExpansionFactor |
Symbol expansion value for ping slot windows in case of beacon loss in symbols Related MIB type: MIB_PING_SLOT_SYMBOL_TO_EXPANSION_FACTOR |
uint32_t | MaxBeaconLessPeriod |
Maximum allowed beacon less time in ms Related MIB type: MIB_MAX_BEACON_LESS_PERIOD |
int8_t | PingSlotDatarate |
Ping slots data rate Related MIB type: MIB_PING_SLOT_DATARATE |
bool | IsCertPortOn |
LoRaWAN certification FPort handling state (ON/OFF) Related MIB type: MIB_IS_CERT_FPORT_ON |
struct MibRequestConfirm_t |
LoRaMAC MIB-RequestConfirm structure
Data Fields | ||
---|---|---|
Mib_t | Type |
MIB-Request type |
MibParam_t | Param |
MLME-RequestConfirm parameters |
struct LoRaMacTxInfo_t |
#define MAX_ACK_RETRIES 8 |
Maximum number of times the MAC layer tries to get an acknowledge.
#define UP_LINK 0 |
Frame direction definition for up-link communications
#define DOWN_LINK 1 |
Frame direction definition for down-link communications
#define LORA_MAC_MLME_CONFIRM_QUEUE_LEN 5 |
LoRaMac MLME-Confirm queue length
#define LORAMAC_CRYPTO_MULTICAST_KEYS 127 |
Start value for multicast keys enumeration
#define LORA_MAC_COMMAND_MAX_LENGTH 128 |
Maximum MAC commands buffer size
#define LORAMAC_NVM_NOTIFY_FLAG_NONE 0x00 |
Bitmap value
#define LORAMAC_NVM_NOTIFY_FLAG_CRYPTO 0x01 |
Bitmap value for the NVM group crypto.
#define LORAMAC_NVM_NOTIFY_FLAG_MAC_GROUP1 0x02 |
Bitmap value for the NVM group MAC 1.
#define LORAMAC_NVM_NOTIFY_FLAG_MAC_GROUP2 0x04 |
Bitmap value for the NVM group MAC 2.
#define LORAMAC_NVM_NOTIFY_FLAG_SECURE_ELEMENT 0x08 |
Bitmap value for the NVM group secure element.
#define LORAMAC_NVM_NOTIFY_FLAG_REGION_GROUP1 0x10 |
Bitmap value for the NVM group 1 region.
#define LORAMAC_NVM_NOTIFY_FLAG_REGION_GROUP2 0x20 |
Bitmap value for the NVM group 2 region.
#define LORAMAC_NVM_NOTIFY_FLAG_CLASS_B 0x40 |
Bitmap value for the NVM group class b.
#define LORAMAC_CERT_FPORT 224 |
LoRaWAN compliance certification protocol port number.
LoRaWAN Specification V1.x.x, chapter 4.3.2
enum ActivationType_t |
enum LoRaMacRxSlot_t |
LoRaMAC receive window enumeration
Enumeration containing the status of the operation of a MAC service
enum LoRaMacRegion_t |
LoRaMAC region enumeration
enum Mcps_t |
LoRaMAC data services.
The following table list the primitives which are supported by the specific MAC data service:
Name | Request | Indication | Response | Confirm |
---|---|---|---|---|
MCPS_UNCONFIRMED | YES | YES | NO | YES |
MCPS_CONFIRMED | YES | YES | NO | YES |
MCPS_MULTICAST | NO | YES | NO | NO |
MCPS_PROPRIETARY | YES | YES | NO | YES |
The following table provides links to the function implementations of the related MCPS primitives:
Primitive | Function |
---|---|
MCPS-Request | LoRaMacMlmeRequest |
MCPS-Confirm | MacMcpsConfirm in LoRaMacPrimitives_t |
MCPS-Indication | MacMcpsIndication in LoRaMacPrimitives_t |
Enumerator | |
---|---|
MCPS_UNCONFIRMED | Unconfirmed LoRaMAC frame |
MCPS_CONFIRMED | Confirmed LoRaMAC frame |
MCPS_MULTICAST | Multicast LoRaMAC frame |
MCPS_PROPRIETARY | Proprietary frame |
enum Mlme_t |
LoRaMAC management services.
The following table list the primitives which are supported by the specific MAC management service:
Name | Request | Indication | Response | Confirm |
---|---|---|---|---|
MLME_JOIN | YES | NO | NO | YES |
MLME_LINK_CHECK | YES | NO | NO | YES |
MLME_TXCW | YES | NO | NO | YES |
MLME_SCHEDULE_UPLINK | NO | YES | NO | NO |
MLME_DERIVE_MC_KE_KEY | YES | NO | NO | YES |
MLME_DERIVE_MC_KEY_PAIR | YES | NO | NO | YES |
The following table provides links to the function implementations of the related MLME primitives.
Primitive | Function |
---|---|
MLME-Request | LoRaMacMlmeRequest |
MLME-Confirm | MacMlmeConfirm in LoRaMacPrimitives_t |
MLME-Indication | MacMlmeIndication in LoRaMacPrimitives_t |
enum Mib_t |
LoRa Mac Information Base (MIB)
The following table lists the MIB parameters and the related attributes:
The following table provides links to the function implementations of the related MIB primitives:
Primitive | Function |
---|---|
MIB-Set | LoRaMacMibSetRequestConfirm |
MIB-Get | LoRaMacMibGetRequestConfirm |
Enumerator | |
---|---|
MIB_DEVICE_CLASS | LoRaWAN device class LoRaWAN Specification V1.0.2 |
MIB_NETWORK_ACTIVATION | LoRaWAN Network End-Device Activation LoRaWAN Specification V1.0.2 |
MIB_DEV_EUI | LoRaWAN device EUI LoRaWAN Specification V1.0.2 |
MIB_JOIN_EUI | LoRaWAN join EUI LoRaWAN Specification V1.0.2 |
MIB_SE_PIN | Secure-element pin |
MIB_ADR | Adaptive data rate LoRaWAN Specification V1.0.2, chapter 4.3.1.1 [true: ADR enabled, false: ADR disabled] |
MIB_NET_ID | Network identifier LoRaWAN Specification V1.0.2, chapter 6.1.1 |
MIB_DEV_ADDR | End-device address LoRaWAN Specification V1.0.2, chapter 6.1.1 |
MIB_APP_KEY | Application root key LoRaWAN Specification V1.1.0, chapter 6.1.1.3 |
MIB_NWK_KEY | Network root key LoRaWAN Specification V1.1.0, chapter 6.1.1.3 |
MIB_J_S_INT_KEY | Join session integrity key LoRaWAN Specification V1.1.0, chapter 6.1.1.4 |
MIB_J_S_ENC_KEY | Join session encryption key LoRaWAN Specification V1.1.0, chapter 6.1.1.4 |
MIB_F_NWK_S_INT_KEY | Forwarding Network session integrity key LoRaWAN Specification V1.1.0, chapter 6.1.2.2 |
MIB_S_NWK_S_INT_KEY | Serving Network session integrity key LoRaWAN Specification V1.1.0, chapter 6.1.2.3 |
MIB_NWK_S_ENC_KEY | Network session encryption key LoRaWAN Specification V1.1.0, chapter 6.1.2.4 |
MIB_APP_S_KEY | Application session key LoRaWAN Specification V1.1.0, chapter 6.1.1.3 |
MIB_MC_KE_KEY | Multicast key encryption key LoRaWAN - Secure element specification v1 |
MIB_MC_KEY_0 | Multicast root key index 0 LoRaWAN - Secure element specification v1 |
MIB_MC_APP_S_KEY_0 | Multicast Application session key index 0 LoRaWAN - Secure element specification v1 |
MIB_MC_NWK_S_KEY_0 | Multicast Network session key index 0 LoRaWAN - Secure element specification v1 |
MIB_MC_KEY_1 | Multicast root key index 1 LoRaWAN - Secure element specification v1 |
MIB_MC_APP_S_KEY_1 | Multicast Application session key index 1 LoRaWAN - Secure element specification v1 |
MIB_MC_NWK_S_KEY_1 | Multicast Network session key index 1 LoRaWAN - Secure element specification v1 |
MIB_MC_KEY_2 | Multicast root key index 2 LoRaWAN - Secure element specification v1 |
MIB_MC_APP_S_KEY_2 | Multicast Application session key index 2 LoRaWAN - Secure element specification v1 |
MIB_MC_NWK_S_KEY_2 | Multicast Network session key index 2 LoRaWAN - Secure element specification v1 |
MIB_MC_KEY_3 | Multicast root key index 3 LoRaWAN - Secure element specification v1 |
MIB_MC_APP_S_KEY_3 | Multicast Application session key index 3 LoRaWAN - Secure element specification v1 |
MIB_MC_NWK_S_KEY_3 | Multicast Network session key index 3 LoRaWAN - Secure element specification v1 |
MIB_PUBLIC_NETWORK | Set the network type to public or private LoRaWAN Regional Parameters V1.0.2rB [true: public network, false: private network] |
MIB_CHANNELS | Communication channels. A get request will return a pointer which references the first entry of the channel list. The list is of size LORA_MAX_NB_CHANNELS LoRaWAN Regional Parameters V1.0.2rB |
MIB_RX2_CHANNEL | Set receive window 2 channel LoRaWAN Specification V1.0.2, chapter 3.3.1 |
MIB_RX2_DEFAULT_CHANNEL | Set receive window 2 channel LoRaWAN Specification V1.0.2, chapter 3.3.2 |
MIB_RXC_CHANNEL | Set receive window C channel LoRaWAN Specification V1.0.2, chapter 3.3.1 |
MIB_RXC_DEFAULT_CHANNEL | Set receive window C channel LoRaWAN Specification V1.0.2, chapter 3.3.2 |
MIB_CHANNELS_MASK | LoRaWAN channels mask LoRaWAN Regional Parameters V1.0.2rB |
MIB_CHANNELS_DEFAULT_MASK | LoRaWAN default channels mask LoRaWAN Regional Parameters V1.0.2rB |
MIB_CHANNELS_NB_TRANS | Set the number of repetitions on a channel LoRaWAN Specification V1.0.2, chapter 5.2 |
MIB_MAX_RX_WINDOW_DURATION | Maximum receive window duration in [ms] LoRaWAN Specification V1.0.2, chapter 3.3.3 |
MIB_RECEIVE_DELAY_1 | Receive delay 1 in [ms] LoRaWAN Regional Parameters V1.0.2rB |
MIB_RECEIVE_DELAY_2 | Receive delay 2 in [ms] LoRaWAN Regional Parameters V1.0.2rB |
MIB_JOIN_ACCEPT_DELAY_1 | Join accept delay 1 in [ms] LoRaWAN Regional Parameters V1.0.2rB |
MIB_JOIN_ACCEPT_DELAY_2 | Join accept delay 2 in [ms] LoRaWAN Regional Parameters V1.0.2rB |
MIB_CHANNELS_MIN_TX_DATARATE | Minimum Data rate of a channel LoRaWAN Regional Parameters V1.0.2rB The possible values are region specific. Please refer to DR_0 to DR_15 for details. |
MIB_CHANNELS_DEFAULT_DATARATE | Default Data rate of a channel LoRaWAN Regional Parameters V1.0.2rB The allowed ranges are region specific. Please refer to DR_0 to DR_15 for details. |
MIB_CHANNELS_DATARATE | Data rate of a channel LoRaWAN Regional Parameters V1.0.2rB The allowed ranges are region specific. Please refer to DR_0 to DR_15 for details. |
MIB_CHANNELS_TX_POWER | Transmission power of a channel LoRaWAN Regional Parameters V1.0.2rB The allowed ranges are region specific. Please refer to TX_POWER_0 to TX_POWER_15 for details. |
MIB_CHANNELS_DEFAULT_TX_POWER | Transmission power of a channel LoRaWAN Regional Parameters V1.0.2rB The allowed ranges are region specific. Please refer to TX_POWER_0 to TX_POWER_15 for details. |
MIB_SYSTEM_MAX_RX_ERROR | System overall timing error in milliseconds. [-SystemMaxRxError : +SystemMaxRxError] Default: +/-10 ms |
MIB_MIN_RX_SYMBOLS | Minimum required number of symbols to detect an Rx frame Default: 6 symbols |
MIB_ANTENNA_GAIN | Antenna gain of the node. Default value is region specific. The antenna gain is used to calculate the TX power of the node. The formula is: radioTxPower = ( int8_t )floor( maxEirp - antennaGain )
|
MIB_DEFAULT_ANTENNA_GAIN | Default antenna gain of the node. Default value is region specific. The antenna gain is used to calculate the TX power of the node. The formula is: radioTxPower = ( int8_t )floor( maxEirp - antennaGain )
|
MIB_NVM_CTXS | Structure holding pointers to internal contexts and its size |
MIB_ABP_LORAWAN_VERSION | LoRaWAN MAC layer operating version when activated by ABP. |
MIB_LORAWAN_VERSION | LoRaWAN MAC and regional parameter version. |
MIB_BEACON_INTERVAL | Beacon interval in ms |
MIB_BEACON_RESERVED | Beacon reserved time in ms |
MIB_BEACON_GUARD | Beacon guard time in ms |
MIB_BEACON_WINDOW | Beacon window time in ms |
MIB_BEACON_WINDOW_SLOTS | Beacon window time in number of slots |
MIB_PING_SLOT_WINDOW | Ping slot length time in ms |
MIB_BEACON_SYMBOL_TO_DEFAULT | Default symbol timeout for beacons and ping slot windows |
MIB_BEACON_SYMBOL_TO_EXPANSION_MAX | Maximum symbol timeout for beacons |
MIB_PING_SLOT_SYMBOL_TO_EXPANSION_MAX | Maximum symbol timeout for ping slots |
MIB_BEACON_SYMBOL_TO_EXPANSION_FACTOR | Symbol expansion value for beacon windows in case of beacon loss in symbols |
MIB_PING_SLOT_SYMBOL_TO_EXPANSION_FACTOR | Symbol expansion value for ping slot windows in case of beacon loss in symbols |
MIB_MAX_BEACON_LESS_PERIOD | Maximum allowed beacon less time in ms |
MIB_PING_SLOT_DATARATE | Ping slot data rate LoRaWAN Regional Parameters V1.0.2rB The allowed ranges are region specific. Please refer to DR_0 to DR_15 for details. |
MIB_IS_CERT_FPORT_ON | LoRaWAN certification FPort handling state (ON/OFF) |
enum LoRaMacStatus_t |
LoRaMAC Status
Enumerator | |
---|---|
LORAMAC_STATUS_OK | Service started successfully |
LORAMAC_STATUS_BUSY | Service not started - LoRaMAC is busy |
LORAMAC_STATUS_SERVICE_UNKNOWN | Service unknown |
LORAMAC_STATUS_PARAMETER_INVALID | Service not started - invalid parameter |
LORAMAC_STATUS_FREQUENCY_INVALID | Service not started - invalid frequency |
LORAMAC_STATUS_DATARATE_INVALID | Service not started - invalid datarate |
LORAMAC_STATUS_FREQ_AND_DR_INVALID | Service not started - invalid frequency and datarate |
LORAMAC_STATUS_NO_NETWORK_JOINED | Service not started - the device is not in a LoRaWAN |
LORAMAC_STATUS_LENGTH_ERROR | Service not started - payload length error |
LORAMAC_STATUS_REGION_NOT_SUPPORTED | Service not started - the specified region is not supported or not activated with preprocessor definitions. |
LORAMAC_STATUS_SKIPPED_APP_DATA | The application data was not transmitted because prioritized pending MAC commands had to be sent. |
LORAMAC_STATUS_DUTYCYCLE_RESTRICTED | An MCPS or MLME request can return this status. In this case, the MAC cannot send the frame, as the duty cycle limits all available bands. When a request returns this value, the variable "DutyCycleWaitTime" in "ReqReturn" of the input parameters contains the remaining time to wait. If the value is constant and does not change, the expected time on air for this frame is exceeding the maximum permitted time according to the duty cycle time period, defined in Region.h, DUTY_CYCLE_TIME_PERIOD. By default this time is 1 hour, and a band with 1% duty cycle is then allowed to use an air time of 36 seconds. |
LORAMAC_STATUS_BUSY_BEACON_RESERVED_TIME | ToDo |
LORAMAC_STATUS_BUSY_PING_SLOT_WINDOW_TIME | ToDo |
LORAMAC_STATUS_BUSY_UPLINK_COLLISION | ToDo |
LORAMAC_STATUS_CRYPTO_ERROR | An error in the cryptographic module is occurred |
LORAMAC_STATUS_FCNT_HANDLER_ERROR | An error in the frame counter handler module is occurred |
LORAMAC_STATUS_MAC_COMMAD_ERROR | An error in the MAC command module is occurred |
LORAMAC_STATUS_CLASS_B_ERROR | An error in the Class B module is occurred |
LORAMAC_STATUS_CONFIRM_QUEUE_ERROR | An error in the Confirm Queue module is occurred |
LORAMAC_STATUS_MC_GROUP_UNDEFINED | The multicast group doesn't exist |
LORAMAC_STATUS_ERROR | Undefined error occurred |
LoRaMacStatus_t LoRaMacInitialization | ( | LoRaMacPrimitives_t * | primitives, |
LoRaMacCallback_t * | callbacks, | ||
LoRaMacRegion_t | region | ||
) |
LoRaMAC layer initialization.
In addition to the initialization of the LoRaMAC layer, this function initializes the callback primitives of the MCPS and MLME services. Every data field of LoRaMacPrimitives_t must be set to a valid callback function.
[IN] | primitives - Pointer to a structure defining the LoRaMAC event functions. Refer to LoRaMacPrimitives_t. |
[IN] | callbacks - Pointer to a structure defining the LoRaMAC callback functions. Refer to LoRaMacCallback_t. |
[IN] | region - The region to start. |
LoRaMacStatus_t | Status of the operation. Possible returns are: returns are: LORAMAC_STATUS_OK, LORAMAC_STATUS_PARAMETER_INVALID, LORAMAC_STATUS_REGION_NOT_SUPPORTED. |
LoRaMacStatus_t LoRaMacStart | ( | void | ) |
Starts LoRaMAC layer.
LoRaMacStatus_t | Status of the operation. Possible returns are: returns are: LORAMAC_STATUS_OK, |
LoRaMacStatus_t LoRaMacStop | ( | void | ) |
Stops LoRaMAC layer.
LoRaMacStatus_t | Status of the operation. Possible returns are: returns are: LORAMAC_STATUS_OK, |
bool LoRaMacIsBusy | ( | void | ) |
Returns a value indicating if the MAC layer is busy or not.
isBusy | Mac layer is busy. |
void LoRaMacProcess | ( | void | ) |
Processes the LoRaMac events.
LoRaMacStatus_t LoRaMacQueryTxPossible | ( | uint8_t | size, |
LoRaMacTxInfo_t * | txInfo | ||
) |
Queries the LoRaMAC if it is possible to send the next frame with a given application data payload size. The LoRaMAC takes scheduled MAC commands into account and reports, when the frame can be send or not.
[IN] | size - Size of application data payload to be send next |
[OUT] | txInfo - The structure LoRaMacTxInfo_t contains information about the actual maximum payload possible ( according to the configured datarate or the next datarate according to ADR ), and the maximum frame size, taking the scheduled MAC commands into account. |
LoRaMacStatus_t | Status of the operation. When the parameters are not valid, the function returns LORAMAC_STATUS_PARAMETER_INVALID. In case of a length error caused by the application data payload in combination with the MAC commands, the function returns LORAMAC_STATUS_LENGTH_ERROR. In this case its recommended to send a frame without application data to flush the MAC commands. Otherwise the LoRaMAC will prioritize the MAC commands and if needed it will skip the application data. Please note that if MAC commands do not fit at all into the payload size on the related datarate, the LoRaMAC will automatically clip the MAC commands. In case the query is valid, and the LoRaMAC is able to send the frame, the function returns LORAMAC_STATUS_OK. |
LoRaMacStatus_t LoRaMacChannelAdd | ( | uint8_t | id, |
ChannelParams_t | params | ||
) |
LoRaMAC channel add service.
Adds a new channel to the channel list and activates the id in the channel mask. Please note that this functionality is not available on all regions. Information about allowed ranges are available at the LoRaWAN Regional Parameters V1.0.2rB
[IN] | id - Id of the channel. |
[IN] | params - Channel parameters to set. |
LoRaMacStatus_t | Status of the operation. Possible returns are: LORAMAC_STATUS_OK, LORAMAC_STATUS_BUSY, LORAMAC_STATUS_PARAMETER_INVALID. |
LoRaMacStatus_t LoRaMacChannelRemove | ( | uint8_t | id | ) |
LoRaMAC channel remove service.
Deactivates the id in the channel mask.
[IN] | id - Id of the channel. |
LoRaMacStatus_t | Status of the operation. Possible returns are: LORAMAC_STATUS_OK, LORAMAC_STATUS_BUSY, LORAMAC_STATUS_PARAMETER_INVALID. |
LoRaMacStatus_t LoRaMacMcChannelSetup | ( | McChannelParams_t * | channel | ) |
LoRaMAC multicast channel setup service.
Sets up a multicast channel.
[IN] | channel - Multicast channel to set. |
LoRaMacStatus_t | Status of the operation. Possible returns are: LORAMAC_STATUS_OK, LORAMAC_STATUS_BUSY, LORAMAC_STATUS_PARAMETER_INVALID, LORAMAC_STATUS_MC_GROUP_UNDEFINED. |
LoRaMacStatus_t LoRaMacMcChannelDelete | ( | AddressIdentifier_t | groupID | ) |
LoRaMAC multicast channel removal service.
Removes/Disables a multicast channel.
[IN] | groupID - Multicast channel ID to be removed/disabled |
LoRaMacStatus_t | Status of the operation. Possible returns are: LORAMAC_STATUS_OK, LORAMAC_STATUS_BUSY, LORAMAC_STATUS_MC_GROUP_UNDEFINED. |
uint8_t LoRaMacMcChannelGetGroupId | ( | uint32_t | mcAddress | ) |
LoRaMAC multicast channel get groupId from MC address.
[IN] | mcAddress - Multicast address to be checked |
groupID | Multicast channel ID associated to the address. Returns 0xFF if the address isn't found. |
LoRaMacStatus_t LoRaMacMcChannelSetupRxParams | ( | AddressIdentifier_t | groupID, |
McRxParams_t * | rxParams, | ||
uint8_t * | status | ||
) |
LoRaMAC multicast channel Rx parameters setup service.
Sets up a multicast channel reception parameters.
[IN] | groupID - Multicast channel ID |
[IN] | rxParams - Reception parameters |
[OUT] | status - Status mask [UNDEF_ID | FREQ_ERR | DR_ERR | GROUP_ID] |
LoRaMacStatus_t | Status of the operation. Possible returns are: LORAMAC_STATUS_OK, LORAMAC_STATUS_BUSY, LORAMAC_STATUS_PARAMETER_INVALID, LORAMAC_STATUS_MC_GROUP_UNDEFINED. |
LoRaMacStatus_t LoRaMacMibGetRequestConfirm | ( | MibRequestConfirm_t * | mibGet | ) |
LoRaMAC MIB-Get.
The mac information base service to get attributes of the LoRaMac layer.
The following code-snippet shows how to use the API to get the parameter AdrEnable, defined by the enumeration type MIB_ADR.
[IN] | mibRequest - MIB-GET-Request to perform. Refer to MibRequestConfirm_t. |
LoRaMacStatus_t | Status of the operation. Possible returns are: LORAMAC_STATUS_OK, LORAMAC_STATUS_SERVICE_UNKNOWN, LORAMAC_STATUS_PARAMETER_INVALID. |
LoRaMacStatus_t LoRaMacMibSetRequestConfirm | ( | MibRequestConfirm_t * | mibSet | ) |
LoRaMAC MIB-Set.
The mac information base service to set attributes of the LoRaMac layer.
The following code-snippet shows how to use the API to set the parameter AdrEnable, defined by the enumeration type MIB_ADR.
[IN] | mibRequest - MIB-SET-Request to perform. Refer to MibRequestConfirm_t. |
LoRaMacStatus_t | Status of the operation. Possible returns are: LORAMAC_STATUS_OK, LORAMAC_STATUS_BUSY, LORAMAC_STATUS_SERVICE_UNKNOWN, LORAMAC_STATUS_PARAMETER_INVALID. |
LoRaMacStatus_t LoRaMacMlmeRequest | ( | MlmeReq_t * | mlmeRequest | ) |
LoRaMAC MLME-Request.
The Mac layer management entity handles management services. The following code-snippet shows how to use the API to perform a network join request. Please note that for a join request, the DevEUI and the JoinEUI must be set previously via the MIB. Please also refer to the sample implementations.
[IN] | mlmeRequest - MLME-Request to perform. Refer to MlmeReq_t. |
LoRaMacStatus_t | Status of the operation. Possible returns are: LORAMAC_STATUS_OK, LORAMAC_STATUS_BUSY, LORAMAC_STATUS_SERVICE_UNKNOWN, LORAMAC_STATUS_PARAMETER_INVALID, LORAMAC_STATUS_NO_NETWORK_JOINED, LORAMAC_STATUS_LENGTH_ERROR, |
LoRaMacStatus_t LoRaMacMcpsRequest | ( | McpsReq_t * | mcpsRequest | ) |
LoRaMAC MCPS-Request.
The Mac Common Part Sublayer handles data services. The following code-snippet shows how to use the API to send an unconfirmed LoRaMAC frame.
[IN] | mcpsRequest - MCPS-Request to perform. Refer to McpsReq_t. |
LoRaMacStatus_t | Status of the operation. Possible returns are: LORAMAC_STATUS_OK, LORAMAC_STATUS_BUSY, LORAMAC_STATUS_SERVICE_UNKNOWN, LORAMAC_STATUS_PARAMETER_INVALID, LORAMAC_STATUS_NO_NETWORK_JOINED, LORAMAC_STATUS_LENGTH_ERROR, |
LoRaMacStatus_t LoRaMacDeInitialization | ( | void | ) |
LoRaMAC deinitialization.
This function stops the timers, re-initializes MAC & regional parameters to default and sets radio into sleep state.
LoRaMacStatus_t | Status of the operation. Possible returns are: LORAMAC_STATUS_OK, LORAMAC_STATUS_BUSY |