Loading...
Searching...
No Matches
LoRaMAC compile configurations

Detailed Description

Macros

#define CONFIG_LORAMAC_DEV_EUI_DEFAULT   "0000000000000000"
 Default device EUI.
 
#define CONFIG_LORAMAC_JOIN_EUI_DEFAULT   "0000000000000000"
 Default join EUI.
 
#define CONFIG_LORAMAC_APP_EUI_DEFAULT   "0000000000000000"
 Default application EUI.
 
#define CONFIG_LORAMAC_APP_KEY_DEFAULT   "00000000000000000000000000000000"
 Default application key.
 
#define CONFIG_LORAMAC_NWK_KEY_DEFAULT   "00000000000000000000000000000000"
 Default network key.
 
#define CONFIG_LORAMAC_APP_SKEY_DEFAULT   "00000000000000000000000000000000"
 Default application session key.
 
#define CONFIG_LORAMAC_NWK_SKEY_DEFAULT   "00000000000000000000000000000000"
 Default network session key.
 
#define CONFIG_LORAMAC_FNWKSINT_KEY_DEFAULT   "00000000000000000000000000000000"
 Default network session integrity key.
 
#define CONFIG_LORAMAC_SNWKSINT_KEY_DEFAULT   "00000000000000000000000000000000"
 Default serving network session integrity key.
 
#define CONFIG_LORAMAC_NWKSENC_KEY_DEFAULT   "00000000000000000000000000000000"
 Default network session encryption key.
 
#define CONFIG_LORAMAC_DEV_ADDR_DEFAULT   "00000000"
 Default device address.
 
#define CONFIG_LORAMAC_REGION_EU_868   1
 Default LoRaWAN region.
 
#define CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS   (LORAMAC_CLASS_A)
 Default device class (A, B or C)
 
#define CONFIG_LORAMAC_DEFAULT_NETID   (1U)
 Default NetID (only valid with ABP join procedure)
 
#define CONFIG_LORAMAC_DEFAULT_PRIVATE_NETWORK
 Toggle network type (public or private)
 
#define CONFIG_LORAMAC_DEFAULT_DR   (LORAMAC_DR_0)
 Default datarate index.
 
#define CONFIG_LORAMAC_DEFAULT_TX_POWER   (LORAMAC_TX_PWR_1)
 Default MAC TX power index.
 
#define CONFIG_LORAMAC_DEFAULT_TX_PORT   (2U)
 Default MAC TX port (from 1 to 223)
 
#define CONFIG_LORAMAC_DEFAULT_TX_MODE   (LORAMAC_TX_CNF)
 Default MAC TX mode (confirmable or unconfirmable)
 
#define CONFIG_LORAMAC_DEFAULT_REDUNDANCY   (0U)
 Default redundancy for unconfirmed uplink.
 
#define CONFIG_LORAMAC_DEFAULT_ADR
 Enable/disable adaptive datarate state.
 
#define CONFIG_LORAMAC_DEFAULT_RETX   (5U)
 Default uplink retransmission.
 
#define CONFIG_LORAMAC_DEFAULT_LINKCHK   (0U)
 Default link check interval (in seconds)
 
#define CONFIG_LORAMAC_DEFAULT_RX1_DELAY   (1000U)
 Default first RX window delay (in ms)
 
#define CONFIG_LORAMAC_DEFAULT_JOIN_PROCEDURE   (LORAMAC_JOIN_OTAA)
 Default second RX (RX2) window datarate index.
 
#define CONFIG_LORAMAC_DEFAULT_JOIN_DELAY1   (5U)
 Default LoRaMAC join accept delay 1 (in seconds)
 
#define CONFIG_LORAMAC_DEFAULT_JOIN_DELAY2   (6U)
 Default LoRaMAC join accept delay 2.
 
#define CONFIG_LORAMAC_DEFAULT_MAX_FCNT_GAP   (16384U)
 Default max FCNT gap.
 
#define CONFIG_LORAMAC_DEFAULT_SYSTEM_MAX_RX_ERROR   (50)
 Default maximum system overall timing error.
 
#define CONFIG_LORAMAC_DEFAULT_MIN_RX_SYMBOLS   (12)
 Default minimum RX symbols to detect a frame.
 

Macro Definition Documentation

◆ CONFIG_LORAMAC_APP_EUI_DEFAULT

#define CONFIG_LORAMAC_APP_EUI_DEFAULT   "0000000000000000"

Default application EUI.

8 bytes key, required for join procedure

Definition at line 64 of file loramac.h.

◆ CONFIG_LORAMAC_APP_KEY_DEFAULT

#define CONFIG_LORAMAC_APP_KEY_DEFAULT   "00000000000000000000000000000000"

Default application key.

16 bytes key, required for join procedure

Definition at line 73 of file loramac.h.

◆ CONFIG_LORAMAC_APP_SKEY_DEFAULT

