diff --git a/_lo_ra_w_a_n_8h_source.html b/_lo_ra_w_a_n_8h_source.html
index 067c4263..8897aa68 100644
--- a/_lo_ra_w_a_n_8h_source.html
+++ b/_lo_ra_w_a_n_8h_source.html
@@ -279,489 +279,494 @@ $(document).ready(function(){initNavTree('_lo_ra_w_a_n_8h_source.html',''); init
192 #define RADIOLIB_LORAWAN_DWELL_TIME (400)
-
-
-
-
-
-
-
-
- 202 { 0x00, 0, 0,
false },
- 203 { RADIOLIB_LORAWAN_MAC_RESET, 1, 1,
false },
- 204 { RADIOLIB_LORAWAN_MAC_LINK_CHECK, 2, 0,
true },
- 205 { RADIOLIB_LORAWAN_MAC_LINK_ADR, 4, 1,
false },
- 206 { RADIOLIB_LORAWAN_MAC_DUTY_CYCLE, 1, 0,
false },
- 207 { RADIOLIB_LORAWAN_MAC_RX_PARAM_SETUP, 4, 1,
false },
- 208 { RADIOLIB_LORAWAN_MAC_DEV_STATUS, 0, 2,
false },
- 209 { RADIOLIB_LORAWAN_MAC_NEW_CHANNEL, 5, 1,
false },
- 210 { RADIOLIB_LORAWAN_MAC_RX_TIMING_SETUP, 1, 0,
false },
- 211 { RADIOLIB_LORAWAN_MAC_TX_PARAM_SETUP, 1, 0,
false },
- 212 { RADIOLIB_LORAWAN_MAC_DL_CHANNEL, 4, 1,
false },
- 213 { RADIOLIB_LORAWAN_MAC_REKEY, 1, 1,
false },
- 214 { RADIOLIB_LORAWAN_MAC_ADR_PARAM_SETUP, 1, 0,
false },
- 215 { RADIOLIB_LORAWAN_MAC_DEVICE_TIME, 5, 0,
true },
- 216 { RADIOLIB_LORAWAN_MAC_FORCE_REJOIN, 2, 0,
false },
- 217 { RADIOLIB_LORAWAN_MAC_REJOIN_PARAM_SETUP, 1, 1,
false },
- 218 { RADIOLIB_LORAWAN_MAC_PROPRIETARY, 5, 0,
true }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 244 #define RADIOLIB_LORAWAN_CHANNEL_NONE { .enabled = false, .idx = RADIOLIB_LORAWAN_CHANNEL_INDEX_NONE, .freq = 0, .drMin = 0, .drMax = 0 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 272 #define RADIOLIB_LORAWAN_CHANNEL_SPAN_NONE { .numChannels = 0, .freqStart = 0, .freqStep = 0, .drMin = 0, .drMax = 0, .joinRequestDataRate = RADIOLIB_LORAWAN_DATA_RATE_UNUSED }
-
-
-
-
-
-
-
-
-
-
-
-
-
- 296 uint32_t dwellTimeDn;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 320 uint8_t
dataRates[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES];
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 397 uint8_t rx1DrOffset = 0;
-
-
-
-
-
-
- 410 #if !defined(RADIOLIB_EEPROM_UNSUPPORTED)
-
-
-
-
-
- 437 int16_t
beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t* nwkKey, uint8_t* appKey, uint8_t joinDr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED,
bool force =
false);
-
- 450 int16_t
beginABP(uint32_t addr, uint8_t* nwkSKey, uint8_t* appSKey, uint8_t* fNwkSIntKey = NULL, uint8_t* sNwkSIntKey = NULL,
bool force =
false);
-
-
-
-
-
-
-
- 471 #if defined(RADIOLIB_BUILD_ARDUINO)
- 481 int16_t
uplink(String& str, uint8_t port,
bool isConfirmed =
false,
LoRaWANEvent_t* event = NULL);
-
-
- 493 int16_t
uplink(
const char* str, uint8_t port,
bool isConfirmed =
false,
LoRaWANEvent_t* event = NULL);
-
- 505 int16_t
uplink(uint8_t* data,
size_t len, uint8_t port,
bool isConfirmed =
false,
LoRaWANEvent_t* event = NULL);
-
- 507 #if defined(RADIOLIB_BUILD_ARDUINO)
-
-
-
-
-
- 528 #if defined(RADIOLIB_BUILD_ARDUINO)
-
-
-
-
-
- 573 int16_t
sendReceive(uint8_t* dataUp,
size_t lenUp, uint8_t port, uint8_t* dataDown,
size_t* lenDown,
bool isConfirmed =
false,
LoRaWANEvent_t* eventUp = NULL,
LoRaWANEvent_t* eventDown = NULL);
-
-
-
-
-
-
-
-
-
-
-
- 603 int16_t
setDatarate(uint8_t drUp,
bool saveToEeprom =
false);
-
- 609 void setADR(
bool enable =
true);
-
- 617 void setDutyCycle(
bool enable =
true, uint32_t msPerHour = 0);
-
-
-
-
-
- 637 void setDwellTime(
bool enable, uint32_t msPerUplink = 0);
-
-
-
- 652 int16_t
setTxPower(int8_t txPower,
bool saveToEeprom =
false);
-
- 660 void setCSMA(uint8_t backoffMax, uint8_t difsSlots,
bool enableCSMA =
false);
-
-
-
- 681 int16_t
getMacDeviceTimeAns(uint32_t* gpsEpoch, uint8_t* fraction,
bool returnUnix =
true);
-
- 683 #if !RADIOLIB_GODMODE
-
-
-
-
-
- 689 void beginCommon(uint8_t joinDr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED);
-
-
-
-
- 694 .commands = { { .cid = 0, .payload = { 0 }, .len = 0, .repeat = 0, } },
-
-
+
+ 195 #define RADIOLIB_LORAWAN_MAX_MAC_COMMAND_LEN_DOWN (5)
+ 196 #define RADIOLIB_LORAWAN_MAX_MAC_COMMAND_LEN_UP (2)
+ 197 #define RADIOLIB_LORAWAN_MAX_NUM_ADR_COMMANDS (8)
+
+
+
+
+
+
+
+
+
+ 207 { 0x00, 0, 0,
false },
+ 208 { RADIOLIB_LORAWAN_MAC_RESET, 1, 1,
false },
+ 209 { RADIOLIB_LORAWAN_MAC_LINK_CHECK, 2, 0,
true },
+ 210 { RADIOLIB_LORAWAN_MAC_LINK_ADR, 4, 1,
false },
+ 211 { RADIOLIB_LORAWAN_MAC_DUTY_CYCLE, 1, 0,
false },
+ 212 { RADIOLIB_LORAWAN_MAC_RX_PARAM_SETUP, 4, 1,
false },
+ 213 { RADIOLIB_LORAWAN_MAC_DEV_STATUS, 0, 2,
false },
+ 214 { RADIOLIB_LORAWAN_MAC_NEW_CHANNEL, 5, 1,
false },
+ 215 { RADIOLIB_LORAWAN_MAC_RX_TIMING_SETUP, 1, 0,
false },
+ 216 { RADIOLIB_LORAWAN_MAC_TX_PARAM_SETUP, 1, 0,
false },
+ 217 { RADIOLIB_LORAWAN_MAC_DL_CHANNEL, 4, 1,
false },
+ 218 { RADIOLIB_LORAWAN_MAC_REKEY, 1, 1,
false },
+ 219 { RADIOLIB_LORAWAN_MAC_ADR_PARAM_SETUP, 1, 0,
false },
+ 220 { RADIOLIB_LORAWAN_MAC_DEVICE_TIME, 5, 0,
true },
+ 221 { RADIOLIB_LORAWAN_MAC_FORCE_REJOIN, 2, 0,
false },
+ 222 { RADIOLIB_LORAWAN_MAC_REJOIN_PARAM_SETUP, 1, 1,
false },
+ 223 { RADIOLIB_LORAWAN_MAC_PROPRIETARY, 5, 0,
true }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 249 #define RADIOLIB_LORAWAN_CHANNEL_NONE { .enabled = false, .idx = RADIOLIB_LORAWAN_CHANNEL_INDEX_NONE, .freq = 0, .drMin = 0, .drMax = 0 }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 277 #define RADIOLIB_LORAWAN_CHANNEL_SPAN_NONE { .numChannels = 0, .freqStart = 0, .freqStep = 0, .drMin = 0, .drMax = 0, .joinRequestDataRate = RADIOLIB_LORAWAN_DATA_RATE_UNUSED }
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 301 uint32_t dwellTimeDn;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 325 uint8_t
dataRates[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES];
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 402 uint8_t rx1DrOffset = 0;
+
+
+
+
+
+
+ 415 #if !defined(RADIOLIB_EEPROM_UNSUPPORTED)
+
+
+
+
+
+ 442 int16_t
beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t* nwkKey, uint8_t* appKey, uint8_t joinDr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED,
bool force =
false);
+
+ 455 int16_t
beginABP(uint32_t addr, uint8_t* nwkSKey, uint8_t* appSKey, uint8_t* fNwkSIntKey = NULL, uint8_t* sNwkSIntKey = NULL,
bool force =
false);
+
+
+
+
+
+
+
+ 476 #if defined(RADIOLIB_BUILD_ARDUINO)
+ 486 int16_t
uplink(String& str, uint8_t port,
bool isConfirmed =
false,
LoRaWANEvent_t* event = NULL);
+
+
+ 498 int16_t
uplink(
const char* str, uint8_t port,
bool isConfirmed =
false,
LoRaWANEvent_t* event = NULL);
+
+ 510 int16_t
uplink(uint8_t* data,
size_t len, uint8_t port,
bool isConfirmed =
false,
LoRaWANEvent_t* event = NULL);
+
+ 512 #if defined(RADIOLIB_BUILD_ARDUINO)
+
+
+
+
+
+ 533 #if defined(RADIOLIB_BUILD_ARDUINO)
+
+
+
+
+
+ 578 int16_t
sendReceive(uint8_t* dataUp,
size_t lenUp, uint8_t port, uint8_t* dataDown,
size_t* lenDown,
bool isConfirmed =
false,
LoRaWANEvent_t* eventUp = NULL,
LoRaWANEvent_t* eventDown = NULL);
+
+
+
+
+
+
+
+
+
+
+
+ 608 int16_t
setDatarate(uint8_t drUp,
bool saveToEeprom =
false);
+
+ 614 void setADR(
bool enable =
true);
+
+ 622 void setDutyCycle(
bool enable =
true, uint32_t msPerHour = 0);
+
+
+
+
+
+ 642 void setDwellTime(
bool enable, uint32_t msPerUplink = 0);
+
+
+
+ 657 int16_t
setTxPower(int8_t txPower,
bool saveToEeprom =
false);
+
+ 665 void setCSMA(uint8_t backoffMax, uint8_t difsSlots,
bool enableCSMA =
false);
+
+
+
+ 686 int16_t
getMacDeviceTimeAns(uint32_t* gpsEpoch, uint8_t* fraction,
bool returnUnix =
true);
+
+ 688 #if !RADIOLIB_GODMODE
+
+
+
+
+
+ 694 void beginCommon(uint8_t joinDr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED);
+
+
699 .commands = { { .cid = 0, .payload = { 0 }, .len = 0, .repeat = 0, } },
-
-
-
- 704 uint32_t devAddr = 0;
- 705 uint8_t appSKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
- 706 uint8_t fNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
- 707 uint8_t sNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
- 708 uint8_t nwkSEncKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
- 709 uint8_t jSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
-
- 712 uint16_t devNonce = 0;
- 713 uint32_t joinNonce = 0;
-
-
- 716 uint32_t homeNetId = 0;
- 717 uint8_t adrLimitExp = RADIOLIB_LORAWAN_ADR_ACK_LIMIT_EXP;
- 718 uint8_t adrDelayExp = RADIOLIB_LORAWAN_ADR_ACK_DELAY_EXP;
-
- 720 uint8_t txPowerCur = 0;
- 721 uint8_t txPowerMax = 0;
-
- 723 uint32_t aFcntDown = 0;
- 724 uint32_t nFcntDown = 0;
- 725 uint32_t confFcntUp = RADIOLIB_LORAWAN_FCNT_NONE;
- 726 uint32_t confFcntDown = RADIOLIB_LORAWAN_FCNT_NONE;
- 727 uint32_t adrFcnt = 0;
-
-
-
-
-
- 733 uint16_t activeMode = 0;
-
-
- 736 bool adrEnabled =
true;
-
-
- 739 bool dutyCycleEnabled =
false;
- 740 uint32_t dutyCycle = 0;
-
-
- 743 bool dwellTimeEnabledUp =
false;
- 744 uint16_t dwellTimeUp = 0;
- 745 bool dwellTimeEnabledDn =
false;
- 746 uint16_t dwellTimeDn = 0;
-
-
-
-
-
-
-
-
-
-
-
-
-
- 760 LoRaWANChannel_t availableChannels[2][RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS];
-
-
- 763 LoRaWANChannel_t currentChannels[2] = { RADIOLIB_LORAWAN_CHANNEL_NONE, RADIOLIB_LORAWAN_CHANNEL_NONE };
-
-
- 766 uint8_t dataRates[2] = { RADIOLIB_LORAWAN_DATA_RATE_UNUSED, RADIOLIB_LORAWAN_DATA_RATE_UNUSED };
-
-
-
-
-
- 772 uint32_t lastToA = 0;
-
-
- 775 uint32_t rxDelayStart = 0;
-
-
- 778 uint32_t rxDelayEnd = 0;
-
-
- 781 uint32_t rxDelays[2] = { RADIOLIB_LORAWAN_RECEIVE_DELAY_1_MS, RADIOLIB_LORAWAN_RECEIVE_DELAY_2_MS };
-
-
- 784 uint8_t battLevel = 0xFF;
-
-
- 787 bool isMACPayload =
false;
-
-
-
-
- 792 #if !defined(RADIOLIB_EEPROM_UNSUPPORTED)
- 798 int16_t saveFcntUp();
-
- 805 int16_t restoreFcntUp();
-
-
-
- 809 int16_t downlinkCommon();
-
-
- 812 uint32_t generateMIC(uint8_t* msg,
size_t len, uint8_t* key);
-
-
-
- 816 bool verifyMIC(uint8_t* msg,
size_t len, uint8_t* key);
-
-
-
- 820 int16_t setPhyProperties();
-
-
-
-
- 825 int16_t setupChannelsDyn(
bool joinRequest =
false);
+
+
+
+ 704 .commands = { { .cid = 0, .payload = { 0 }, .len = 0, .repeat = 0, } },
+
+
+
+
+ 709 uint32_t devAddr = 0;
+ 710 uint8_t appSKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+ 711 uint8_t fNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+ 712 uint8_t sNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+ 713 uint8_t nwkSEncKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+ 714 uint8_t jSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+
+
+ 717 uint16_t devNonce = 0;
+ 718 uint32_t joinNonce = 0;
+
+
+ 721 uint32_t homeNetId = 0;
+ 722 uint8_t adrLimitExp = RADIOLIB_LORAWAN_ADR_ACK_LIMIT_EXP;
+ 723 uint8_t adrDelayExp = RADIOLIB_LORAWAN_ADR_ACK_DELAY_EXP;
+
+ 725 uint8_t txPowerCur = 0;
+ 726 uint8_t txPowerMax = 0;
+
+ 728 uint32_t aFcntDown = 0;
+ 729 uint32_t nFcntDown = 0;
+ 730 uint32_t confFcntUp = RADIOLIB_LORAWAN_FCNT_NONE;
+ 731 uint32_t confFcntDown = RADIOLIB_LORAWAN_FCNT_NONE;
+ 732 uint32_t adrFcnt = 0;
+
+
+
+
+
+ 738 uint16_t activeMode = 0;
+
+
+ 741 bool adrEnabled =
true;
+
+
+ 744 bool dutyCycleEnabled =
false;
+ 745 uint32_t dutyCycle = 0;
+
+
+ 748 bool dwellTimeEnabledUp =
false;
+ 749 uint16_t dwellTimeUp = 0;
+ 750 bool dwellTimeEnabledDn =
false;
+ 751 uint16_t dwellTimeDn = 0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 765 LoRaWANChannel_t availableChannels[2][RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS];
+
+
+ 768 LoRaWANChannel_t currentChannels[2] = { RADIOLIB_LORAWAN_CHANNEL_NONE, RADIOLIB_LORAWAN_CHANNEL_NONE };
+
+
+ 771 uint8_t dataRates[2] = { RADIOLIB_LORAWAN_DATA_RATE_UNUSED, RADIOLIB_LORAWAN_DATA_RATE_UNUSED };
+
+
+
+
+
+ 777 uint32_t lastToA = 0;
+
+
+ 780 uint32_t rxDelayStart = 0;
+
+
+ 783 uint32_t rxDelayEnd = 0;
+
+
+ 786 uint32_t rxDelays[2] = { RADIOLIB_LORAWAN_RECEIVE_DELAY_1_MS, RADIOLIB_LORAWAN_RECEIVE_DELAY_2_MS };
+
+
+ 789 uint8_t battLevel = 0xFF;
+
+
+ 792 bool isMACPayload =
false;
+
+
+
+
+ 797 #if !defined(RADIOLIB_EEPROM_UNSUPPORTED)
+ 803 int16_t saveFcntUp();
+
+ 810 int16_t restoreFcntUp();
+
+
+
+ 814 int16_t downlinkCommon();
+
+
+ 817 uint32_t generateMIC(uint8_t* msg,
size_t len, uint8_t* key);
+
+
+
+ 821 bool verifyMIC(uint8_t* msg,
size_t len, uint8_t* key);
+
+
+
+ 825 int16_t setPhyProperties();
-
- 829 int16_t setupChannelsFix(uint8_t subBand);
-
-
- 832 int16_t processCFList(uint8_t* cfList);
-
-
- 835 int16_t selectChannels();
-
-
- 838 int16_t findDataRate(uint8_t dr,
DataRate_t* dataRate);
-
-
- 841 int16_t configureChannel(uint8_t dir);
-
-
- 844 int16_t restoreChannels();
-
-
-
-
-
-
-
-
-
-
-
-
- 857 bool applyChannelMaskDyn(uint8_t chMaskCntl, uint16_t chMask);
-
-
- 860 bool applyChannelMaskFix(uint8_t chMaskCntl, uint16_t chMask,
bool clear);
-
-
- 863 uint8_t getMacPayloadLength(uint8_t cid);
-
-
-
-
-
-
-
-
- 872 void processAES(uint8_t* in,
size_t len, uint8_t* key, uint8_t* out, uint32_t fcnt, uint8_t dir, uint8_t ctrId,
bool counter);
-
-
- 875 static uint16_t checkSum16(uint8_t *key, uint8_t keyLen);
-
-
-
- 879 static T ntoh(uint8_t* buff,
size_t size = 0);
-
-
-
- 883 static void hton(uint8_t* buff, T val,
size_t size = 0);
-
+
+
+ 830 int16_t setupChannelsDyn(
bool joinRequest =
false);
+
+
+
+ 834 int16_t setupChannelsFix(uint8_t subBand);
+
+
+ 837 int16_t processCFList(uint8_t* cfList);
+
+
+ 840 int16_t selectChannels();
+
+
+ 843 int16_t findDataRate(uint8_t dr,
DataRate_t* dataRate);
+
+
+ 846 int16_t configureChannel(uint8_t dir);
+
+
+ 849 int16_t restoreChannels();
+
+
+
+
+
+
+
+
+
+
+
+
+ 862 bool applyChannelMaskDyn(uint8_t chMaskCntl, uint16_t chMask);
+
+
+ 865 bool applyChannelMaskFix(uint8_t chMaskCntl, uint16_t chMask,
bool clear);
+
+
+ 868 uint8_t getMacPayloadLength(uint8_t cid);
+
+
+
+
+
+
+
+
+ 877 void processAES(uint8_t* in,
size_t len, uint8_t* key, uint8_t* out, uint32_t fcnt, uint8_t dir, uint8_t ctrId,
bool counter);
+
+
+ 880 static uint16_t checkSum16(uint8_t *key, uint8_t keyLen);
+
+
+
+ 884 static T ntoh(uint8_t* buff,
size_t size = 0);
-
-LoRaWAN-compatible node (class A device).
Definition: LoRaWAN.h:393
-int16_t uplink(const char *str, uint8_t port, bool isConfirmed=false, LoRaWANEvent_t *event=NULL)
Send a message to the server.
Definition: LoRaWAN.cpp:852
-int16_t sendReceive(const char *strUp, uint8_t port, uint8_t *dataDown, size_t *lenDown, bool isConfirmed=false, LoRaWANEvent_t *eventUp=NULL, LoRaWANEvent_t *eventDown=NULL)
Send a message to the server and wait for a downlink during Rx1 and/or Rx2 window.
Definition: LoRaWAN.cpp:1568
-int16_t setTxPower(int8_t txPower, bool saveToEeprom=false)
Configure TX power of the radio module.
Definition: LoRaWAN.cpp:1945
-uint8_t maxPayloadDwellTime()
Returns the maximum payload given the currently present dwelltime limits. WARNING: the addition of MA...
Definition: LoRaWAN.cpp:1925
-void setDwellTime(bool enable, uint32_t msPerUplink=0)
Toggle adherence to dwellTime limits to on or off.
Definition: LoRaWAN.cpp:1916
-uint32_t getFcntUp()
Returns the last uplink's frame counter.
Definition: LoRaWAN.cpp:1592
-void setDeviceStatus(uint8_t battLevel)
Set device status.
Definition: LoRaWAN.cpp:1588
-uint32_t dutyCycleInterval(uint32_t msPerHour, uint32_t airtime)
Calculate the minimum interval to adhere to a certain dutyCycle. This interval is based on the ToA of...
Definition: LoRaWAN.cpp:1897
-void resetFcntDown()
Reset the downlink frame counters (application and network) This is unsafe and can possibly allow rep...
Definition: LoRaWAN.cpp:1604
-bool sendMacCommandReq(uint8_t cid)
Add a MAC command to the uplink queue. Only LinkCheck and DeviceTime are available to the user....
Definition: LoRaWAN.cpp:2032
-int16_t saveSession()
Save the current state of the session. All variables are compared to what is saved and only the diffe...
Definition: LoRaWAN.cpp:744
-int16_t setDatarate(uint8_t drUp, bool saveToEeprom=false)
Set uplink datarate. This should not be used when ADR is enabled.
Definition: LoRaWAN.cpp:1848
-uint32_t getNFcntDown()
Returns the last network downlink's frame counter.
Definition: LoRaWAN.cpp:1596
-uint32_t getAFcntDown()
Returns the last application downlink's frame counter.
Definition: LoRaWAN.cpp:1600
+
+
+ 888 static void hton(uint8_t* buff, T val,
size_t size = 0);
+
+
+
+LoRaWAN-compatible node (class A device).
Definition: LoRaWAN.h:398
+int16_t uplink(const char *str, uint8_t port, bool isConfirmed=false, LoRaWANEvent_t *event=NULL)
Send a message to the server.
Definition: LoRaWAN.cpp:863
+int16_t sendReceive(const char *strUp, uint8_t port, uint8_t *dataDown, size_t *lenDown, bool isConfirmed=false, LoRaWANEvent_t *eventUp=NULL, LoRaWANEvent_t *eventDown=NULL)
Send a message to the server and wait for a downlink during Rx1 and/or Rx2 window.
Definition: LoRaWAN.cpp:1579
+int16_t setTxPower(int8_t txPower, bool saveToEeprom=false)
Configure TX power of the radio module.
Definition: LoRaWAN.cpp:1970
+uint8_t maxPayloadDwellTime()
Returns the maximum payload given the currently present dwelltime limits. WARNING: the addition of MA...
Definition: LoRaWAN.cpp:1950
+void setDwellTime(bool enable, uint32_t msPerUplink=0)
Toggle adherence to dwellTime limits to on or off.
Definition: LoRaWAN.cpp:1941
+uint32_t getFcntUp()
Returns the last uplink's frame counter.
Definition: LoRaWAN.cpp:1603
+void setDeviceStatus(uint8_t battLevel)
Set device status.
Definition: LoRaWAN.cpp:1599
+uint32_t dutyCycleInterval(uint32_t msPerHour, uint32_t airtime)
Calculate the minimum interval to adhere to a certain dutyCycle. This interval is based on the ToA of...
Definition: LoRaWAN.cpp:1922
+void resetFcntDown()
Reset the downlink frame counters (application and network) This is unsafe and can possibly allow rep...
Definition: LoRaWAN.cpp:1615
+bool sendMacCommandReq(uint8_t cid)
Add a MAC command to the uplink queue. Only LinkCheck and DeviceTime are available to the user....
Definition: LoRaWAN.cpp:2060
+int16_t saveSession()
Save the current state of the session. All variables are compared to what is saved and only the diffe...
Definition: LoRaWAN.cpp:755
+int16_t setDatarate(uint8_t drUp, bool saveToEeprom=false)
Set uplink datarate. This should not be used when ADR is enabled.
Definition: LoRaWAN.cpp:1870
+uint32_t getNFcntDown()
Returns the last network downlink's frame counter.
Definition: LoRaWAN.cpp:1607
+uint32_t getAFcntDown()
Returns the last application downlink's frame counter.
Definition: LoRaWAN.cpp:1611
void wipe()
Wipe internal persistent parameters. This will reset all counters and saved variables,...
Definition: LoRaWAN.cpp:49
-int16_t beginABP(uint32_t addr, uint8_t *nwkSKey, uint8_t *appSKey, uint8_t *fNwkSIntKey=NULL, uint8_t *sNwkSIntKey=NULL, bool force=false)
Join network by performing activation by personalization. In this procedure, all necessary configurat...
Definition: LoRaWAN.cpp:652
-int16_t getMacDeviceTimeAns(uint32_t *gpsEpoch, uint8_t *fraction, bool returnUnix=true)
Returns the network time after requesting a DeviceTime MAC command. Returns 'true' if a network respo...
Definition: LoRaWAN.cpp:2749
-int16_t downlink(uint8_t *data, size_t *len, LoRaWANEvent_t *event=NULL)
Wait for downlink from the server in either RX1 or RX2 window.
Definition: LoRaWAN.cpp:1259
+int16_t beginABP(uint32_t addr, uint8_t *nwkSKey, uint8_t *appSKey, uint8_t *fNwkSIntKey=NULL, uint8_t *sNwkSIntKey=NULL, bool force=false)
Join network by performing activation by personalization. In this procedure, all necessary configurat...
Definition: LoRaWAN.cpp:663
+int16_t getMacDeviceTimeAns(uint32_t *gpsEpoch, uint8_t *fraction, bool returnUnix=true)
Returns the network time after requesting a DeviceTime MAC command. Returns 'true' if a network respo...
Definition: LoRaWAN.cpp:2782
+int16_t downlink(uint8_t *data, size_t *len, LoRaWANEvent_t *event=NULL)
Wait for downlink from the server in either RX1 or RX2 window.
Definition: LoRaWAN.cpp:1270
LoRaWANNode(PhysicalLayer *phy, const LoRaWANBand_t *band, uint8_t subBand=0)
Default constructor.
Definition: LoRaWAN.cpp:31
-void setDutyCycle(bool enable=true, uint32_t msPerHour=0)
Toggle adherence to dutyCycle limits to on or off.
Definition: LoRaWAN.cpp:1886
-uint32_t timeUntilUplink()
Returns time in milliseconds until next uplink is available under dutyCycle limits.
Definition: LoRaWAN.cpp:1907
-int16_t getMacLinkCheckAns(uint8_t *margin, uint8_t *gwCnt)
Returns the quality of connectivity after requesting a LinkCheck MAC command. Returns 'true' if a net...
Definition: LoRaWAN.cpp:2738
+void setDutyCycle(bool enable=true, uint32_t msPerHour=0)
Toggle adherence to dutyCycle limits to on or off.
Definition: LoRaWAN.cpp:1911
+uint32_t timeUntilUplink()
Returns time in milliseconds until next uplink is available under dutyCycle limits.
Definition: LoRaWAN.cpp:1932
+int16_t getMacLinkCheckAns(uint8_t *margin, uint8_t *gwCnt)
Returns the quality of connectivity after requesting a LinkCheck MAC command. Returns 'true' if a net...
Definition: LoRaWAN.cpp:2771
void setCSMA(uint8_t backoffMax, uint8_t difsSlots, bool enableCSMA=false)
Configures CSMA for LoRaWAN as per TR-13, LoRa Alliance.
Definition: LoRaWAN.cpp:42
-void setADR(bool enable=true)
Toggle ADR to on or off.
Definition: LoRaWAN.cpp:1882
+void setADR(bool enable=true)
Toggle ADR to on or off.
Definition: LoRaWAN.cpp:1907
int16_t restore()
Restore session by loading information from persistent storage.
Definition: LoRaWAN.cpp:54
-int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t *nwkKey, uint8_t *appKey, uint8_t joinDr=RADIOLIB_LORAWAN_DATA_RATE_UNUSED, bool force=false)
Join network by performing over-the-air activation. By this procedure, the device will perform an exc...
Definition: LoRaWAN.cpp:370
-bool isJoined()
Whether there is an ongoing session active.
Definition: LoRaWAN.cpp:739
+int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t *nwkKey, uint8_t *appKey, uint8_t joinDr=RADIOLIB_LORAWAN_DATA_RATE_UNUSED, bool force=false)
Join network by performing over-the-air activation. By this procedure, the device will perform an exc...
Definition: LoRaWAN.cpp:378
+bool isJoined()
Whether there is an ongoing session active.
Definition: LoRaWAN.cpp:750
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:34
-Structure to save information about LoRaWAN band.
Definition: LoRaWAN.h:278
-uint32_t dwellTimeUp
Maximum dwell time per message in milliseconds.
Definition: LoRaWAN.h:295
-int8_t powerMax
Maximum allowed output power in this band in dBm.
Definition: LoRaWAN.h:286
-uint8_t dataRates[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES]
The corresponding datarates, bandwidths and coding rates for DR index.
Definition: LoRaWAN.h:320
-uint8_t payloadLenMax[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES]
Array of allowed maximum payload lengths for each data rate.
Definition: LoRaWAN.h:283
-LoRaWANChannel_t txFreqs[3]
A set of default uplink (TX) channels for frequency-type bands.
Definition: LoRaWAN.h:299
-LoRaWANChannel_t txJoinReq[3]
A set of possible extra channels for the Join-Request message for frequency-type bands.
Definition: LoRaWAN.h:302
-int8_t powerNumSteps
Number of power steps in this band.
Definition: LoRaWAN.h:289
-LoRaWANChannelSpan_t txSpans[2]
Default uplink (TX) channel spans for mask-type bands, including Join-Request parameters.
Definition: LoRaWAN.h:308
-uint8_t rx1DataRateBase
The base downlink data rate. Used to calculate data rate changes for adaptive data rate.
Definition: LoRaWAN.h:314
-uint8_t bandType
Whether the channels are fixed per specification, or dynamically allocated through the network (plus ...
Definition: LoRaWAN.h:280
-LoRaWANChannel_t rx2
Backup channel for downlink (RX2) window.
Definition: LoRaWAN.h:317
-uint8_t numTxSpans
The number of TX channel spans for mask-type bands.
Definition: LoRaWAN.h:305
-LoRaWANChannelSpan_t rx1Span
Default downlink (RX1) channel span for mask-type bands.
Definition: LoRaWAN.h:311
-uint32_t dutyCycle
Number of milliseconds per hour of allowed Time-on-Air.
Definition: LoRaWAN.h:292
-Definition: LoRaWAN.h:226
-float freq
The channel frequency.
Definition: LoRaWAN.h:234
-uint8_t idx
The channel number, as specified by defaults or the network.
Definition: LoRaWAN.h:231
-uint8_t drMin
Minimum allowed datarate for this channel.
Definition: LoRaWAN.h:237
-bool enabled
Whether this channel is enabled (can be used) or is disabled.
Definition: LoRaWAN.h:228
-uint8_t drMax
Maximum allowed datarate for this channel (inclusive)
Definition: LoRaWAN.h:240
-Structure to save information about LoRaWAN channels. To save space, adjacent channels are saved in "...
Definition: LoRaWAN.h:251
-uint8_t joinRequestDataRate
Allowed data rates for a join request message.
Definition: LoRaWAN.h:268
-float freqStart
Center frequency of the first channel in span.
Definition: LoRaWAN.h:256
-uint8_t numChannels
Total number of channels in the span.
Definition: LoRaWAN.h:253
-uint8_t drMax
Maximum allowed datarate for all channels in this span (inclusive)
Definition: LoRaWAN.h:265
-float freqStep
Frequency step between adjacent channels.
Definition: LoRaWAN.h:259
-uint8_t drMin
Minimum allowed datarate for all channels in this span.
Definition: LoRaWAN.h:262
-Structure to save extra information about uplink/downlink event.
Definition: LoRaWAN.h:362
-float freq
Frequency in MHz.
Definition: LoRaWAN.h:377
-bool confirmed
Whether the event is confirmed or not (e.g., confirmed uplink sent by user application)
Definition: LoRaWAN.h:367
-int16_t power
Transmit power in dBm for uplink, or RSSI for downlink.
Definition: LoRaWAN.h:380
-bool confirming
Whether the event is confirming a previous request (e.g., server downlink reply to confirmed uplink s...
Definition: LoRaWAN.h:371
-uint8_t datarate
Datarate.
Definition: LoRaWAN.h:374
-uint8_t dir
Event direction, one of RADIOLIB_LORAWAN_CHANNEL_DIR_*.
Definition: LoRaWAN.h:364
-uint32_t fcnt
The appropriate frame counter - for different events, different frame counters will be reported!
Definition: LoRaWAN.h:383
-uint8_t port
Port number.
Definition: LoRaWAN.h:386
-Structure to save information about MAC command.
Definition: LoRaWAN.h:338
-uint8_t len
Length of the payload.
Definition: LoRaWAN.h:346
-uint8_t cid
The command ID.
Definition: LoRaWAN.h:340
-uint8_t repeat
Repetition counter (the command will be uplinked repeat + 1 times)
Definition: LoRaWAN.h:349
-uint8_t payload[5]
Payload buffer (5 bytes is the longest possible)
Definition: LoRaWAN.h:343
-Definition: LoRaWAN.h:352
-Definition: LoRaWAN.h:194
+Structure to save information about LoRaWAN band.
Definition: LoRaWAN.h:283
+uint32_t dwellTimeUp
Maximum dwell time per message in milliseconds.
Definition: LoRaWAN.h:300
+int8_t powerMax
Maximum allowed output power in this band in dBm.
Definition: LoRaWAN.h:291
+uint8_t dataRates[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES]
The corresponding datarates, bandwidths and coding rates for DR index.
Definition: LoRaWAN.h:325
+uint8_t payloadLenMax[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES]
Array of allowed maximum payload lengths for each data rate.
Definition: LoRaWAN.h:288
+LoRaWANChannel_t txFreqs[3]
A set of default uplink (TX) channels for frequency-type bands.
Definition: LoRaWAN.h:304
+LoRaWANChannel_t txJoinReq[3]
A set of possible extra channels for the Join-Request message for frequency-type bands.
Definition: LoRaWAN.h:307
+int8_t powerNumSteps
Number of power steps in this band.
Definition: LoRaWAN.h:294
+LoRaWANChannelSpan_t txSpans[2]
Default uplink (TX) channel spans for mask-type bands, including Join-Request parameters.
Definition: LoRaWAN.h:313
+uint8_t rx1DataRateBase
The base downlink data rate. Used to calculate data rate changes for adaptive data rate.
Definition: LoRaWAN.h:319
+uint8_t bandType
Whether the channels are fixed per specification, or dynamically allocated through the network (plus ...
Definition: LoRaWAN.h:285
+LoRaWANChannel_t rx2
Backup channel for downlink (RX2) window.
Definition: LoRaWAN.h:322
+uint8_t numTxSpans
The number of TX channel spans for mask-type bands.
Definition: LoRaWAN.h:310
+LoRaWANChannelSpan_t rx1Span
Default downlink (RX1) channel span for mask-type bands.
Definition: LoRaWAN.h:316
+uint32_t dutyCycle
Number of milliseconds per hour of allowed Time-on-Air.
Definition: LoRaWAN.h:297
+Definition: LoRaWAN.h:231
+float freq
The channel frequency.
Definition: LoRaWAN.h:239
+uint8_t idx
The channel number, as specified by defaults or the network.
Definition: LoRaWAN.h:236
+uint8_t drMin
Minimum allowed datarate for this channel.
Definition: LoRaWAN.h:242
+bool enabled
Whether this channel is enabled (can be used) or is disabled.
Definition: LoRaWAN.h:233
+uint8_t drMax
Maximum allowed datarate for this channel (inclusive)
Definition: LoRaWAN.h:245
+Structure to save information about LoRaWAN channels. To save space, adjacent channels are saved in "...
Definition: LoRaWAN.h:256
+uint8_t joinRequestDataRate
Allowed data rates for a join request message.
Definition: LoRaWAN.h:273
+float freqStart
Center frequency of the first channel in span.
Definition: LoRaWAN.h:261
+uint8_t numChannels
Total number of channels in the span.
Definition: LoRaWAN.h:258
+uint8_t drMax
Maximum allowed datarate for all channels in this span (inclusive)
Definition: LoRaWAN.h:270
+float freqStep
Frequency step between adjacent channels.
Definition: LoRaWAN.h:264
+uint8_t drMin
Minimum allowed datarate for all channels in this span.
Definition: LoRaWAN.h:267
+Structure to save extra information about uplink/downlink event.
Definition: LoRaWAN.h:367
+float freq
Frequency in MHz.
Definition: LoRaWAN.h:382
+bool confirmed
Whether the event is confirmed or not (e.g., confirmed uplink sent by user application)
Definition: LoRaWAN.h:372
+int16_t power
Transmit power in dBm for uplink, or RSSI for downlink.
Definition: LoRaWAN.h:385
+bool confirming
Whether the event is confirming a previous request (e.g., server downlink reply to confirmed uplink s...
Definition: LoRaWAN.h:376
+uint8_t datarate
Datarate.
Definition: LoRaWAN.h:379
+uint8_t dir
Event direction, one of RADIOLIB_LORAWAN_CHANNEL_DIR_*.
Definition: LoRaWAN.h:369
+uint32_t fcnt
The appropriate frame counter - for different events, different frame counters will be reported!
Definition: LoRaWAN.h:388
+uint8_t port
Port number.
Definition: LoRaWAN.h:391
+Structure to save information about MAC command.
Definition: LoRaWAN.h:343
+uint8_t len
Length of the payload.
Definition: LoRaWAN.h:351
+uint8_t cid
The command ID.
Definition: LoRaWAN.h:345
+uint8_t repeat
Repetition counter (the command will be uplinked repeat + 1 times)
Definition: LoRaWAN.h:354
+uint8_t payload[5]
Payload buffer (5 bytes is the longest possible)
Definition: LoRaWAN.h:348
+Definition: LoRaWAN.h:357
+Definition: LoRaWAN.h:199
Definition: PhysicalLayer.h:21
diff --git a/_physical_layer_8h_source.html b/_physical_layer_8h_source.html
index 682c0c0c..eda54331 100644
--- a/_physical_layer_8h_source.html
+++ b/_physical_layer_8h_source.html
@@ -299,7 +299,7 @@ $(document).ready(function(){initNavTree('_physical_layer_8h_source.html',''); i
Client for Bell modem communication. The public interface is the same as Arduino Serial.
Definition: BellModem.h:57
Client for FSK-4 communication. The public interface is the same as Arduino Serial.
Definition: FSK4.h:15
Client for Hellschreiber transmissions.
Definition: Hellschreiber.h:90
-LoRaWAN-compatible node (class A device).
Definition: LoRaWAN.h:393
+LoRaWAN-compatible node (class A device).
Definition: LoRaWAN.h:398
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:31
Client for Morse Code communication. The public interface is the same as Arduino Serial.
Definition: Morse.h:93