LoRaMAC
4.4.5
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 | |
union | DrRange_t |
struct | ChannelParams_t |
struct | RxChannelParams_t |
struct | LoRaMacCtxs_t |
struct | LoRaMacParams_t |
union | PingSlotInfo_t |
struct | BeaconInfo_t |
union | LoRaMacFlags_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 |
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.
union DrRange_t |
LoRaMAC channels parameters definition
Data Fields | ||
---|---|---|
int8_t | Value |
Byte-access to the bits |
struct sFields | Fields |
struct ChannelParams_t |
LoRaMAC channel definition
Data Fields | ||
---|---|---|
uint32_t | Frequency |
Frequency in Hz |
uint32_t | Rx1Frequency |
Alternative frequency for RX window 1 |
DrRange_t | DrRange |
Data rate definition |
uint8_t | Band |
Band index |
struct RxChannelParams_t |
LoRaMAC receive window channel parameters
Data Fields | ||
---|---|---|
uint32_t | Frequency |
Frequency in Hz |
uint8_t | Datarate |
Data rate LoRaWAN Regional Parameters V1.0.2rB The allowed ranges are region specific. Please refer to DR_0 to DR_15 for details. |
struct LoRaMacCtxs_t |
LoRaMAC structure to hold internal context pointers and its lengths
struct LoRaMacParams_t |
Global MAC layer parameters
Data Fields | ||
---|---|---|
int8_t | ChannelsTxPower |
Channels TX power |
int8_t | ChannelsDatarate |
Channels data rate |
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 |
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 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 | NbRetries |
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. |
struct MlmeReqJoin_t |
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 | 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 |
LoRaMacCtxs_t * | Contexts |
Structure holding pointers to internal non-volatile contexts and its lengths. 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 |
struct MibRequestConfirm_t |
LoRaMAC MIB-RequestConfirm structure
Data Fields | ||
---|---|---|
Mib_t | Type |
MIB-Request type |
MibParam_t | Param |
MLME-RequestConfirm parameters |
struct LoRaMacTxInfo_t |
LoRaMAC tx information
Data Fields | ||
---|---|---|
uint8_t | MaxPossibleApplicationDataSize |
Size of the application data payload which can be transmitted. |
uint8_t | CurrentPossiblePayloadSize |
The current maximum possible payload size without MAC commands which is dependent on the current datarate. |
#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
enum ActivationType_t |
enum LoRaMacRxSlot_t |
LoRaMAC receive window enumeration
Enumerator | |
---|---|
RX_SLOT_WIN_1 | LoRaMAC receive window 1 |
RX_SLOT_WIN_2 | LoRaMAC receive window 2 |
RX_SLOT_WIN_CLASS_C | LoRaMAC receive window 2 for class c - continuous listening |
RX_SLOT_WIN_CLASS_C_MULTICAST | LoRaMAC class c multicast downlink |
RX_SLOT_WIN_CLASS_B_PING_SLOT | LoRaMAC class b ping slot window |
RX_SLOT_WIN_CLASS_B_MULTICAST_SLOT | LoRaMAC class b multicast slot window |
RX_SLOT_NONE | LoRaMAC no active receive window |
Enumeration containing the status of the operation of a MAC service
Enumerator | |
---|---|
LORAMAC_EVENT_INFO_STATUS_OK | Service performed successfully |
LORAMAC_EVENT_INFO_STATUS_ERROR | An error occurred during the execution of the service |
LORAMAC_EVENT_INFO_STATUS_TX_TIMEOUT | A Tx timeout occurred |
LORAMAC_EVENT_INFO_STATUS_RX1_TIMEOUT | An Rx timeout occurred on receive window 1 |
LORAMAC_EVENT_INFO_STATUS_RX2_TIMEOUT | An Rx timeout occurred on receive window 2 |
LORAMAC_EVENT_INFO_STATUS_RX1_ERROR | An Rx error occurred on receive window 1 |
LORAMAC_EVENT_INFO_STATUS_RX2_ERROR | An Rx error occurred on receive window 2 |
LORAMAC_EVENT_INFO_STATUS_JOIN_FAIL | An error occurred in the join procedure |
LORAMAC_EVENT_INFO_STATUS_DOWNLINK_REPEATED | A frame with an invalid downlink counter was received. The downlink counter of the frame was equal to the local copy of the downlink counter of the node. |
LORAMAC_EVENT_INFO_STATUS_TX_DR_PAYLOAD_SIZE_ERROR | The MAC could not retransmit a frame since the MAC decreased the datarate. The payload size is not applicable for the datarate. |
LORAMAC_EVENT_INFO_STATUS_DOWNLINK_TOO_MANY_FRAMES_LOSS | The node has lost MAX_FCNT_GAP or more frames. |
LORAMAC_EVENT_INFO_STATUS_ADDRESS_FAIL | An address error occurred |
LORAMAC_EVENT_INFO_STATUS_MIC_FAIL | Message integrity check failure |
LORAMAC_EVENT_INFO_STATUS_MULTICAST_FAIL | ToDo |
LORAMAC_EVENT_INFO_STATUS_BEACON_LOCKED | ToDo |
LORAMAC_EVENT_INFO_STATUS_BEACON_LOST | ToDo |
LORAMAC_EVENT_INFO_STATUS_BEACON_NOT_FOUND | ToDo |
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 |
Enumerator | |
---|---|
MLME_UNKNOWN | An unknown MLME service |
MLME_JOIN | Initiates the Over-the-Air activation LoRaWAN Specification V1.0.2, chapter 6.2 |
MLME_REJOIN_0 | Initiates sending a ReJoin-request type 0 LoRaWAN Specification V1.1.0, chapter 6.2.4.1 |
MLME_REJOIN_1 | Initiates sending a ReJoin-request type 1 LoRaWAN Specification V1.1.0, chapter 6.2.4.2 |
MLME_LINK_CHECK | LinkCheckReq - Connectivity validation LoRaWAN Specification V1.0.2, chapter 5, table 4 |
MLME_TXCW | Sets Tx continuous wave mode LoRaWAN end-device certification |
MLME_TXCW_1 | Sets Tx continuous wave mode (new LoRa-Alliance CC definition) LoRaWAN end-device certification |
MLME_SCHEDULE_UPLINK | Indicates that the application shall perform an uplink as soon as possible. |
MLME_DERIVE_MC_KE_KEY | Derives the McKEKey from the AppKey or NwkKey. |
MLME_DERIVE_MC_KEY_PAIR | Derives a Multicast group key pair ( McAppSKey, McNwkSKey ) from McKey |
MLME_DEVICE_TIME | Initiates a DeviceTimeReq LoRaWAN end-device certification |
MLME_BEACON | The MAC uses this MLME primitive to indicate a beacon reception status. LoRaWAN end-device certification |
MLME_BEACON_ACQUISITION | Initiate a beacon acquisition. The MAC will search for a beacon. It will search for XX_BEACON_INTERVAL milliseconds. LoRaWAN end-device certification |
MLME_PING_SLOT_INFO | Initiates a PingSlotInfoReq LoRaWAN end-device certification |
MLME_BEACON_TIMING | Initiates a BeaconTimingReq LoRaWAN end-device certification |
MLME_BEACON_LOST | Primitive which indicates that the beacon has been lost
LoRaWAN end-device certification |
enum Mib_t |
LoRa Mac Information Base (MIB)
The following table lists the MIB parameters and the related attributes:
Attribute | Get | Set |
---|---|---|
MIB_DEVICE_CLASS | YES | YES |
MIB_NETWORK_ACTIVATION | YES | YES |
MIB_DEV_EUI | YES | YES |
MIB_JOIN_EUI | YES | YES |
MIB_SE_PIN | YES | YES |
MIB_ADR | YES | YES |
MIB_NET_ID | YES | YES |
MIB_DEV_ADDR | YES | YES |
MIB_APP_KEY | NO | YES |
MIB_NWK_KEY | NO | YES |
MIB_J_S_INT_KEY | NO | YES |
MIB_J_S_ENC_KEY | NO | YES |
MIB_F_NWK_S_INT_KEY | NO | YES |
MIB_S_NWK_S_INT_KEY | NO | YES |
MIB_NWK_S_ENC_KEY | NO | YES |
MIB_APP_S_KEY | NO | YES |
MIB_MC_KE_KEY | NO | YES |
MIB_MC_KEY_0 | NO | YES |
MIB_MC_APP_S_KEY_0 | NO | YES |
MIB_MC_NWK_S_KEY_0 | NO | YES |
MIB_MC_KEY_1 | NO | YES |
MIB_MC_APP_S_KEY_1 | NO | YES |
MIB_MC_NWK_S_KEY_1 | NO | YES |
MIB_MC_KEY_2 | NO | YES |
MIB_MC_APP_S_KEY_2 | NO | YES |
MIB_MC_NWK_S_KEY_2 | NO | YES |
MIB_MC_KEY_3 | NO | YES |
MIB_MC_APP_S_KEY_3 | NO | YES |
MIB_MC_NWK_S_KEY_3 | NO | YES |
MIB_PUBLIC_NETWORK | YES | YES |
MIB_CHANNELS | YES | NO |
MIB_RX2_CHANNEL | YES | YES |
MIB_RX2_DFAULT_CHANNEL | YES | YES |
MIB_RXC_CHANNEL | YES | YES |
MIB_RXC_DFAULT_CHANNEL | YES | YES |
MIB_CHANNELS_MASK | YES | YES |
MIB_CHANNELS_DEFAULT_MASK | YES | YES |
MIB_CHANNELS_NB_TRANS | YES | YES |
MIB_MAX_RX_WINDOW_DURATION | YES | YES |
MIB_RECEIVE_DELAY_1 | YES | YES |
MIB_RECEIVE_DELAY_2 | YES | YES |
MIB_JOIN_ACCEPT_DELAY_1 | YES | YES |
MIB_JOIN_ACCEPT_DELAY_2 | YES | YES |
MIB_CHANNELS_DATARATE | YES | YES |
MIB_CHANNELS_DEFAULT_DATARATE | YES | YES |
MIB_CHANNELS_TX_POWER | YES | YES |
MIB_CHANNELS_DEFAULT_TX_POWER | YES | YES |
MIB_SYSTEM_MAX_RX_ERROR | YES | YES |
MIB_MIN_RX_SYMBOLS | YES | YES |
MIB_BEACON_INTERVAL | YES | YES |
MIB_BEACON_RESERVED | YES | YES |
MIB_BEACON_GUARD | YES | YES |
MIB_BEACON_WINDOW | YES | YES |
MIB_BEACON_WINDOW_SLOTS | YES | YES |
MIB_PING_SLOT_WINDOW | YES | YES |
MIB_BEACON_SYMBOL_TO_DEFAULT | YES | YES |
MIB_BEACON_SYMBOL_TO_EXPANSION_MAX | YES | YES |
MIB_PING_SLOT_SYMBOL_TO_EXPANSION_MAX | YES | YES |
MIB_BEACON_SYMBOL_TO_EXPANSION_FACTOR | YES | YES |
MIB_PING_SLOT_SYMBOL_TO_EXPANSION_FACTOR | YES | YES |
MIB_MAX_BEACON_LESS_PERIOD | YES | YES |
MIB_ANTENNA_GAIN | YES | YES |
MIB_DEFAULT_ANTENNA_GAIN | YES | YES |
MIB_NVM_CTXS | YES | YES |
MIB_ABP_LORAWAN_VERSION | NO | YES |
MIB_LORAWAN_VERSION | YES | NO |
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_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. |
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 |
enum LoRaMacRegion_t |
LoRaMAC region enumeration
Enumerator | |
---|---|
LORAMAC_REGION_AS923 | AS band on 923MHz |
LORAMAC_REGION_AU915 | Australian band on 915MHz |
LORAMAC_REGION_CN470 | Chinese band on 470MHz |
LORAMAC_REGION_CN779 | Chinese band on 779MHz |
LORAMAC_REGION_EU433 | European band on 433MHz |
LORAMAC_REGION_EU868 | European band on 868MHz |
LORAMAC_REGION_KR920 | South korean band on 920MHz |
LORAMAC_REGION_IN865 | India band on 865MHz |
LORAMAC_REGION_US915 | North american band on 915MHz |
LORAMAC_REGION_RU864 | Russia band on 864MHz |
Enumeration of modules which have a context
Enumerator | |
---|---|
LORAMAC_NVMCTXMODULE_MAC | Context for the MAC |
LORAMAC_NVMCTXMODULE_REGION | Context for the regions |
LORAMAC_NVMCTXMODULE_CRYPTO | Context for the crypto module |
LORAMAC_NVMCTXMODULE_SECURE_ELEMENT | Context for the secure element |
LORAMAC_NVMCTXMODULE_COMMANDS | Context for the command queue |
LORAMAC_NVMCTXMODULE_CLASS_B | Context for class b |
LORAMAC_NVMCTXMODULE_CONFIRM_QUEUE | Context for the confirm queue |
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 |