#define CONFIG_LORAMAC_APP_SKEY_DEFAULT   "00000000000000000000000000000000"

Default application session key.

16 bytes key, only required for ABP join procedure type

Definition at line 91 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_ADR

#define CONFIG_LORAMAC_DEFAULT_ADR

Enable/disable adaptive datarate state.

If enabled the end node will inform the network server about the status of ADR using the ADR field in uplink data packet. The network server will then optimize the data rate and the transmission power of the end node based on the information collected from the network.

Definition at line 339 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS

#define CONFIG_LORAMAC_DEFAULT_DEVICE_CLASS   (LORAMAC_CLASS_A)

Default device class (A, B or C)

Configure the class of device. LoRaWAN supports three classes of operation for end nodes namely Class A, B and C. All LoRaWAN devices are expected to implement Class A, whereas Class B and Class C can be considered as extensions to the specification of Class A devices.

See also
LoRaWAN Classes by TTN
Note
GNRC LoRaWAN only supports Class A

Definition at line 166 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_DR

#define CONFIG_LORAMAC_DEFAULT_DR   (LORAMAC_DR_0)

Default datarate index.

Data rate combines two aspects, Bandwidth (BW) and Spreading Factor (SF). BW depends on the region while SF contributes to the dwell time in any given band which is limited by region. DR hence signifies difference combination on BW and SF for different regions. Refer LoRaWAN 1.0.3 Regional Parameters for more information.

Definition at line 237 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_JOIN_DELAY1

#define CONFIG_LORAMAC_DEFAULT_JOIN_DELAY1   (5U)

Default LoRaMAC join accept delay 1 (in seconds)

Maximum wait time in end node to receive the join-accept message sent by the network in the first receive window. This is similar to the operation of RX1 window.

Definition at line 461 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_JOIN_DELAY2

#define CONFIG_LORAMAC_DEFAULT_JOIN_DELAY2   (6U)

Default LoRaMAC join accept delay 2.

Maximum wait time in end node to receive the join-accept message sent by the network in the second receive window. This is similar to the operation of RX2 window.

Definition at line 472 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_JOIN_PROCEDURE

#define CONFIG_LORAMAC_DEFAULT_JOIN_PROCEDURE   (LORAMAC_JOIN_OTAA)

Default second RX (RX2) window datarate index.

This may be changed only if the network server can be configured with the same datarate.

Default second RX (RX2) window frequency (in Hz)

Default LoRaMAC join procedure

There are two options, Over The Air Activation (OTAA) results in device sending join request to the network whereas in the case of Activation By Personalization (ABP) the user enters the activation keys manually. OTAA is the preferred and most secure way to connect to a LoRaWAN network. For quick testing ABP is preferred as the device can transmit right away without waiting for the network to provision the keys.

Definition at line 450 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_LINKCHK

#define CONFIG_LORAMAC_DEFAULT_LINKCHK   (0U)

Default link check interval (in seconds)

0 means the link check process is disabled. The link check process is used by an end-device to validate its connectivity with the network. The frame has no payload. When a LinkCheckReq is received by the network server via one or multiple gateways, it responds with a LinkCheckAns MAC command.

Definition at line 361 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_MAX_FCNT_GAP

#define CONFIG_LORAMAC_DEFAULT_MAX_FCNT_GAP   (16384U)

Default max FCNT gap.

Frame counter deviation is the difference between the frame counter values transmitted by the End Node and the value stored in Network Server (NS).

Definition at line 482 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_MIN_RX_SYMBOLS

#define CONFIG_LORAMAC_DEFAULT_MIN_RX_SYMBOLS   (12)

Default minimum RX symbols to detect a frame.

This configuration is used to arrive at T_RX_late which is used in RX window calculation. This may be increased to account for inaccuracies in system timer. Refer SX1276_settings_for_LoRaWAN_v2p2.pdf (AN1200.24) from Semtech for more information.

Definition at line 505 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_NETID

#define CONFIG_LORAMAC_DEFAULT_NETID   (1U)

Default NetID (only valid with ABP join procedure)

NETID is used by networks for assigning network-specific addresses to their end-devices (i.e., DevAddr) so that uplink frames sent by those devices even when they are roaming outside their home network can be forwarded to their home network.

Definition at line 178 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_PRIVATE_NETWORK

#define CONFIG_LORAMAC_DEFAULT_PRIVATE_NETWORK

Toggle network type (public or private)

Set "1" to enable private network, set "0" to enable public network. This configuration sets the sync word for LoRaWAN communication. This should be in concordance with the gateway configuration. Public networks use 0x34 while private networks use 0x12 as sync word.

Definition at line 190 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_REDUNDANCY

#define CONFIG_LORAMAC_DEFAULT_REDUNDANCY   (0U)

Default redundancy for unconfirmed uplink.

This corresponds to the number of unconfirmed uplink retransmissions when using ADR. This configuration does not affect confirmed uplinks. By default, uplinks are sent without retransmissions (this means, the device sends only one uplink packet)

