diff --git a/_lo_ra_w_a_n_8h_source.html b/_lo_ra_w_a_n_8h_source.html index 2b881f8b..d029fdcb 100644 --- a/_lo_ra_w_a_n_8h_source.html +++ b/_lo_ra_w_a_n_8h_source.html @@ -338,159 +338,177 @@ $(document).ready(function(){initNavTree('_lo_ra_w_a_n_8h_source.html',''); init
292 
297  int8_t numChannels;
298 
-
304  LoRaWANNode(PhysicalLayer* phy, const LoRaWANBand_t* band);
-
305 
-
310  void wipe();
-
311 
-
316  int16_t restoreOTAA();
-
317 
-
328  int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t* nwkKey, uint8_t* appKey, bool force = false);
-
329 
-
340  int16_t beginABP(uint32_t addr, uint8_t* nwkSKey, uint8_t* appSKey, uint8_t* fNwkSIntKey = NULL, uint8_t* sNwkSIntKey = NULL);
-
341 
-
342  #if defined(RADIOLIB_BUILD_ARDUINO)
-
349  int16_t uplink(String& str, uint8_t port);
-
350  #endif
-
351 
-
358  int16_t uplink(const char* str, uint8_t port);
-
359 
-
367  int16_t uplink(uint8_t* data, size_t len, uint8_t port);
-
368 
-
369  #if defined(RADIOLIB_BUILD_ARDUINO)
-
375  int16_t downlink(String& str);
-
376  #endif
-
377 
-
384  int16_t downlink(uint8_t* data, size_t* len);
-
385 
-
391  void setDeviceStatus(uint8_t battLevel);
-
392 
-
393 #if !defined(RADIOLIB_GODMODE)
-
394  private:
-
395 #endif
-
396  PhysicalLayer* phyLayer = NULL;
-
397  const LoRaWANBand_t* band = NULL;
-
398 
-
399  LoRaWANMacCommandQueue_t commandsUp = {
-
400  .commands = { { .cid = 0, .len = 0, .payload = { 0 }, .repeat = 0, } },
-
401  .numCommands = 0,
-
402  .len = 0,
-
403  };
-
404  LoRaWANMacCommandQueue_t commandsDown = {
-
405  .commands = { { .cid = 0, .len = 0, .payload = { 0 }, .repeat = 0, } },
-
406  .numCommands = 0,
-
407  .len = 0,
-
408  };
-
409 
-
410  // the following is either provided by the network server (OTAA)
-
411  // or directly entered by the user (ABP)
-
412  uint32_t devAddr = 0;
-
413  uint8_t appSKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
414  uint8_t fNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
415  uint8_t sNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
416  uint8_t nwkSEncKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
417  uint8_t jSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
418 
-
419  // available channel frequencies from list passed during OTA activation
-
420  float availableChannelsFreq[2][RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS] = { { 0 }, { 0 } };
-
421 
-
422  // currently configured channel frequency
-
423  float channelFreq[2] = { 0 };
-
424 
-
425  // LoRaWAN revision (1.0 vs 1.1)
-
426  uint8_t rev = 0;
-
427 
-
428  // currently configured data rate for uplink and downlink: DR0 - DR15 (band-dependent!)
-
429  uint8_t dataRate[2] = { 0 };
-
430 
-
431  // currently configured channel for uplink and downlink (band-dependent!)
-
432  uint8_t chIndex[2] = { 0 };
-
433 
-
434  // backup channel properties - may be changed by MAC command
-
435  float backupFreq = 0;
-
436  uint8_t backupDataRate = 0;
+
302  uint8_t backoffMax;
+
303 
+
305  uint8_t difsSlots;
+
306 
+
308  bool enableCSMA;
+
309 
+
315  LoRaWANNode(PhysicalLayer* phy, const LoRaWANBand_t* band);
+
316 
+
321  void wipe();
+
322 
+
329  void setCSMA(uint8_t backoffMax, uint8_t difsSlots, bool enableCSMA = false);
+
330 
+
335  int16_t restoreOTAA();
+
336 
+
347  int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t* nwkKey, uint8_t* appKey, bool force = false);
+
348 
+
359  int16_t beginABP(uint32_t addr, uint8_t* nwkSKey, uint8_t* appSKey, uint8_t* fNwkSIntKey = NULL, uint8_t* sNwkSIntKey = NULL);
+
360 
+
361  #if defined(RADIOLIB_BUILD_ARDUINO)
+
368  int16_t uplink(String& str, uint8_t port);
+
369  #endif
+
370 
+
377  int16_t uplink(const char* str, uint8_t port);
+
378 
+
386  int16_t uplink(uint8_t* data, size_t len, uint8_t port);
+
387 
+
388  #if defined(RADIOLIB_BUILD_ARDUINO)
+
394  int16_t downlink(String& str);
+
395  #endif
+
396 
+
403  int16_t downlink(uint8_t* data, size_t* len);
+
404 
+
410  void setDeviceStatus(uint8_t battLevel);
+
411 
+
412 #if !defined(RADIOLIB_GODMODE)
+
413  private:
+
414 #endif
+
415  PhysicalLayer* phyLayer = NULL;
+
416  const LoRaWANBand_t* band = NULL;
+
417 
+
418  LoRaWANMacCommandQueue_t commandsUp = {
+
419  .commands = { { .cid = 0, .len = 0, .payload = { 0 }, .repeat = 0, } },
+
420  .numCommands = 0,
+
421  .len = 0,
+
422  };
+
423  LoRaWANMacCommandQueue_t commandsDown = {
+
424  .commands = { { .cid = 0, .len = 0, .payload = { 0 }, .repeat = 0, } },
+
425  .numCommands = 0,
+
426  .len = 0,
+
427  };
+
428 
+
429  // the following is either provided by the network server (OTAA)
+
430  // or directly entered by the user (ABP)
+
431  uint32_t devAddr = 0;
+
432  uint8_t appSKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+
433  uint8_t fNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+
434  uint8_t sNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+
435  uint8_t nwkSEncKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+
436  uint8_t jSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
437 
-
438  // timestamp to measure the RX1/2 delay (from uplink end)
-
439  uint32_t rxDelayStart = 0;
+
438  // available channel frequencies from list passed during OTA activation
+
439  float availableChannelsFreq[2][RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS] = { { 0 }, { 0 } };
440 
-
441  // delays between the uplink and RX1/2 windows
-
442  uint32_t rxDelays[2] = { RADIOLIB_LORAWAN_RECEIVE_DELAY_1_MS, RADIOLIB_LORAWAN_RECEIVE_DELAY_2_MS };
+
441  // currently configured channel frequency
+
442  float channelFreq[2] = { 0 };
443 
-
444  // device status - battery level
-
445  uint8_t battLevel = 0xFF;
+
444  // LoRaWAN revision (1.0 vs 1.1)
+
445  uint8_t rev = 0;
446 
-
447  // indicates whether an uplink has MAC commands as payload
-
448  bool isMACPayload = false;
+
447  // currently configured data rate for uplink and downlink: DR0 - DR15 (band-dependent!)
+
448  uint8_t dataRate[2] = { 0 };
449 
-
450  // method to generate message integrity code
-
451  uint32_t generateMIC(uint8_t* msg, size_t len, uint8_t* key);
+
450  // currently configured channel for uplink and downlink (band-dependent!)
+
451  uint8_t chIndex[2] = { 0 };
452 
-
453  // method to verify message integrity code
-
454  // it assumes that the MIC is the last 4 bytes of the message
-
455  bool verifyMIC(uint8_t* msg, size_t len, uint8_t* key);
+
453  // backup channel properties - may be changed by MAC command
+
454  float backupFreq = 0;
+
455  uint8_t backupDataRate = 0;
456 
-
457  // configure the common physical layer properties (preamble, sync word etc.)
-
458  // channels must be configured separately by setupChannels()!
-
459  int16_t setPhyProperties();
-
460 
-
461  // setup uplink/downlink channel data rates and frequencies
-
462  // will attempt to randomly select based on currently used band plan
-
463  int16_t setupChannels();
-
464 
-
465  // find the first usable data rate in a given channel span
-
466  uint8_t findDataRate(uint8_t dr, DataRate_t* dataRate, const LoRaWANChannelSpan_t* span);
-
467 
-
468  // find a channel ID that conforms to the requested direction and ID range
-
469  int16_t findChannelId(uint8_t dir, uint8_t* ch, uint8_t* dr, int8_t min, int8_t max);
-
470 
-
471  // find a channel span that any given channel id belongs to
-
472  LoRaWANChannelSpan_t* findChannelSpan(uint8_t dir, uint8_t ch, uint8_t* spanChannelId);
-
473 
-
474  // calculate channel frequency in MHz based on channel ID and direction
-
475  int16_t findChannelFreq(uint8_t dir, uint8_t ch, float* freq);
-
476 
-
477  // configure channel based on cached data rate ID and frequency
-
478  int16_t configureChannel(uint8_t dir);
+
457  // timestamp to measure the RX1/2 delay (from uplink end)
+
458  uint32_t rxDelayStart = 0;
+
459 
+
460  // delays between the uplink and RX1/2 windows
+
461  uint32_t rxDelays[2] = { RADIOLIB_LORAWAN_RECEIVE_DELAY_1_MS, RADIOLIB_LORAWAN_RECEIVE_DELAY_2_MS };
+
462 
+
463  // device status - battery level
+
464  uint8_t battLevel = 0xFF;
+
465 
+
466  // indicates whether an uplink has MAC commands as payload
+
467  bool isMACPayload = false;
+
468 
+
469  // method to generate message integrity code
+
470  uint32_t generateMIC(uint8_t* msg, size_t len, uint8_t* key);
+
471 
+
472  // method to verify message integrity code
+
473  // it assumes that the MIC is the last 4 bytes of the message
+
474  bool verifyMIC(uint8_t* msg, size_t len, uint8_t* key);
+
475 
+
476  // configure the common physical layer properties (preamble, sync word etc.)
+
477  // channels must be configured separately by setupChannels()!
+
478  int16_t setPhyProperties();
479 
-
480  // send a MAC command to the network server
-
481  int16_t sendMacCommand(uint8_t cid, uint8_t* payload, size_t payloadLen, uint8_t* reply, size_t replyLen);
-
482 
-
483  // push MAC command to queue, done by copy
-
484  int16_t pushMacCommand(LoRaWANMacCommand_t* cmd, LoRaWANMacCommandQueue_t* queue);
-
485 
-
486  // pop MAC command from queue, done by copy unless CMD is NULL
-
487  int16_t popMacCommand(LoRaWANMacCommand_t* cmd, LoRaWANMacCommandQueue_t* queue, size_t index);
-
488 
-
489  // delete a specific MAC command from queue, indicated by the command ID
-
490  int16_t deleteMacCommand(uint8_t cid, LoRaWANMacCommandQueue_t* queue);
-
491 
-
492  // execute mac command, return the number of processed bytes for sequential processing
-
493  size_t execMacCommand(LoRaWANMacCommand_t* cmd);
-
494 
-
495  // function to encrypt and decrypt payloads
-
496  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);
-
497 
-
498  // network-to-host conversion method - takes data from network packet and converts it to the host endians
-
499  template<typename T>
-
500  static T ntoh(uint8_t* buff, size_t size = 0);
+
480  // setup uplink/downlink channel data rates and frequencies
+
481  // will attempt to randomly select based on currently used band plan
+
482  int16_t setupChannels();
+
483 
+
484  // find the first usable data rate in a given channel span
+
485  uint8_t findDataRate(uint8_t dr, DataRate_t* dataRate, const LoRaWANChannelSpan_t* span);
+
486 
+
487  // find a channel ID that conforms to the requested direction and ID range
+
488  int16_t findChannelId(uint8_t dir, uint8_t* ch, uint8_t* dr, int8_t min, int8_t max);
+
489 
+
490  // find a channel span that any given channel id belongs to
+
491  LoRaWANChannelSpan_t* findChannelSpan(uint8_t dir, uint8_t ch, uint8_t* spanChannelId);
+
492 
+
493  // calculate channel frequency in MHz based on channel ID and direction
+
494  int16_t findChannelFreq(uint8_t dir, uint8_t ch, float* freq);
+
495 
+
496  // configure channel based on cached data rate ID and frequency
+
497  int16_t configureChannel(uint8_t dir);
+
498 
+
499  // send a MAC command to the network server
+
500  int16_t sendMacCommand(uint8_t cid, uint8_t* payload, size_t payloadLen, uint8_t* reply, size_t replyLen);
501 
-
502  // host-to-network conversion method - takes data from host variable and and converts it to network packet endians
-
503  template<typename T>
-
504  static void hton(uint8_t* buff, T val, size_t size = 0);
-
505 };
-
506 
-
507 #endif
+
502  // push MAC command to queue, done by copy
+
503  int16_t pushMacCommand(LoRaWANMacCommand_t* cmd, LoRaWANMacCommandQueue_t* queue);
+
504 
+
505  // pop MAC command from queue, done by copy unless CMD is NULL
+
506  int16_t popMacCommand(LoRaWANMacCommand_t* cmd, LoRaWANMacCommandQueue_t* queue, size_t index);
+
507 
+
508  // delete a specific MAC command from queue, indicated by the command ID
+
509  int16_t deleteMacCommand(uint8_t cid, LoRaWANMacCommandQueue_t* queue);
+
510 
+
511  // execute mac command, return the number of processed bytes for sequential processing
+
512  size_t execMacCommand(LoRaWANMacCommand_t* cmd);
+
513 
+
514  // function to encrypt and decrypt payloads
+
515  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);
+
516 
+
517  // network-to-host conversion method - takes data from network packet and converts it to the host endians
+
518  template<typename T>
+
519  static T ntoh(uint8_t* buff, size_t size = 0);
+
520 
+
521  // host-to-network conversion method - takes data from host variable and and converts it to network packet endians
+
522  template<typename T>
+
523  static void hton(uint8_t* buff, T val, size_t size = 0);
+
524 
+
525  // perform a single CAD operation for the under SF/CH combination. Returns either busy or otherwise.
+
526  bool performCAD();
+
527 
+
528  // Performs CSMA as per LoRa Alliance Technical Reccomendation 13 (TR-013).
+
529  void performCSMA();
+
530 };
+
531 
+
532 #endif
LoRaWANNode
LoRaWAN-compatible node (class A device).
Definition: LoRaWAN.h:282
-
LoRaWANNode::beginOTAA
int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t *nwkKey, uint8_t *appKey, bool force=false)
Join network by performing over-the-air activation. By this procedure, the device will perform an exc...
Definition: LoRaWAN.cpp:154
+
LoRaWANNode::beginOTAA
int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t *nwkKey, uint8_t *appKey, bool force=false)
Join network by performing over-the-air activation. By this procedure, the device will perform an exc...
Definition: LoRaWAN.cpp:165
LoRaWANNode::FSK
bool FSK
Set to true to force the node to only use FSK channels. Set to false by default.
Definition: LoRaWAN.h:285
-
LoRaWANNode::setDeviceStatus
void setDeviceStatus(uint8_t battLevel)
Set device status.
Definition: LoRaWAN.cpp:1012
-
LoRaWANNode::downlink
int16_t downlink(uint8_t *data, size_t *len)
Wait for downlink from the server in either RX1 or RX2 window.
Definition: LoRaWAN.cpp:680
+
LoRaWANNode::difsSlots
uint8_t difsSlots
Num of CADs to estimate a clear CH.
Definition: LoRaWAN.h:305
+
LoRaWANNode::enableCSMA
bool enableCSMA
enable/disable CSMA for LoRaWAN.
Definition: LoRaWAN.h:308
+
LoRaWANNode::setDeviceStatus
void setDeviceStatus(uint8_t battLevel)
Set device status.
Definition: LoRaWAN.cpp:1028
+
LoRaWANNode::downlink
int16_t downlink(uint8_t *data, size_t *len)
Wait for downlink from the server in either RX1 or RX2 window.
Definition: LoRaWAN.cpp:696
LoRaWANNode::numChannels
int8_t numChannels
Number of supported channels. Some band plans only support a subset of available channels....
Definition: LoRaWAN.h:297
-
LoRaWANNode::wipe
void wipe()
Wipe internal persistent parameters. This will reset all counters and saved variables,...
Definition: LoRaWAN.cpp:42
-
LoRaWANNode::restoreOTAA
int16_t restoreOTAA()
Restore OTAA session by loading information from persistent storage.
Definition: LoRaWAN.cpp:47
-
LoRaWANNode::beginABP
int16_t beginABP(uint32_t addr, uint8_t *nwkSKey, uint8_t *appSKey, uint8_t *fNwkSIntKey=NULL, uint8_t *sNwkSIntKey=NULL)
Join network by performing activation by personalization. In this procedure, all necessary configurat...
Definition: LoRaWAN.cpp:461
+
LoRaWANNode::wipe
void wipe()
Wipe internal persistent parameters. This will reset all counters and saved variables,...
Definition: LoRaWAN.cpp:46
+
LoRaWANNode::backoffMax
uint8_t backoffMax
Num of Back Off(BO) slots to be decremented after DIFS phase. 0 to disable BO. A random BO avoids col...
Definition: LoRaWAN.h:302
+
LoRaWANNode::restoreOTAA
int16_t restoreOTAA()
Restore OTAA session by loading information from persistent storage.
Definition: LoRaWAN.cpp:58
+
LoRaWANNode::beginABP
int16_t beginABP(uint32_t addr, uint8_t *nwkSKey, uint8_t *appSKey, uint8_t *fNwkSIntKey=NULL, uint8_t *sNwkSIntKey=NULL)
Join network by performing activation by personalization. In this procedure, all necessary configurat...
Definition: LoRaWAN.cpp:472
LoRaWANNode::startChannel
int8_t startChannel
Starting channel offset. Some band plans only support a subset of available channels....
Definition: LoRaWAN.h:291
LoRaWANNode::LoRaWANNode
LoRaWANNode(PhysicalLayer *phy, const LoRaWANBand_t *band)
Default constructor.
Definition: LoRaWAN.cpp:33
-
LoRaWANNode::uplink
int16_t uplink(const char *str, uint8_t port)
Send a message to the server.
Definition: LoRaWAN.cpp:496
+
LoRaWANNode::setCSMA
void setCSMA(uint8_t backoffMax, uint8_t difsSlots, bool enableCSMA=false)
Configures CSMA for LoRaWAN as per TR-13, LoRa Alliance.
Definition: LoRaWAN.cpp:51
+
LoRaWANNode::uplink
int16_t uplink(const char *str, uint8_t port)
Send a message to the server.
Definition: LoRaWAN.cpp:507
PhysicalLayer
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:34
LoRaWANBand_t
Structure to save information about LoRaWAN band.
Definition: LoRaWAN.h:211
LoRaWANBand_t::cfListType
uint8_t cfListType
Whether the optional channels are defined as list of frequencies or bit mask.
Definition: LoRaWAN.h:228
diff --git a/_s_x126x_8h_source.html b/_s_x126x_8h_source.html index 8b8c4b22..ea25bdcb 100644 --- a/_s_x126x_8h_source.html +++ b/_s_x126x_8h_source.html @@ -805,7 +805,7 @@ $(document).ready(function(){initNavTree('_s_x126x_8h_source.html',''); initResi
SX126x::setRfSwitchPins
void setRfSwitchPins(uint32_t rxEn, uint32_t txEn)
Some modules contain external RF switch controlled by pins. This function gives RadioLib control over...
Definition: SX126x.cpp:1459
SX126x::setDio1Action
void setDio1Action(void(*func)(void))
Sets interrupt service routine to call when DIO1 activates.
Definition: SX126x.cpp:486
SX126x::clearPacketSentAction
void clearPacketSentAction()
Clears interrupt service routine to call when a packet is sent.
Definition: SX126x.cpp:506
-
SX126x::setPaConfig
int16_t setPaConfig(uint8_t paDutyCycle, uint8_t deviceSel, uint8_t hpMax=RADIOLIB_SX126X_PA_CONFIG_HP_MAX, uint8_t paLut=RADIOLIB_SX126X_PA_CONFIG_PA_LUT)
Set the PA configuration. Allows user to optimize PA for a specific output power and matching network...
Definition: SX126x.cpp:1747
+
SX126x::setPaConfig
int16_t setPaConfig(uint8_t paDutyCycle, uint8_t deviceSel, uint8_t hpMax=RADIOLIB_SX126X_PA_CONFIG_HP_MAX, uint8_t paLut=RADIOLIB_SX126X_PA_CONFIG_PA_LUT)
Set the PA configuration. Allows user to optimize PA for a specific output power and matching network...
Definition: SX126x.cpp:1764
SX126x::startReceive
int16_t startReceive()
Interrupt-driven receive method with default parameters. Implemented for compatibility with PhysicalL...
Definition: SX126x.cpp:588
SX126x::setDataShaping
int16_t setDataShaping(uint8_t sh) override
Sets time-bandwidth product of Gaussian filter applied for shaping. Allowed values are RADIOLIB_SHAPI...
Definition: SX126x.cpp:1087
SX126x::setChannelScanAction
void setChannelScanAction(void(*func)(void))
Sets interrupt service routine to call when a channel scan is finished.
Definition: SX126x.cpp:510
@@ -845,7 +845,7 @@ $(document).ready(function(){initNavTree('_s_x126x_8h_source.html',''); initResi
SX126x::variablePacketLengthMode
int16_t variablePacketLengthMode(uint8_t maxLen=RADIOLIB_SX126X_MAX_PACKET_LENGTH)
Set modem in variable packet length mode. Available in FSK mode only.
Definition: SX126x.cpp:1400
SX126x::begin
int16_t begin(uint8_t cr, uint8_t syncWord, uint16_t preambleLength, float tcxoVoltage, bool useRegulatorLDO=false)
Initialization method for LoRa modem.
Definition: SX126x.cpp:15
SX126x::setCRC
int16_t setCRC(uint8_t len, uint16_t initial=0x1D0F, uint16_t polynomial=0x1021, bool inverted=true)
Sets CRC configuration.
Definition: SX126x.cpp:1220
-
SX126x::getIrqStatus
uint16_t getIrqStatus()
Reads the current IRQ status.
Definition: SX126x.cpp:1784
+
SX126x::getIrqStatus
uint16_t getIrqStatus()
Reads the current IRQ status.
Definition: SX126x.cpp:1801
SX126x::reset
int16_t reset(bool verify=true)
Reset method. Will reset the chip to the default state using RST pin.
Definition: SX126x.cpp:194
SX126x::setSyncWord
int16_t setSyncWord(uint8_t syncWord, uint8_t controlBits=0x44)
Sets LoRa sync word.
Definition: SX126x.cpp:867
SX126x::getCurrentLimit
float getCurrentLimit()
Reads current protection limit.
Definition: SX126x.cpp:891
diff --git a/class_lo_ra_w_a_n_node-members.html b/class_lo_ra_w_a_n_node-members.html index ca789e66..5564d3fe 100644 --- a/class_lo_ra_w_a_n_node-members.html +++ b/class_lo_ra_w_a_n_node-members.html @@ -89,13 +89,17 @@ $(document).ready(function(){initNavTree('class_lo_ra_w_a_n_node.html',''); init

This is the complete list of members for LoRaWANNode, including all inherited members.

- - + + + + - - - - + + + + + + diff --git a/class_lo_ra_w_a_n_node.html b/class_lo_ra_w_a_n_node.html index b9619686..86c91a71 100644 --- a/class_lo_ra_w_a_n_node.html +++ b/class_lo_ra_w_a_n_node.html @@ -105,6 +105,9 @@ Public Member Functions void  + + + @@ -141,6 +144,18 @@ int8_t  + + + + + + + + +
beginABP(uint32_t addr, uint8_t *nwkSKey, uint8_t *appSKey, uint8_t *fNwkSIntKey=NULL, uint8_t *sNwkSIntKey=NULL)LoRaWANNode
beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t *nwkKey, uint8_t *appKey, bool force=false)LoRaWANNode
backoffMaxLoRaWANNode
beginABP(uint32_t addr, uint8_t *nwkSKey, uint8_t *appSKey, uint8_t *fNwkSIntKey=NULL, uint8_t *sNwkSIntKey=NULL)LoRaWANNode
beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t *nwkKey, uint8_t *appKey, bool force=false)LoRaWANNode
difsSlotsLoRaWANNode
downlink(uint8_t *data, size_t *len)LoRaWANNode
FSKLoRaWANNode
LoRaWANNode(PhysicalLayer *phy, const LoRaWANBand_t *band)LoRaWANNode
numChannelsLoRaWANNode
restoreOTAA()LoRaWANNode
enableCSMALoRaWANNode
FSKLoRaWANNode
LoRaWANNode(PhysicalLayer *phy, const LoRaWANBand_t *band)LoRaWANNode
numChannelsLoRaWANNode
restoreOTAA()LoRaWANNode
setCSMA(uint8_t backoffMax, uint8_t difsSlots, bool enableCSMA=false)LoRaWANNode
setDeviceStatus(uint8_t battLevel)LoRaWANNode
startChannelLoRaWANNode
uplink(const char *str, uint8_t port)LoRaWANNode
wipe ()
 Wipe internal persistent parameters. This will reset all counters and saved variables, so the device will have to rejoin the network.
 
void setCSMA (uint8_t backoffMax, uint8_t difsSlots, bool enableCSMA=false)
 Configures CSMA for LoRaWAN as per TR-13, LoRa Alliance. More...
 
int16_t restoreOTAA ()
 Restore OTAA session by loading information from persistent storage. More...
 
numChannels
 Number of supported channels. Some band plans only support a subset of available channels. Set to a positive value to set the number of channels that will be used (e.g. 8 for US915 FSB2 used by TTN). By default -1 (no channel offset).
 
+uint8_t backoffMax
 Num of Back Off(BO) slots to be decremented after DIFS phase. 0 to disable BO. A random BO avoids collisions in the case where two or more nodes start the CSMA process at the same time.
 
+uint8_t difsSlots
 Num of CADs to estimate a clear CH.
 
+bool enableCSMA
 enable/disable CSMA for LoRaWAN.
 

Detailed Description

LoRaWAN-compatible node (class A device).

@@ -357,6 +372,50 @@ int8_t 
Returns
Status Codes
+
+ + +

◆ setCSMA()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void LoRaWANNode::setCSMA (uint8_t backoffMax,
uint8_t difsSlots,
bool enableCSMA = false 
)
+
+ +

Configures CSMA for LoRaWAN as per TR-13, LoRa Alliance.

+
Parameters
+ + + + +
backoffMaxNum of BO slots to be decremented after DIFS phase. 0 to disable BO.
difsSlotsNum of CADs to estimate a clear CH.
enableCSMAenable/disable CSMA for LoRaWAN.
+
+
+
diff --git a/class_lo_ra_w_a_n_node.js b/class_lo_ra_w_a_n_node.js index de574236..d5423d87 100644 --- a/class_lo_ra_w_a_n_node.js +++ b/class_lo_ra_w_a_n_node.js @@ -5,10 +5,14 @@ var class_lo_ra_w_a_n_node = [ "beginOTAA", "class_lo_ra_w_a_n_node.html#a1c51588ea3b3ca82e2742c7cc9bc2a72", null ], [ "downlink", "class_lo_ra_w_a_n_node.html#a55156cbc6b09da6d4ba7337d1a4136fe", null ], [ "restoreOTAA", "class_lo_ra_w_a_n_node.html#acb9a128c5d2d252ff057cb0a0b1da00c", null ], + [ "setCSMA", "class_lo_ra_w_a_n_node.html#adfc9cdaa254a27c28403188c90991757", null ], [ "setDeviceStatus", "class_lo_ra_w_a_n_node.html#a5449e301634dff1838a1b024b4067034", null ], [ "uplink", "class_lo_ra_w_a_n_node.html#afa61477a27d020ccdf0c7eef1c4d00a9", null ], [ "uplink", "class_lo_ra_w_a_n_node.html#aa5e6ccffe7a9d633dce21e20760cbe31", null ], [ "wipe", "class_lo_ra_w_a_n_node.html#a9613998d071bcf401be9ad57ff8591ea", null ], + [ "backoffMax", "class_lo_ra_w_a_n_node.html#abb7030ef70d67efc399fec713b830c58", null ], + [ "difsSlots", "class_lo_ra_w_a_n_node.html#a2694697d60eaa176a98875d39de158a0", null ], + [ "enableCSMA", "class_lo_ra_w_a_n_node.html#a2dc9088d9338800572c270117e93a889", null ], [ "FSK", "class_lo_ra_w_a_n_node.html#a2335294022dff4bfed27491f7d61e645", null ], [ "numChannels", "class_lo_ra_w_a_n_node.html#a814a0ef01d5a989479631f13ce737754", null ], [ "startChannel", "class_lo_ra_w_a_n_node.html#accc2a98737dba4de0fabb904f053efe3", null ] diff --git a/functions_b.html b/functions_b.html index eae78510..f3766658 100644 --- a/functions_b.html +++ b/functions_b.html @@ -85,6 +85,9 @@ $(document).ready(function(){initNavTree('functions_b.html',''); initResizable()
Here is a list of all documented class members with links to the class documentation for each member:

- b -