LoRaMAC  4.4.5
Documentation of the API
LoRaMac.h
Go to the documentation of this file.
1 
121 #ifndef __LORAMAC_H__
122 #define __LORAMAC_H__
123 
124 #ifdef __cplusplus
125 extern "C"
126 {
127 #endif
128 
129 #include <stdint.h>
130 #include <stdbool.h>
131 #include "utilities.h"
132 #include "timer.h"
133 #include "systime.h"
134 #include "radio.h"
135 #include "LoRaMacTypes.h"
136 
140 #define MAX_ACK_RETRIES 8
141 
145 #define UP_LINK 0
146 
150 #define DOWN_LINK 1
151 
155 #define LORA_MAC_MLME_CONFIRM_QUEUE_LEN 5
156 
160 #define LORAMAC_CRYPTO_MULTICAST_KEYS 127
161 
165 typedef enum eActivationType
166 {
180 
184 typedef union uDrRange
185 {
189  int8_t Value;
193  struct sFields
194  {
202  int8_t Min : 4;
210  int8_t Max : 4;
211  }Fields;
212 }DrRange_t;
213 
217 typedef struct sChannelParams
218 {
222  uint32_t Frequency;
226  uint32_t Rx1Frequency;
234  uint8_t Band;
236 
240 typedef struct sRxChannelParams
241 {
245  uint32_t Frequency;
253  uint8_t Datarate;
255 
259 typedef enum eLoRaMacRxSlot
260 {
290 
294 typedef struct sLoRaMacCtxs
295 {
299  void* MacNvmCtx;
353 
357 typedef struct sLoRaMacParams
358 {
377  uint8_t MinRxSymbols;
381  uint32_t MaxRxWindow;
385  uint32_t ReceiveDelay1;
389  uint32_t ReceiveDelay2;
405  uint8_t Rx1DrOffset;
425  float MaxEirp;
429  float AntennaGain;
431 
437 typedef union uPingSlotInfo
438 {
442  uint8_t Value;
446  struct sInfoFields
447  {
452  uint8_t Periodicity : 3;
456  uint8_t RFU : 5;
457  }Fields;
459 
465 typedef struct sBeaconInfo
466 {
471  SysTime_t Time;
475  uint32_t Frequency;
479  uint8_t Datarate;
483  int16_t Rssi;
487  int8_t Snr;
492  struct sGwSpecific
493  {
497  uint8_t InfoDesc;
501  uint8_t Info[6];
502  }GwSpecific;
503 }BeaconInfo_t;
504 
508 typedef enum eLoRaMacEventInfoStatus
509 {
582 
586 typedef union eLoRaMacFlags_t
587 {
591  uint8_t Value;
596  {
600  uint8_t McpsReq : 1;
604  uint8_t McpsInd : 1;
608  uint8_t MlmeReq : 1;
612  uint8_t MlmeInd : 1;
616  uint8_t MlmeSchedUplinkInd : 1;
620  uint8_t MacDone : 1;
621  }Bits;
623 
647 typedef enum eMcps
648 {
665 }Mcps_t;
666 
670 typedef struct sRequestReturnParam
671 {
677  TimerTime_t DutyCycleWaitTime;
679 
683 typedef struct sMcpsReqUnconfirmed
684 {
691  uint8_t fPort;
695  void* fBuffer;
699  uint16_t fBufferSize;
703  int8_t Datarate;
705 
709 typedef struct sMcpsReqConfirmed
710 {
717  uint8_t fPort;
721  void* fBuffer;
725  uint16_t fBufferSize;
729  int8_t Datarate;
750  uint8_t NbTrials;
752 
756 typedef struct sMcpsReqProprietary
757 {
761  void* fBuffer;
765  uint16_t fBufferSize;
769  int8_t Datarate;
771 
775 typedef struct sMcpsReq
776 {
781 
786  {
799  }Req;
800 
805 }McpsReq_t;
806 
810 typedef struct sMcpsConfirm
811 {
823  uint8_t Datarate;
827  int8_t TxPower;
835  uint8_t NbRetries;
839  TimerTime_t TxTimeOnAir;
843  uint32_t UpLinkCounter;
847  uint32_t Channel;
849 
853 typedef struct sMcpsIndication
854 {
866  uint8_t Multicast;
870  uint8_t Port;
874  uint8_t RxDatarate;
878  uint8_t FramePending;
882  uint8_t* Buffer;
886  uint8_t BufferSize;
890  bool RxData;
894  int16_t Rssi;
898  int8_t Snr;
910  uint32_t DownLinkCounter;
914  uint32_t DevAddress;
920 
945 typedef enum eMlme
946 {
1040 }Mlme_t;
1041 
1045 typedef struct sMlmeReqJoin
1046 {
1050  uint8_t Datarate;
1051 }MlmeReqJoin_t;
1052 
1056 typedef struct sMlmeReqTxCw
1057 {
1061  uint16_t Timeout;
1065  uint32_t Frequency;
1069  int8_t Power;
1070 }MlmeReqTxCw_t;
1071 
1075 typedef struct sMlmeReqPingSlotInfo
1076 {
1077  PingSlotInfo_t PingSlot;
1079 
1083 typedef struct sMlmeReqDeriveMcKEKey
1084 {
1092  uint16_t Nonce;
1096  uint8_t* DevEUI;
1098 
1102 typedef struct sMlmeReqDeriveMcSessionKeyPair
1103 {
1109 
1113 typedef struct sMlmeReq
1114 {
1119 
1124  {
1145  }Req;
1146 
1151 }MlmeReq_t;
1152 
1156 typedef struct sMlmeConfirm
1157 {
1169  TimerTime_t TxTimeOnAir;
1174  uint8_t DemodMargin;
1178  uint8_t NbGateways;
1182  uint8_t NbRetries;
1187  TimerTime_t BeaconTimingDelay;
1192 }MlmeConfirm_t;
1193 
1197 typedef struct sMlmeIndication
1198 {
1213 
1296 typedef enum eMib
1297 {
1695 }Mib_t;
1696 
1700 typedef union uMibParam
1701 {
1719  uint8_t* DevEui;
1725  uint8_t* JoinEui;
1731  uint8_t* SePin;
1743  uint32_t NetID;
1749  uint32_t DevAddr;
1755  uint8_t* AppKey;
1761  uint8_t* NwkKey;
1767  uint8_t* JSIntKey;
1773  uint8_t* JSEncKey;
1779  uint8_t* FNwkSIntKey;
1785  uint8_t* SNwkSIntKey;
1791  uint8_t* NwkSEncKey;
1797  uint8_t* AppSKey;
1803  uint8_t* McKEKey;
1809  uint8_t* McKey0;
1815  uint8_t* McAppSKey0;
1821  uint8_t* McNwkSKey0;
1827  uint8_t* McKey1;
1833  uint8_t* McAppSKey1;
1839  uint8_t* McNwkSKey1;
1845  uint8_t* McKey2;
1851  uint8_t* McAppSKey2;
1857  uint8_t* McNwkSKey2;
1863  uint8_t* McKey3;
1869  uint8_t* McAppSKey3;
1875  uint8_t* McNwkSKey3;
1917  uint16_t* ChannelsMask;
1935  uint32_t MaxRxWindow;
1941  uint32_t ReceiveDelay1;
1947  uint32_t ReceiveDelay2;
2001  uint8_t MinRxSymbols;
2020  /*
2021  * LoRaWAN MAC layer operating version when activated by ABP.
2022  *
2023  * Related MIB type: \ref MIB_ABP_LORAWAN_VERSION
2024  */
2025  Version_t AbpLrWanVersion;
2026  /*
2027  * LoRaWAN MAC regional parameter version.
2028  *
2029  * Related MIB type: \ref MIB_LORAWAN_VERSION
2030  */
2032  {
2033  Version_t LoRaWan;
2034  Version_t LoRaWanRegion;
2035  }LrWanVersion;
2041  uint32_t BeaconInterval;
2047  uint32_t BeaconReserved;
2053  uint32_t BeaconGuard;
2059  uint32_t BeaconWindow;
2071  uint32_t PingSlotWindow;
2116 }MibParam_t;
2117 
2121 typedef struct eMibRequestConfirm
2122 {
2127 
2133 
2137 typedef struct sLoRaMacTxInfo
2138 {
2149 
2153 typedef enum eLoRaMacStatus
2154 {
2218  LORAMAC_STATUS_NO_CHANNEL_FOUND,
2222  LORAMAC_STATUS_NO_FREE_CHANNEL_FOUND,
2264 
2268 typedef enum eLoRaMacRegion_t
2269 {
2311 
2315 typedef enum LoRaMacNvmCtxModule_e
2316 {
2346 
2347 
2352 typedef struct sLoRaMacPrimitives
2353 {
2359  void ( *MacMcpsConfirm )( McpsConfirm_t* McpsConfirm );
2365  void ( *MacMcpsIndication )( McpsIndication_t* McpsIndication );
2371  void ( *MacMlmeConfirm )( MlmeConfirm_t* MlmeConfirm );
2377  void ( *MacMlmeIndication )( MlmeIndication_t* MlmeIndication );
2379 
2383 typedef struct sLoRaMacCallback
2384 {
2393  uint8_t ( *GetBatteryLevel )( void );
2399  float ( *GetTemperatureLevel )( void );
2405  void ( *NvmContextChange )( LoRaMacNvmCtxModule_t module );
2412  void ( *MacProcessNotify )( void );
2414 
2415 
2419 static const uint8_t LoRaMacMaxEirpTable[] = { 8, 10, 12, 13, 14, 16, 18, 20, 21, 24, 26, 27, 29, 30, 33, 36 };
2420 
2444 
2453 
2462 
2468 bool LoRaMacIsBusy( void );
2469 
2475 void LoRaMacProcess( void );
2476 
2502 LoRaMacStatus_t LoRaMacQueryTxPossible( uint8_t size, LoRaMacTxInfo_t* txInfo );
2503 
2520 LoRaMacStatus_t LoRaMacChannelAdd( uint8_t id, ChannelParams_t params );
2521 
2535 
2550 
2564 
2573 uint8_t LoRaMacMcChannelGetGroupId( uint32_t mcAddress );
2574 
2590 LoRaMacStatus_t LoRaMacMcChannelSetupRxParams( AddressIdentifier_t groupID, McRxParams_t *rxParams, uint8_t *status );
2591 
2619 
2650 
2683 
2717 
2729 
2734 #include "region/Region.h"
2735 
2738 #ifdef __cplusplus
2739 }
2740 #endif
2741 
2742 #endif // __LORAMAC_H__
MIB_PING_SLOT_DATARATE
Definition: LoRaMac.h:1694
MIB_ABP_LORAWAN_VERSION
Definition: LoRaMac.h:1632
MibParam_t::McAppSKey0
uint8_t * McAppSKey0
Definition: LoRaMac.h:1815
MibParam_t::DevEui
uint8_t * DevEui
Definition: LoRaMac.h:1719
LoRaMacStop
LoRaMacStatus_t LoRaMacStop(void)
Stops LoRaMAC layer.
Region.h
Region implementation.
LoRaMacParams_t::ChannelsDatarate
int8_t ChannelsDatarate
Definition: LoRaMac.h:366
MIB_NWK_KEY
Definition: LoRaMac.h:1357
MIB_MC_KEY_1
Definition: LoRaMac.h:1423
LORAMAC_REGION_US915
Definition: LoRaMac.h:2305
McpsReq_t::Type
Mcps_t Type
Definition: LoRaMac.h:780
LORAMAC_NVMCTXMODULE_CRYPTO
Definition: LoRaMac.h:2328
LoRaMacFlags_t::sMacFlagBits::McpsInd
uint8_t McpsInd
Definition: LoRaMac.h:604
LoRaMacDeInitialization
LoRaMacStatus_t LoRaMacDeInitialization(void)
LoRaMAC deinitialization.
MibParam_t::FNwkSIntKey
uint8_t * FNwkSIntKey
Definition: LoRaMac.h:1779
PingSlotInfo_t::sInfoFields
Definition: LoRaMac.h:446
LORAMAC_STATUS_LENGTH_ERROR
Definition: LoRaMac.h:2190
MIB_CHANNELS_DEFAULT_DATARATE
Definition: LoRaMac.h:1567
MibParam_t::ChannelsDefaultDatarate
int8_t ChannelsDefaultDatarate
Definition: LoRaMac.h:1965
MIB_BEACON_RESERVED
Definition: LoRaMac.h:1644
MIB_DEVICE_CLASS
Definition: LoRaMac.h:1303
LORAMAC_REGION_KR920
Definition: LoRaMac.h:2297
McpsReq_t::uMcpsParam::Confirmed
McpsReqConfirmed_t Confirmed
Definition: LoRaMac.h:794
LORAMAC_STATUS_PARAMETER_INVALID
Definition: LoRaMac.h:2170
MIB_BEACON_SYMBOL_TO_EXPANSION_FACTOR
Definition: LoRaMac.h:1677
MIB_NVM_CTXS
Definition: LoRaMac.h:1628
LORAMAC_NVMCTXMODULE_MAC
Definition: LoRaMac.h:2320
LoRaMacFlags_t::sMacFlagBits::MlmeInd
uint8_t MlmeInd
Definition: LoRaMac.h:612
LoRaMacMcpsRequest
LoRaMacStatus_t LoRaMacMcpsRequest(McpsReq_t *mcpsRequest)
LoRaMAC MCPS-Request.
LoRaMacStatus_t
LoRaMacStatus_t
Definition: LoRaMac.h:2153
MIB_JOIN_EUI
Definition: LoRaMac.h:1321
LORAMAC_STATUS_REGION_NOT_SUPPORTED
Definition: LoRaMac.h:2195
RX_SLOT_WIN_CLASS_B_PING_SLOT
Definition: LoRaMac.h:280
LoRaMacParams_t::ReceiveDelay2
uint32_t ReceiveDelay2
Definition: LoRaMac.h:389
LORAMAC_STATUS_SKIPPED_APP_DATA
Definition: LoRaMac.h:2200
MibParam_t::EnablePublicNetwork
bool EnablePublicNetwork
Definition: LoRaMac.h:1881
LORAMAC_STATUS_NO_NETWORK_JOINED
Definition: LoRaMac.h:2186
MCPS_UNCONFIRMED
Definition: LoRaMac.h:652
MIB_CHANNELS
Definition: LoRaMac.h:1487
MIB_F_NWK_S_INT_KEY
Definition: LoRaMac.h:1375
MCPS_MULTICAST
Definition: LoRaMac.h:660
MIB_DEFAULT_ANTENNA_GAIN
Definition: LoRaMac.h:1624
MlmeConfirm_t::MlmeRequest
Mlme_t MlmeRequest
Definition: LoRaMac.h:1161
LORAMAC_EVENT_INFO_STATUS_BEACON_NOT_FOUND
Definition: LoRaMac.h:580
MLME_REJOIN_1
Definition: LoRaMac.h:968
MIB_MC_KEY_2
Definition: LoRaMac.h:1441
MIB_BEACON_WINDOW
Definition: LoRaMac.h:1652
LoRaMacParams_t::AntennaGain
float AntennaGain
Definition: LoRaMac.h:429
MibParam_t::McAppSKey2
uint8_t * McAppSKey2
Definition: LoRaMac.h:1851
LORAMAC_STATUS_CONFIRM_QUEUE_ERROR
Definition: LoRaMac.h:2254
RxChannelParams_t
Definition: LoRaMac.h:240
LoRaMacPrimitives_t
Definition: LoRaMac.h:2352
LoRaMacParams_t::ChannelsTxPower
int8_t ChannelsTxPower
Definition: LoRaMac.h:362
MibParam_t::McKey1
uint8_t * McKey1
Definition: LoRaMac.h:1827
DeviceClass_t
DeviceClass_t
Definition: LoRaMacTypes.h:68
LoRaMacCtxs_t::RegionNvmCtx
void * RegionNvmCtx
Pointer to region context.
Definition: LoRaMac.h:307
DrRange_t
Definition: LoRaMac.h:184
MLME_TXCW
Definition: LoRaMac.h:980
RxChannelParams_t::Datarate
uint8_t Datarate
Definition: LoRaMac.h:253
LoRaMacFlags_t
Definition: LoRaMac.h:586
Mib_t
Mib_t
Definition: LoRaMac.h:1296
LoRaMacParams_t::Rx2Channel
RxChannelParams_t Rx2Channel
Definition: LoRaMac.h:409
ACTIVATION_TYPE_OTAA
Definition: LoRaMac.h:178
ChannelParams_t
Definition: LoRaMac.h:217
RX_SLOT_WIN_CLASS_C
Definition: LoRaMac.h:272
LoRaMacCtxs_t
Definition: LoRaMac.h:294
MlmeIndication_t::BeaconInfo
BeaconInfo_t BeaconInfo
Definition: LoRaMac.h:1211
MibParam_t::PingSlotSymbolToExpansionMax
uint32_t PingSlotSymbolToExpansionMax
Definition: LoRaMac.h:2089
MIB_DEV_ADDR
Definition: LoRaMac.h:1345
LoRaMacTypes.h
LoRa MAC layer internal types definition. Please do not include in application sources.
MlmeIndication_t
Definition: LoRaMac.h:1197
MLME_BEACON_TIMING
Definition: LoRaMac.h:1031
MIB_MC_NWK_S_KEY_0
Definition: LoRaMac.h:1417
MIB_ADR
Definition: LoRaMac.h:1333
MibParam_t::ChannelsMask
uint16_t * ChannelsMask
Definition: LoRaMac.h:1917
LoRaMacCtxs_t::CryptoNvmCtx
void * CryptoNvmCtx
Pointer to crypto module context.
Definition: LoRaMac.h:315
MibParam_t::BeaconGuard
uint32_t BeaconGuard
Definition: LoRaMac.h:2053
MLME_DERIVE_MC_KE_KEY
Definition: LoRaMac.h:995
LoRaMacMcChannelGetGroupId
uint8_t LoRaMacMcChannelGetGroupId(uint32_t mcAddress)
LoRaMAC multicast channel get groupId from MC address.
LORAMAC_STATUS_DATARATE_INVALID
Definition: LoRaMac.h:2178
MIB_APP_KEY
Definition: LoRaMac.h:1351
MlmeConfirm_t::BeaconTimingDelay
TimerTime_t BeaconTimingDelay
Definition: LoRaMac.h:1187
ACTIVATION_TYPE_NONE
Definition: LoRaMac.h:170
MIB_MC_KEY_0
Definition: LoRaMac.h:1405
McpsConfirm_t::Channel
uint32_t Channel
Definition: LoRaMac.h:847
DrRange_t::sFields::Min
int8_t Min
Definition: LoRaMac.h:202
MibParam_t::SePin
uint8_t * SePin
Definition: LoRaMac.h:1731
MlmeReqJoin_t
Definition: LoRaMac.h:1045
MIB_RECEIVE_DELAY_2
Definition: LoRaMac.h:1547
LORAMAC_EVENT_INFO_STATUS_ADDRESS_FAIL
Definition: LoRaMac.h:560
MIB_DEV_EUI
Definition: LoRaMac.h:1315
LoRaMacMcChannelSetup
LoRaMacStatus_t LoRaMacMcChannelSetup(McChannelParams_t *channel)
LoRaMAC multicast channel setup service.
MibParam_t::McNwkSKey0
uint8_t * McNwkSKey0
Definition: LoRaMac.h:1821
McpsIndication_t::Buffer
uint8_t * Buffer
Definition: LoRaMac.h:882
MibParam_t::AppSKey
uint8_t * AppSKey
Definition: LoRaMac.h:1797
MibParam_t::Class
DeviceClass_t Class
Definition: LoRaMac.h:1707
MibParam_t::McKey3
uint8_t * McKey3
Definition: LoRaMac.h:1863
BeaconInfo_t
Definition: LoRaMac.h:465
MibRequestConfirm_t::Type
Mib_t Type
Definition: LoRaMac.h:2126
MibParam_t::McAppSKey3
uint8_t * McAppSKey3
Definition: LoRaMac.h:1869
LORAMAC_EVENT_INFO_STATUS_RX1_TIMEOUT
Definition: LoRaMac.h:525
MibRequestConfirm_t::Param
MibParam_t Param
Definition: LoRaMac.h:2131
LORAMAC_STATUS_BUSY
Definition: LoRaMac.h:2162
BeaconInfo_t::sGwSpecific::InfoDesc
uint8_t InfoDesc
Definition: LoRaMac.h:497
MIB_BEACON_GUARD
Definition: LoRaMac.h:1648
MibParam_t::NetworkActivation
ActivationType_t NetworkActivation
Definition: LoRaMac.h:1713
LORAMAC_REGION_AS923
Definition: LoRaMac.h:2273
MlmeReq_t
Definition: LoRaMac.h:1113
MibParam_t::JoinEui
uint8_t * JoinEui
Definition: LoRaMac.h:1725
ChannelParams_t::Rx1Frequency
uint32_t Rx1Frequency
Definition: LoRaMac.h:226
McpsIndication_t::DeviceTimeAnsReceived
bool DeviceTimeAnsReceived
Definition: LoRaMac.h:918
LoRaMacRegion_t
LoRaMacRegion_t
Definition: LoRaMac.h:2268
MibParam_t::Rx2DefaultChannel
RxChannelParams_t Rx2DefaultChannel
Definition: LoRaMac.h:1899
MlmeReq_t::uMlmeParam::Join
MlmeReqJoin_t Join
Definition: LoRaMac.h:1128
MibParam_t::BeaconSymbolToDefault
uint32_t BeaconSymbolToDefault
Definition: LoRaMac.h:2077
MibParam_t::BeaconInterval
uint32_t BeaconInterval
Definition: LoRaMac.h:2041
MIB_NETWORK_ACTIVATION
Definition: LoRaMac.h:1309
LoRaMacIsBusy
bool LoRaMacIsBusy(void)
Returns a value indicating if the MAC layer is busy or not.
LoRaMacCtxs_t::ConfirmQueueNvmCtxSize
size_t ConfirmQueueNvmCtxSize
Size of MLME Confirm queue module context.
Definition: LoRaMac.h:351
LoRaMacParams_t::MinRxSymbols
uint8_t MinRxSymbols
Definition: LoRaMac.h:377
LoRaMacChannelRemove
LoRaMacStatus_t LoRaMacChannelRemove(uint8_t id)
LoRaMAC channel remove service.
McpsConfirm_t::TxPower
int8_t TxPower
Definition: LoRaMac.h:827
MibParam_t::NwkSEncKey
uint8_t * NwkSEncKey
Definition: LoRaMac.h:1791
MIB_CHANNELS_DEFAULT_TX_POWER
Definition: LoRaMac.h:1591
MibParam_t::SNwkSIntKey
uint8_t * SNwkSIntKey
Definition: LoRaMac.h:1785
MIB_CHANNELS_TX_POWER
Definition: LoRaMac.h:1583
MlmeReq_t::Type
Mlme_t Type
Definition: LoRaMac.h:1118
McpsReq_t::uMcpsParam::Proprietary
McpsReqProprietary_t Proprietary
Definition: LoRaMac.h:798
McpsReqUnconfirmed_t::Datarate
int8_t Datarate
Definition: LoRaMac.h:703
MibParam_t::McNwkSKey3
uint8_t * McNwkSKey3
Definition: LoRaMac.h:1875
MlmeReqDeriveMcSessionKeyPair_t
Definition: LoRaMac.h:1102
LORAMAC_STATUS_CRYPTO_ERROR
Definition: LoRaMac.h:2238
BeaconInfo_t::Time
SysTime_t Time
Definition: LoRaMac.h:471
MlmeReqDeriveMcKEKey_t
Definition: LoRaMac.h:1083
McpsIndication_t::DevAddress
uint32_t DevAddress
Definition: LoRaMac.h:914
McpsConfirm_t::UpLinkCounter
uint32_t UpLinkCounter
Definition: LoRaMac.h:843
LORAMAC_REGION_EU868
Definition: LoRaMac.h:2293
MIB_MIN_RX_SYMBOLS
Definition: LoRaMac.h:1602
MIB_MC_APP_S_KEY_2
Definition: LoRaMac.h:1447
LORAMAC_STATUS_FREQ_AND_DR_INVALID
Definition: LoRaMac.h:2182
LORAMAC_EVENT_INFO_STATUS_MIC_FAIL
Definition: LoRaMac.h:564
MIB_CHANNELS_MASK
Definition: LoRaMac.h:1517
MLME_REJOIN_0
Definition: LoRaMac.h:962
LoRaMacProcess
void LoRaMacProcess(void)
LORAMAC_EVENT_INFO_STATUS_RX1_ERROR
Definition: LoRaMac.h:533
LORAMAC_NVMCTXMODULE_SECURE_ELEMENT
Definition: LoRaMac.h:2332
McpsConfirm_t::McpsRequest
Mcps_t McpsRequest
Definition: LoRaMac.h:815
LORAMAC_EVENT_INFO_STATUS_OK
Definition: LoRaMac.h:513
LORAMAC_REGION_IN865
Definition: LoRaMac.h:2301
RX_SLOT_WIN_1
Definition: LoRaMac.h:264
MlmeReq_t::uMlmeParam::DeriveMcKEKey
MlmeReqDeriveMcKEKey_t DeriveMcKEKey
Definition: LoRaMac.h:1140
LoRaMacCtxs_t::ClassBNvmCtx
void * ClassBNvmCtx
Pointer to Class B module context.
Definition: LoRaMac.h:339
MibRequestConfirm_t
Definition: LoRaMac.h:2121
LoRaMacParams_t::MaxRxWindow
uint32_t MaxRxWindow
Definition: LoRaMac.h:381
McRxParams_t
Definition: LoRaMacTypes.h:299
MIB_BEACON_SYMBOL_TO_EXPANSION_MAX
Definition: LoRaMac.h:1668
MIB_APP_S_KEY
Definition: LoRaMac.h:1393
McpsConfirm_t::Status
LoRaMacEventInfoStatus_t Status
Definition: LoRaMac.h:819
MLME_PING_SLOT_INFO
Definition: LoRaMac.h:1025
LORAMAC_STATUS_BUSY_PING_SLOT_WINDOW_TIME
Definition: LoRaMac.h:2230
MLME_JOIN
Definition: LoRaMac.h:956
McpsIndication_t::McpsIndication
Mcps_t McpsIndication
Definition: LoRaMac.h:858
LoRaMacParams_t::UplinkDwellTime
uint8_t UplinkDwellTime
Definition: LoRaMac.h:417
MIB_MC_NWK_S_KEY_2
Definition: LoRaMac.h:1453
LORAMAC_NVMCTXMODULE_CONFIRM_QUEUE
Definition: LoRaMac.h:2344
LORAMAC_EVENT_INFO_STATUS_DOWNLINK_TOO_MANY_FRAMES_LOSS
Definition: LoRaMac.h:556
MibParam_t::ChannelsDefaultMask
uint16_t * ChannelsDefaultMask
Definition: LoRaMac.h:1923
MIB_PING_SLOT_WINDOW
Definition: LoRaMac.h:1660
LoRaMacParams_t::MaxEirp
float MaxEirp
Definition: LoRaMac.h:425
RX_SLOT_NONE
Definition: LoRaMac.h:288
MlmeReq_t::uMlmeParam::DeriveMcSessionKeyPair
MlmeReqDeriveMcSessionKeyPair_t DeriveMcSessionKeyPair
Definition: LoRaMac.h:1144
LoRaMacCtxs_t::SecureElementNvmCtx
void * SecureElementNvmCtx
Pointer to secure element driver context.
Definition: LoRaMac.h:323
LORAMAC_EVENT_INFO_STATUS_TX_DR_PAYLOAD_SIZE_ERROR
Definition: LoRaMac.h:552
RX_SLOT_WIN_2
Definition: LoRaMac.h:268
MIB_PING_SLOT_SYMBOL_TO_EXPANSION_FACTOR
Definition: LoRaMac.h:1682
McpsIndication_t::FramePending
uint8_t FramePending
Definition: LoRaMac.h:878
ActivationType_t
ActivationType_t
Definition: LoRaMac.h:165
McpsConfirm_t::AckReceived
bool AckReceived
Definition: LoRaMac.h:831
MibParam_t::RxCDefaultChannel
RxChannelParams_t RxCDefaultChannel
Definition: LoRaMac.h:1911
MIB_PUBLIC_NETWORK
Definition: LoRaMac.h:1479
LoRaMacMcChannelDelete
LoRaMacStatus_t LoRaMacMcChannelDelete(AddressIdentifier_t groupID)
LoRaMAC multicast channel removal service.
McpsReqUnconfirmed_t::fBuffer
void * fBuffer
Definition: LoRaMac.h:695
MibParam_t::MulticastChannel
McChannelParams_t MulticastChannel
Definition: LoRaMac.h:1989
LORAMAC_NVMCTXMODULE_CLASS_B
Definition: LoRaMac.h:2340
LoRaMacFlags_t::sMacFlagBits::MacDone
uint8_t MacDone
Definition: LoRaMac.h:620
McpsReqProprietary_t
Definition: LoRaMac.h:756
LoRaMacCtxs_t::SecureElementNvmCtxSize
size_t SecureElementNvmCtxSize
Size of secure element driver context.
Definition: LoRaMac.h:327
MlmeReqTxCw_t::Timeout
uint16_t Timeout
Definition: LoRaMac.h:1061
MIB_BEACON_SYMBOL_TO_DEFAULT
Definition: LoRaMac.h:1664
LORAMAC_REGION_AU915
Definition: LoRaMac.h:2277
MibParam_t::McNwkSKey1
uint8_t * McNwkSKey1
Definition: LoRaMac.h:1839
LORAMAC_EVENT_INFO_STATUS_RX2_ERROR
Definition: LoRaMac.h:537
MLME_DERIVE_MC_KEY_PAIR
Definition: LoRaMac.h:999
MibParam_t::McKEKey
uint8_t * McKEKey
Definition: LoRaMac.h:1803
McpsIndication_t::DownLinkCounter
uint32_t DownLinkCounter
Definition: LoRaMac.h:910
MlmeConfirm_t
Definition: LoRaMac.h:1156
ChannelParams_t::Band
uint8_t Band
Definition: LoRaMac.h:234
PingSlotInfo_t::sInfoFields::RFU
uint8_t RFU
Definition: LoRaMac.h:456
LORAMAC_STATUS_MC_GROUP_UNDEFINED
Definition: LoRaMac.h:2258
MIB_LORAWAN_VERSION
Definition: LoRaMac.h:1636
McpsReqConfirmed_t::NbTrials
uint8_t NbTrials
Definition: LoRaMac.h:750
MlmeReqDeriveMcKEKey_t::Nonce
uint16_t Nonce
Definition: LoRaMac.h:1092
LORAMAC_EVENT_INFO_STATUS_MULTICAST_FAIL
Definition: LoRaMac.h:568
ACTIVATION_TYPE_ABP
Definition: LoRaMac.h:174
RX_SLOT_WIN_CLASS_C_MULTICAST
Definition: LoRaMac.h:276
MibParam_t::JSEncKey
uint8_t * JSEncKey
Definition: LoRaMac.h:1773
MIB_MAX_BEACON_LESS_PERIOD
Definition: LoRaMac.h:1686
LoRaMacCallback_t
Definition: LoRaMac.h:2383
LoRaMacParams_t::Rx1DrOffset
uint8_t Rx1DrOffset
Definition: LoRaMac.h:405
McpsReqUnconfirmed_t::fPort
uint8_t fPort
Definition: LoRaMac.h:691
LORAMAC_REGION_CN779
Definition: LoRaMac.h:2285
LORAMAC_EVENT_INFO_STATUS_RX2_TIMEOUT
Definition: LoRaMac.h:529
MIB_CHANNELS_DEFAULT_MASK
Definition: LoRaMac.h:1523
LORAMAC_STATUS_FREQUENCY_INVALID
Definition: LoRaMac.h:2174
MibParam_t::DevAddr
uint32_t DevAddr
Definition: LoRaMac.h:1749
MIB_RX2_DEFAULT_CHANNEL
Definition: LoRaMac.h:1499
BeaconInfo_t::Rssi
int16_t Rssi
Definition: LoRaMac.h:483
MIB_JOIN_ACCEPT_DELAY_2
Definition: LoRaMac.h:1559
MlmeReqDeriveMcKEKey_t::KeyID
KeyIdentifier_t KeyID
Definition: LoRaMac.h:1088
MIB_SYSTEM_MAX_RX_ERROR
Definition: LoRaMac.h:1597
PingSlotInfo_t::Value
uint8_t Value
Definition: LoRaMac.h:442
AddressIdentifier_t
AddressIdentifier_t
Definition: LoRaMacTypes.h:272
LORAMAC_STATUS_FCNT_HANDLER_ERROR
Definition: LoRaMac.h:2242
LORAMAC_EVENT_INFO_STATUS_DOWNLINK_REPEATED
Definition: LoRaMac.h:547
MIB_RXC_CHANNEL
Definition: LoRaMac.h:1505
LORAMAC_EVENT_INFO_STATUS_ERROR
Definition: LoRaMac.h:517
MLME_UNKNOWN
Definition: LoRaMac.h:950
MCPS_PROPRIETARY
Definition: LoRaMac.h:664
MIB_MAX_RX_WINDOW_DURATION
Definition: LoRaMac.h:1535
MIB_J_S_ENC_KEY
Definition: LoRaMac.h:1369
McpsIndication_t::BufferSize
uint8_t BufferSize
Definition: LoRaMac.h:886
MIB_RXC_DEFAULT_CHANNEL
Definition: LoRaMac.h:1511
MibParam_t::McKey0
uint8_t * McKey0
Definition: LoRaMac.h:1809
MIB_MC_APP_S_KEY_3
Definition: LoRaMac.h:1465
MIB_MC_APP_S_KEY_1
Definition: LoRaMac.h:1429
MibParam_t::DefaultAntennaGain
float DefaultAntennaGain
Definition: LoRaMac.h:2013
MLME_LINK_CHECK
Definition: LoRaMac.h:974
MibParam_t::PingSlotSymbolToExpansionFactor
uint32_t PingSlotSymbolToExpansionFactor
Definition: LoRaMac.h:2103
MIB_RECEIVE_DELAY_1
Definition: LoRaMac.h:1541
LoRaMacCtxs_t::MacNvmCtxSize
size_t MacNvmCtxSize
Size of Mac context.
Definition: LoRaMac.h:303
MCPS_CONFIRMED
Definition: LoRaMac.h:656
LoRaMacCtxs_t::CryptoNvmCtxSize
size_t CryptoNvmCtxSize
Size of crypto module context.
Definition: LoRaMac.h:319
LoRaMacParams_t::ChannelsNbTrans
uint8_t ChannelsNbTrans
Definition: LoRaMac.h:401
BeaconInfo_t::Snr
int8_t Snr
Definition: LoRaMac.h:487
LORAMAC_STATUS_BUSY_UPLINK_COLLISION
Definition: LoRaMac.h:2234
McpsConfirm_t::NbRetries
uint8_t NbRetries
Definition: LoRaMac.h:835
MLME_DEVICE_TIME
Definition: LoRaMac.h:1005
LORAMAC_STATUS_CLASS_B_ERROR
Definition: LoRaMac.h:2250
McpsReqConfirmed_t
Definition: LoRaMac.h:709
LoRaMacFlags_t::sMacFlagBits::MlmeSchedUplinkInd
uint8_t MlmeSchedUplinkInd
Definition: LoRaMac.h:616
MIB_S_NWK_S_INT_KEY
Definition: LoRaMac.h:1381
MibParam_t::BeaconSymbolToExpansionFactor
uint32_t BeaconSymbolToExpansionFactor
Definition: LoRaMac.h:2096
LoRaMacChannelAdd
LoRaMacStatus_t LoRaMacChannelAdd(uint8_t id, ChannelParams_t params)
LoRaMAC channel add service.
McpsReq_t::uMcpsParam
Definition: LoRaMac.h:785
MlmeReqPingSlotInfo_t
Definition: LoRaMac.h:1075
MibParam_t::McAppSKey1
uint8_t * McAppSKey1
Definition: LoRaMac.h:1833
MlmeReqDeriveMcSessionKeyPair_t::GroupID
AddressIdentifier_t GroupID
Definition: LoRaMac.h:1107
MIB_RX2_CHANNEL
Definition: LoRaMac.h:1493
MIB_MC_KE_KEY
Definition: LoRaMac.h:1399
DrRange_t::sFields
Definition: LoRaMac.h:193
MibParam_t::PingSlotWindow
uint32_t PingSlotWindow
Definition: LoRaMac.h:2071
MibParam_t::Contexts
LoRaMacCtxs_t * Contexts
Definition: LoRaMac.h:2019
MIB_MC_NWK_S_KEY_1
Definition: LoRaMac.h:1435
MLME_BEACON_ACQUISITION
Definition: LoRaMac.h:1019
ChannelParams_t::DrRange
DrRange_t DrRange
Definition: LoRaMac.h:230
ChannelParams_t::Frequency
uint32_t Frequency
Definition: LoRaMac.h:222
PingSlotInfo_t::sInfoFields::Periodicity
uint8_t Periodicity
Definition: LoRaMac.h:452
McpsIndication_t::RxData
bool RxData
Definition: LoRaMac.h:890
MibParam_t::ChannelList
ChannelParams_t * ChannelList
Definition: LoRaMac.h:1887
MibParam_t::AdrEnable
bool AdrEnable
Definition: LoRaMac.h:1737
MlmeReq_t::uMlmeParam
Definition: LoRaMac.h:1123
LORAMAC_REGION_RU864
Definition: LoRaMac.h:2309
LoRaMacParams_t::RxCChannel
RxChannelParams_t RxCChannel
Definition: LoRaMac.h:413
LoRaMacParams_t::DownlinkDwellTime
uint8_t DownlinkDwellTime
Definition: LoRaMac.h:421
McpsConfirm_t
Definition: LoRaMac.h:810
Mlme_t
Mlme_t
LoRaMAC management services.
Definition: LoRaMac.h:945
LoRaMacQueryTxPossible
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 si...
MibParam_t::ChannelsDefaultTxPower
int8_t ChannelsDefaultTxPower
Definition: LoRaMac.h:1977
LoRaMacCtxs_t::ClassBNvmCtxSize
size_t ClassBNvmCtxSize
Size of MAC Class B module context.
Definition: LoRaMac.h:343
McpsReqUnconfirmed_t::fBufferSize
uint16_t fBufferSize
Definition: LoRaMac.h:699
MIB_MC_APP_S_KEY_0
Definition: LoRaMac.h:1411
MlmeReqDeriveMcKEKey_t::DevEUI
uint8_t * DevEUI
Definition: LoRaMac.h:1096
MibParam_t::JSIntKey
uint8_t * JSIntKey
Definition: LoRaMac.h:1767
McpsIndication_t::Multicast
uint8_t Multicast
Definition: LoRaMac.h:866
McpsReq_t::ReqReturn
RequestReturnParam_t ReqReturn
Definition: LoRaMac.h:804
MLME_BEACON
Definition: LoRaMac.h:1012
KeyIdentifier_t
KeyIdentifier_t
Definition: LoRaMacTypes.h:169
LORAMAC_STATUS_DUTYCYCLE_RESTRICTED
Definition: LoRaMac.h:2214
LORAMAC_EVENT_INFO_STATUS_JOIN_FAIL
Definition: LoRaMac.h:541
RX_SLOT_WIN_CLASS_B_MULTICAST_SLOT
Definition: LoRaMac.h:284
LoRaMacMlmeRequest
LoRaMacStatus_t LoRaMacMlmeRequest(MlmeReq_t *mlmeRequest)
LoRaMAC MLME-Request.
LoRaMacCtxs_t::CommandsNvmCtx
void * CommandsNvmCtx
Pointer to MAC commands module context.
Definition: LoRaMac.h:331
PingSlotInfo_t
Definition: LoRaMac.h:437
LoRaMacCtxs_t::MacNvmCtx
void * MacNvmCtx
Pointer to Mac context.
Definition: LoRaMac.h:299
MlmeReq_t::uMlmeParam::PingSlotInfo
MlmeReqPingSlotInfo_t PingSlotInfo
Definition: LoRaMac.h:1136
MibParam_t::AppKey
uint8_t * AppKey
Definition: LoRaMac.h:1755
MlmeReqTxCw_t::Power
int8_t Power
Definition: LoRaMac.h:1069
MibParam_t::BeaconWindowSlots
uint32_t BeaconWindowSlots
Definition: LoRaMac.h:2065
MibParam_t
Definition: LoRaMac.h:1700
MIB_MC_NWK_S_KEY_3
Definition: LoRaMac.h:1471
LoRaMacFlags_t::sMacFlagBits::MlmeReq
uint8_t MlmeReq
Definition: LoRaMac.h:608
LoRaMacCtxs_t::CommandsNvmCtxSize
size_t CommandsNvmCtxSize
Size of MAC commands module context.
Definition: LoRaMac.h:335
BeaconInfo_t::sGwSpecific
Definition: LoRaMac.h:492
LORAMAC_STATUS_SERVICE_UNKNOWN
Definition: LoRaMac.h:2166
LORAMAC_STATUS_OK
Definition: LoRaMac.h:2158
MibParam_t::BeaconReserved
uint32_t BeaconReserved
Definition: LoRaMac.h:2047
Mcps_t
Mcps_t
LoRaMAC data services.
Definition: LoRaMac.h:647
MIB_PING_SLOT_SYMBOL_TO_EXPANSION_MAX
Definition: LoRaMac.h:1672
MibParam_t::NetID
uint32_t NetID
Definition: LoRaMac.h:1743
LORAMAC_REGION_EU433
Definition: LoRaMac.h:2289
LORAMAC_STATUS_BUSY_BEACON_RESERVED_TIME
Definition: LoRaMac.h:2226
McpsIndication_t::RxDatarate
uint8_t RxDatarate
Definition: LoRaMac.h:874
MlmeReq_t::uMlmeParam::TxCw
MlmeReqTxCw_t TxCw
Definition: LoRaMac.h:1132
DrRange_t::sFields::Max
int8_t Max
Definition: LoRaMac.h:210
MIB_SE_PIN
Definition: LoRaMac.h:1325
LORAMAC_STATUS_MAC_COMMAD_ERROR
Definition: LoRaMac.h:2246
MIB_J_S_INT_KEY
Definition: LoRaMac.h:1363
MIB_NET_ID
Definition: LoRaMac.h:1339
RequestReturnParam_t::DutyCycleWaitTime
TimerTime_t DutyCycleWaitTime
Definition: LoRaMac.h:677
MIB_CHANNELS_NB_TRANS
Definition: LoRaMac.h:1529
LoRaMacFlags_t::sMacFlagBits::McpsReq
uint8_t McpsReq
Definition: LoRaMac.h:600
MIB_BEACON_INTERVAL
Definition: LoRaMac.h:1640
MibParam_t::McKey2
uint8_t * McKey2
Definition: LoRaMac.h:1845
McpsConfirm_t::TxTimeOnAir
TimerTime_t TxTimeOnAir
Definition: LoRaMac.h:839
LoRaMacCtxs_t::RegionNvmCtxSize
size_t RegionNvmCtxSize
Size of region context.
Definition: LoRaMac.h:311
LoRaMacMibGetRequestConfirm
LoRaMacStatus_t LoRaMacMibGetRequestConfirm(MibRequestConfirm_t *mibGet)
LoRaMAC MIB-Get.
LoRaMacParams_t::ReceiveDelay1
uint32_t ReceiveDelay1
Definition: LoRaMac.h:385
LoRaMacParams_t
Definition: LoRaMac.h:357
MIB_CHANNELS_DATARATE
Definition: LoRaMac.h:1575
McpsReq_t::uMcpsParam::Unconfirmed
McpsReqUnconfirmed_t Unconfirmed
Definition: LoRaMac.h:790
LoRaMacRxSlot_t
LoRaMacRxSlot_t
Definition: LoRaMac.h:259
LoRaMacParams_t::JoinAcceptDelay2
uint32_t JoinAcceptDelay2
Definition: LoRaMac.h:397
McpsReq_t
Definition: LoRaMac.h:775
MibParam_t::sLrWanVersion
Definition: LoRaMac.h:2031
MLME_BEACON_LOST
Definition: LoRaMac.h:1039
MIB_NWK_S_ENC_KEY
Definition: LoRaMac.h:1387
DrRange_t::Value
int8_t Value
Definition: LoRaMac.h:189
MlmeReqTxCw_t
Definition: LoRaMac.h:1056
LORAMAC_STATUS_ERROR
Definition: LoRaMac.h:2262
LoRaMacEventInfoStatus_t
LoRaMacEventInfoStatus_t
Definition: LoRaMac.h:508
MLME_SCHEDULE_UPLINK
Definition: LoRaMac.h:991
MibParam_t::NwkKey
uint8_t * NwkKey
Definition: LoRaMac.h:1761
LoRaMacNvmCtxModule_t
LoRaMacNvmCtxModule_t
Definition: LoRaMac.h:2315
LORAMAC_EVENT_INFO_STATUS_TX_TIMEOUT
Definition: LoRaMac.h:521
LoRaMacCtxs_t::ConfirmQueueNvmCtx
void * ConfirmQueueNvmCtx
Pointer to MLME Confirm queue module context.
Definition: LoRaMac.h:347
MibParam_t::McNwkSKey2
uint8_t * McNwkSKey2
Definition: LoRaMac.h:1857
McpsReqUnconfirmed_t
Definition: LoRaMac.h:683
MlmeConfirm_t::DemodMargin
uint8_t DemodMargin
Definition: LoRaMac.h:1174
MibParam_t::BeaconWindow
uint32_t BeaconWindow
Definition: LoRaMac.h:2059
McpsIndication_t::Port
uint8_t Port
Definition: LoRaMac.h:870
MlmeConfirm_t::BeaconTimingChannel
uint8_t BeaconTimingChannel
Definition: LoRaMac.h:1191
MIB_BEACON_WINDOW_SLOTS
Definition: LoRaMac.h:1656
MIB_MC_KEY_3
Definition: LoRaMac.h:1459
LoRaMacTxInfo_t::MaxPossibleApplicationDataSize
uint8_t MaxPossibleApplicationDataSize
Definition: LoRaMac.h:2142
LoRaMacTxInfo_t
Definition: LoRaMac.h:2137
McpsIndication_t
Definition: LoRaMac.h:853
LoRaMacTxInfo_t::CurrentPossiblePayloadSize
uint8_t CurrentPossiblePayloadSize
Definition: LoRaMac.h:2147
MibParam_t::PingSlotDatarate
int8_t PingSlotDatarate
Definition: LoRaMac.h:2115
MibParam_t::BeaconSymbolToExpansionMax
uint32_t BeaconSymbolToExpansionMax
Definition: LoRaMac.h:2083
McChannelParams_t
Definition: LoRaMacTypes.h:333
MibParam_t::MaxBeaconLessPeriod
uint32_t MaxBeaconLessPeriod
Definition: LoRaMac.h:2109
LoRaMacStart
LoRaMacStatus_t LoRaMacStart(void)
Starts LoRaMAC layer.
LoRaMacMcChannelSetupRxParams
LoRaMacStatus_t LoRaMacMcChannelSetupRxParams(AddressIdentifier_t groupID, McRxParams_t *rxParams, uint8_t *status)
LoRaMAC multicast channel Rx parameters setup service.
RequestReturnParam_t
Definition: LoRaMac.h:670
MlmeConfirm_t::NbGateways
uint8_t NbGateways
Definition: LoRaMac.h:1178
MIB_ANTENNA_GAIN
Definition: LoRaMac.h:1613
LORAMAC_REGION_CN470
Definition: LoRaMac.h:2281
LoRaMacInitialization
LoRaMacStatus_t LoRaMacInitialization(LoRaMacPrimitives_t *primitives, LoRaMacCallback_t *callbacks, LoRaMacRegion_t region)
LoRaMAC layer initialization.
LORAMAC_EVENT_INFO_STATUS_BEACON_LOST
Definition: LoRaMac.h:576
MIB_JOIN_ACCEPT_DELAY_1
Definition: LoRaMac.h:1553
MlmeIndication_t::MlmeIndication
Mlme_t MlmeIndication
Definition: LoRaMac.h:1202
LORAMAC_NVMCTXMODULE_COMMANDS
Definition: LoRaMac.h:2336
LORAMAC_NVMCTXMODULE_REGION
Definition: LoRaMac.h:2324
LoRaMacMibSetRequestConfirm
LoRaMacStatus_t LoRaMacMibSetRequestConfirm(MibRequestConfirm_t *mibSet)
LoRaMAC MIB-Set.
LoRaMacParams_t::JoinAcceptDelay1
uint32_t JoinAcceptDelay1
Definition: LoRaMac.h:393
MLME_TXCW_1
Definition: LoRaMac.h:986
LoRaMacFlags_t::sMacFlagBits
Definition: LoRaMac.h:595
McpsIndication_t::RxSlot
LoRaMacRxSlot_t RxSlot
Definition: LoRaMac.h:902
LORAMAC_EVENT_INFO_STATUS_BEACON_LOCKED
Definition: LoRaMac.h:572
LoRaMacParams_t::SystemMaxRxError
uint32_t SystemMaxRxError
Definition: LoRaMac.h:372