LoRaMAC
4.5.2
Documentation of the API
|
LoRa MAC layer internal types definition. Please do not include in application sources. More...
#include <stdint.h>
#include <stdbool.h>
#include "timer.h"
#include "systime.h"
Go to the source code of this file.
LoRa MAC layer internal types definition. Please do not include in application sources.
addtogroup LORAMAC
union McRxParams_t |
Data Fields | ||
---|---|---|
struct McRxParams_t | ClassB | |
struct McRxParams_t | ClassC |
struct McChannelParams_t |
Multicast channel
Data Fields | ||
---|---|---|
bool | IsRemotelySetup |
Indicate if the multicast channel is being setup remotely or locally. Indicates which set of keys are to be used. uMcKeys |
DeviceClass_t | Class |
Multicats channel LoRaWAN class B or C |
bool | IsEnabled |
True if the entry is active |
AddressIdentifier_t | GroupID | |
uint32_t | Address |
Address |
union uMcKeys | McKeys | |
uint32_t | FCountMin |
Minimum multicast frame counter value |
uint32_t | FCountMax |
Maximum multicast frame counter value |
McRxParams_t | RxParams |
Multicast reception parameters |
union McChannelParams_t::uMcKeys |
Multicast keys
Data Fields | ||
---|---|---|
uint8_t * | McKeyE |
Encrypted multicast key - Used when IsRemotelySetup equals |
struct uMcKeys | Session |
Multicast Session keys - Used when IsRemotelySetup equals |
struct MulticastCtx_t |
Multicast context
Data Fields | ||
---|---|---|
McChannelParams_t | ChannelParams |
Multicast channel parameters |
uint32_t * | DownLinkCounter |
Downlink counter |
uint8_t | PingNb |
Number of multicast slots. The variable can be calculated as follows: PingNb = 128 / ( 1 << periodicity ), where 0 <= periodicity <= 7 |
uint16_t | PingPeriod |
Period of the multicast slots. The variable can be calculated as follows: PingPeriod = 4096 / PingNb |
uint16_t | PingOffset |
Ping offset of the multicast channel for Class B |
uint8_t | FPendingSet |
Set to 1, if the FPending bit is set |
struct Band_t |
LoRaMAC band parameters definition
union DrRange_t |
LoRaMAC channels parameters definition
Data Fields | ||
---|---|---|
int8_t | Value |
Byte-access to the bits |
struct sFields | Fields |
struct DrRange_t::sFields |
Structure to store the minimum and the maximum datarate
Data Fields | ||
---|---|---|
int8_t | Min: 4 |
Minimum data rate LoRaWAN Regional Parameters V1.0.2rB The allowed ranges are region specific. Please refer to DR_0 to DR_15 for details. |
int8_t | Max: 4 |
Maximum 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 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 McRxParams_t.ClassB |
struct McRxParams_t.ClassC |
struct McChannelParams_t::uMcKeys.Session |
#define LORAMAC_CRYPTO_UNICAST_KEYS 0 |
Start value for unicast keys enumeration
#define LORAMAC_CRYPTO_MULTICAST_KEYS 127 |
Start value for multicast keys enumeration
#define LORAMAC_MAX_MC_CTX 4 |
Maximum number of multicast context
#define DR_0 0 |
Region | SF |
---|---|
AS923 | SF12 - BW125 |
AU915 | SF10 - BW125 |
CN470 | SF12 - BW125 |
CN779 | SF12 - BW125 |
EU433 | SF12 - BW125 |
EU868 | SF12 - BW125 |
IN865 | SF12 - BW125 |
KR920 | SF12 - BW125 |
US915 | SF10 - BW125 |
RU864 | SF12 - BW125 |
#define DR_1 1 |
Region | SF |
---|---|
AS923 | SF11 - BW125 |
AU915 | SF9 - BW125 |
CN470 | SF11 - BW125 |
CN779 | SF11 - BW125 |
EU433 | SF11 - BW125 |
EU868 | SF11 - BW125 |
IN865 | SF11 - BW125 |
KR920 | SF11 - BW125 |
US915 | SF9 - BW125 |
RU864 | SF11 - BW125 |
#define DR_2 2 |
Region | SF |
---|---|
AS923 | SF10 - BW125 |
AU915 | SF8 - BW125 |
CN470 | SF10 - BW125 |
CN779 | SF10 - BW125 |
EU433 | SF10 - BW125 |
EU868 | SF10 - BW125 |
IN865 | SF10 - BW125 |
KR920 | SF10 - BW125 |
US915 | SF8 - BW125 |
RU864 | SF10 - BW125 |
#define DR_3 3 |
Region | SF |
---|---|
AS923 | SF9 - BW125 |
AU915 | SF7 - BW125 |
CN470 | SF9 - BW125 |
CN779 | SF9 - BW125 |
EU433 | SF9 - BW125 |
EU868 | SF9 - BW125 |
IN865 | SF9 - BW125 |
KR920 | SF9 - BW125 |
US915 | SF7 - BW125 |
RU864 | SF9 - BW125 |
#define DR_4 4 |
Region | SF |
---|---|
AS923 | SF8 - BW125 |
AU915 | SF8 - BW500 |
CN470 | SF8 - BW125 |
CN779 | SF8 - BW125 |
EU433 | SF8 - BW125 |
EU868 | SF8 - BW125 |
IN865 | SF8 - BW125 |
KR920 | SF8 - BW125 |
US915 | SF8 - BW500 |
RU864 | SF8 - BW125 |
#define DR_5 5 |
Region | SF |
---|---|
AS923 | SF7 - BW125 |
AU915 | RFU |
CN470 | SF7 - BW125 |
CN779 | SF7 - BW125 |
EU433 | SF7 - BW125 |
EU868 | SF7 - BW125 |
IN865 | SF7 - BW125 |
KR920 | SF7 - BW125 |
US915 | RFU |
RU864 | SF7 - BW125 |
#define DR_6 6 |
Region | SF |
---|---|
AS923 | SF7 - BW250 |
AU915 | RFU |
CN470 | SF12 - BW125 |
CN779 | SF7 - BW250 |
EU433 | SF7 - BW250 |
EU868 | SF7 - BW250 |
IN865 | SF7 - BW250 |
KR920 | RFU |
US915 | RFU |
RU864 | SF7 - BW250 |
#define DR_7 7 |
Region | SF |
---|---|
AS923 | FSK |
AU915 | RFU |
CN470 | SF12 - BW125 |
CN779 | FSK |
EU433 | FSK |
EU868 | FSK |
IN865 | FSK |
KR920 | RFU |
US915 | RFU |
RU864 | FSK |
#define DR_8 8 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | SF12 - BW500 |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | SF12 - BW500 |
RU864 | RFU |
#define DR_9 9 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | SF11 - BW500 |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | SF11 - BW500 |
RU864 | RFU |
#define DR_10 10 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | SF10 - BW500 |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | SF10 - BW500 |
RU864 | RFU |
#define DR_11 11 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | SF9 - BW500 |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | SF9 - BW500 |
RU864 | RFU |
#define DR_12 12 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | SF8 - BW500 |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | SF8 - BW500 |
RU864 | RFU |
#define DR_13 13 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | SF7 - BW500 |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | SF7 - BW500 |
RU864 | RFU |
#define DR_14 14 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | RFU |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | RFU |
RU864 | RFU |
#define DR_15 15 |
Region | SF |
---|---|
AS923 | RFU |
AU915 | RFU |
CN470 | RFU |
CN779 | RFU |
EU433 | RFU |
EU868 | RFU |
IN865 | RFU |
KR920 | RFU |
US915 | RFU |
RU864 | RFU |
#define TX_POWER_0 0 |
Region | dBM |
---|---|
AS923 | Max EIRP |
AU915 | Max EIRP |
CN470 | Max EIRP |
CN779 | Max EIRP |
EU433 | Max EIRP |
EU868 | Max EIRP |
IN865 | Max EIRP |
KR920 | Max EIRP |
US915 | Max ERP |
RU864 | Max EIRP |
#define TX_POWER_1 1 |
Region | dBM |
---|---|
AS923 | Max EIRP - 2 |
AU915 | Max EIRP - 2 |
CN470 | Max EIRP - 2 |
CN779 | Max EIRP - 2 |
EU433 | Max EIRP - 2 |
EU868 | Max EIRP - 2 |
IN865 | Max EIRP - 2 |
KR920 | Max EIRP - 2 |
US915 | Max ERP - 2 |
RU864 | Max EIRP - 2 |
#define TX_POWER_2 2 |
Region | dBM |
---|---|
AS923 | Max EIRP - 4 |
AU915 | Max EIRP - 4 |
CN470 | Max EIRP - 4 |
CN779 | Max EIRP - 4 |
EU433 | Max EIRP - 4 |
EU868 | Max EIRP - 4 |
IN865 | Max EIRP - 4 |
KR920 | Max EIRP - 4 |
US915 | Max ERP - 4 |
RU864 | Max EIRP - 4 |
#define TX_POWER_3 3 |
Region | dBM |
---|---|
AS923 | Max EIRP - 6 |
AU915 | Max EIRP - 6 |
CN470 | Max EIRP - 6 |
CN779 | Max EIRP - 6 |
EU433 | Max EIRP - 6 |
EU868 | Max EIRP - 6 |
IN865 | Max EIRP - 6 |
KR920 | Max EIRP - 6 |
US915 | Max ERP - 6 |
RU864 | Max EIRP - 6 |
#define TX_POWER_4 4 |
Region | dBM |
---|---|
AS923 | Max EIRP - 8 |
AU915 | Max EIRP - 8 |
CN470 | Max EIRP - 8 |
CN779 | Max EIRP - 8 |
EU433 | Max EIRP - 8 |
EU868 | Max EIRP - 8 |
IN865 | Max EIRP - 8 |
KR920 | Max EIRP - 8 |
US915 | Max ERP - 8 |
RU864 | Max EIRP - 8 |
#define TX_POWER_5 5 |
Region | dBM |
---|---|
AS923 | Max EIRP - 10 |
AU915 | Max EIRP - 10 |
CN470 | Max EIRP - 10 |
CN779 | Max EIRP - 10 |
EU433 | Max EIRP - 10 |
EU868 | Max EIRP - 10 |
IN865 | Max EIRP - 10 |
KR920 | Max EIRP - 10 |
US915 | Max ERP - 10 |
RU864 | Max EIRP - 10 |
#define TX_POWER_6 6 |
Region | dBM |
---|---|
AS923 | Max EIRP - 12 |
AU915 | Max EIRP - 12 |
CN470 | Max EIRP - 12 |
CN779 | - |
EU433 | - |
EU868 | Max EIRP - 12 |
IN865 | Max EIRP - 12 |
KR920 | Max EIRP - 12 |
US915 | Max ERP - 12 |
RU864 | Max EIRP - 12 |
#define TX_POWER_7 7 |
Region | dBM |
---|---|
AS923 | Max EIRP - 14 |
AU915 | Max EIRP - 14 |
CN470 | Max EIRP - 14 |
CN779 | - |
EU433 | - |
EU868 | Max EIRP - 14 |
IN865 | Max EIRP - 14 |
KR920 | Max EIRP - 14 |
US915 | Max ERP - 14 |
RU864 | Max EIRP - 14 |
#define TX_POWER_8 8 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 16 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | Max EIRP - 16 |
KR920 | - |
US915 | Max ERP - 16 |
RU864 | - |
#define TX_POWER_9 9 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 18 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | Max EIRP - 18 |
KR920 | - |
US915 | Max ERP - 18 |
RU864 | - |
#define TX_POWER_10 10 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 20 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | Max EIRP - 20 |
KR920 | - |
US915 | Max ERP - 20 |
RU864 | - |
#define TX_POWER_11 11 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 22 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | - |
KR920 | - |
US915 | Max ERP - 22 |
RU864 | - |
#define TX_POWER_12 12 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 24 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | - |
KR920 | - |
US915 | Max ERP - 24 |
RU864 | - |
#define TX_POWER_13 13 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 26 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | - |
KR920 | - |
US915 | Max ERP - 26 |
RU864 | - |
#define TX_POWER_14 14 |
Region | dBM |
---|---|
AS923 | - |
AU915 | Max EIRP - 28 |
CN470 | - |
CN779 | - |
EU433 | - |
EU868 | - |
IN865 | - |
KR920 | - |
US915 | Max ERP - 28 |
RU864 | - |
#define TX_POWER_15 15 |
RFU
enum DeviceClass_t |
LoRaWAN devices classes definition
LoRaWAN Specification V1.0.2, chapter 2.1
enum FType_t |
LoRaWAN Frame type enumeration to differ between the possible data up/down frame configurations.
Note: The naming is implementation specific since there is no definition in the LoRaWAN specification included.
enum FCntIdentifier_t |
LoRaWAN Frame counter identifier.
enum KeyIdentifier_t |
LoRaMac Key identifier
enum AddressIdentifier_t |
enum JoinReqIdentifier_t |
enum LoRaMacMoteCmd_t |
LoRaMAC mote MAC commands
LoRaWAN Specification V1.1.0, chapter 5, table 4
enum LoRaMacSrvCmd_t |
LoRaMAC server MAC commands
LoRaWAN Specification V1.1.0 chapter 5, table 4
enum LoRaMacFrameType_t |
LoRaMAC frame types
LoRaWAN Specification V1.0.2, chapter 4.2.1, table 1