Note
This value MUST NOT be greater than 14, since the LinkADRCommand it's already limited by a 4 bit value (therefore, 15 uplink transmissions)

Definition at line 327 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_RETX

#define CONFIG_LORAMAC_DEFAULT_RETX   (5U)

Default uplink retransmission.

Maximum number of retransmissions to be used for a confirmed uplink packet, if no downlink acknowledgment is received from the network.

Definition at line 349 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_RX1_DELAY

#define CONFIG_LORAMAC_DEFAULT_RX1_DELAY   (1000U)

Default first RX window delay (in ms)

This configuration specifies the delay in seconds to open the RX1 window after the end of uplink modulation on the end-node.

Definition at line 371 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_SYSTEM_MAX_RX_ERROR

#define CONFIG_LORAMAC_DEFAULT_SYSTEM_MAX_RX_ERROR   (50)

Default maximum system overall timing error.

This configuration is used to increase the RX window to account for timer drift. This may be decreased if the system clock is accurate, for eg: if the system clock is from a TCXO.

Definition at line 493 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_TX_MODE

#define CONFIG_LORAMAC_DEFAULT_TX_MODE   (LORAMAC_TX_CNF)

Default MAC TX mode (confirmable or unconfirmable)

A confirmed uplink will expect an acknowledgment from the network server; otherwise, the message will be retransmitted by the number indicated by CONFIG_LORAMAC_DEFAULT_RETX , whereas an unconfirmed message will not expect any acknowledgment back from the network server.

Definition at line 312 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_TX_PORT

#define CONFIG_LORAMAC_DEFAULT_TX_PORT   (2U)

Default MAC TX port (from 1 to 223)

The TX port denotes the port field FPort in the payload and is commonly used on the destination side (Application Server) to distinguish different payload formats. For example it can be used to identify different sensor types/values from the same end-node and hence different payload formats can be assigned to the different values based on value of port.

Definition at line 294 of file loramac.h.

◆ CONFIG_LORAMAC_DEFAULT_TX_POWER

#define CONFIG_LORAMAC_DEFAULT_TX_POWER   (LORAMAC_TX_PWR_1)

Default MAC TX power index.

TXPower index indicates power levels relative to the max EIRP level of the end-device. Refer LoRaWAN 1.0.3 Regional Parameters for more information.

Definition at line 281 of file loramac.h.

◆ CONFIG_LORAMAC_DEV_ADDR_DEFAULT

#define CONFIG_LORAMAC_DEV_ADDR_DEFAULT   "00000000"

Default device address.

Definition at line 134 of file loramac.h.

◆ CONFIG_LORAMAC_DEV_EUI_DEFAULT

#define CONFIG_LORAMAC_DEV_EUI_DEFAULT   "0000000000000000"

Default device EUI.

8 bytes key, required for join procedure

Definition at line 46 of file loramac.h.

◆ CONFIG_LORAMAC_FNWKSINT_KEY_DEFAULT

#define CONFIG_LORAMAC_FNWKSINT_KEY_DEFAULT   "00000000000000000000000000000000"

Default network session integrity key.

16 bytes key, required for join procedure

Definition at line 109 of file loramac.h.

◆ CONFIG_LORAMAC_JOIN_EUI_DEFAULT

#define CONFIG_LORAMAC_JOIN_EUI_DEFAULT   "0000000000000000"

Default join EUI.

8 bytes key, required for join procedure

Definition at line 55 of file loramac.h.

◆ CONFIG_LORAMAC_NWK_KEY_DEFAULT

#define CONFIG_LORAMAC_NWK_KEY_DEFAULT   "00000000000000000000000000000000"

Default network key.

16 bytes key, required for join procedure

Definition at line 82 of file loramac.h.

◆ CONFIG_LORAMAC_NWK_SKEY_DEFAULT

#define CONFIG_LORAMAC_NWK_SKEY_DEFAULT   "00000000000000000000000000000000"

Default network session key.

16 bytes key, only required for ABP join procedure type.

Definition at line 100 of file loramac.h.

◆ CONFIG_LORAMAC_NWKSENC_KEY_DEFAULT

#define CONFIG_LORAMAC_NWKSENC_KEY_DEFAULT   "00000000000000000000000000000000"

Default network session encryption key.

16 bytes key, required for join procedure

Definition at line 127 of file loramac.h.

◆ CONFIG_LORAMAC_REGION_EU_868

#define CONFIG_LORAMAC_REGION_EU_868   1

Default LoRaWAN region.

Definition at line 142 of file loramac.h.

◆ CONFIG_LORAMAC_SNWKSINT_KEY_DEFAULT

#define CONFIG_LORAMAC_SNWKSINT_KEY_DEFAULT   "00000000000000000000000000000000"

Default serving network session integrity key.

16 bytes key, required for join procedure

Definition at line 118 of file loramac.h.