diff --git a/_a_p_r_s_8h_source.html b/_a_p_r_s_8h_source.html index 5de62cca..5d184148 100644 --- a/_a_p_r_s_8h_source.html +++ b/_a_p_r_s_8h_source.html @@ -170,11 +170,11 @@ $(document).ready(function(){initNavTree('_a_p_r_s_8h_source.html',''); initResi
98
99 // basic methods
100
-
109 int16_t begin(char sym, char* callsign = NULL, uint8_t ssid = 0, bool alt = false);
+
109 int16_t begin(char sym, const char* callsign = NULL, uint8_t ssid = 0, bool alt = false);
110
-
121 int16_t sendPosition(char* destCallsign, uint8_t destSSID, char* lat, char* lon, char* msg = NULL, char* time = NULL);
+
121 int16_t sendPosition(char* destCallsign, uint8_t destSSID, const char* lat, const char* lon, const char* msg = NULL, const char* time = NULL);
122
-
136 int16_t sendMicE(float lat, float lon, uint16_t heading, uint16_t speed, uint8_t type, uint8_t* telem = NULL, size_t telemLen = 0, char* grid = NULL, char* status = NULL, int32_t alt = RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED);
+
136 int16_t sendMicE(float lat, float lon, uint16_t heading, uint16_t speed, uint8_t type, const uint8_t* telem = NULL, size_t telemLen = 0, const char* grid = NULL, const char* status = NULL, int32_t alt = RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED);
137
145 int16_t sendFrame(char* destCallsign, uint8_t destSSID, char* info);
146
@@ -209,9 +209,9 @@ $(document).ready(function(){initNavTree('_a_p_r_s_8h_source.html',''); initResi
APRSClient
Client for APRS communication.
Definition APRS.h:85
APRSClient::sendFrame
int16_t sendFrame(char *destCallsign, uint8_t destSSID, char *info)
Transmit generic APRS frame.
Definition APRS.cpp:252
APRSClient::useRepeaters
void useRepeaters(char **repeaterCallsigns, uint8_t *repeaterSSIDs, uint8_t numRepeaters)
Set the repeater callsigns and SSIDs to be used by the frames sent by sendPosition,...
Definition APRS.cpp:285
-
APRSClient::begin
int16_t begin(char sym, char *callsign=NULL, uint8_t ssid=0, bool alt=false)
Initialization method.
Definition APRS.cpp:17
-
APRSClient::sendPosition
int16_t sendPosition(char *destCallsign, uint8_t destSSID, char *lat, char *lon, char *msg=NULL, char *time=NULL)
Transmit position.
Definition APRS.cpp:42
-
APRSClient::sendMicE
int16_t sendMicE(float lat, float lon, uint16_t heading, uint16_t speed, uint8_t type, uint8_t *telem=NULL, size_t telemLen=0, char *grid=NULL, char *status=NULL, int32_t alt=RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED)
Transmit position using Mic-E encoding.
Definition APRS.cpp:87
+
APRSClient::begin
int16_t begin(char sym, const char *callsign=NULL, uint8_t ssid=0, bool alt=false)
Initialization method.
Definition APRS.cpp:17
+
APRSClient::sendMicE
int16_t sendMicE(float lat, float lon, uint16_t heading, uint16_t speed, uint8_t type, const uint8_t *telem=NULL, size_t telemLen=0, const char *grid=NULL, const char *status=NULL, int32_t alt=RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED)
Transmit position using Mic-E encoding.
Definition APRS.cpp:87
+
APRSClient::sendPosition
int16_t sendPosition(char *destCallsign, uint8_t destSSID, const char *lat, const char *lon, const char *msg=NULL, const char *time=NULL)
Transmit position.
Definition APRS.cpp:42
APRSClient::dropRepeaters
void dropRepeaters()
Stop using repeaters.
Definition APRS.cpp:291
AX25Client
Client for AX25 communication.
Definition AX25.h:233
PhysicalLayer
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition PhysicalLayer.h:151
diff --git a/_a_x25_8h_source.html b/_a_x25_8h_source.html index 8f0d02e8..adf4243d 100644 --- a/_a_x25_8h_source.html +++ b/_a_x25_8h_source.html @@ -205,7 +205,7 @@ $(document).ready(function(){initNavTree('_a_x25_8h_source.html',''); initResiza
164
175 AX25Frame(const char* destCallsign, uint8_t destSSID, const char* srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, const char* info);
176
-
188 AX25Frame(const char* destCallsign, uint8_t destSSID, const char* srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, uint8_t* info, uint16_t infoLen);
+
188 AX25Frame(const char* destCallsign, uint8_t destSSID, const char* srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, const uint8_t* info, uint16_t infoLen);
189
194 AX25Frame(const AX25Frame& frame);
195
@@ -213,7 +213,7 @@ $(document).ready(function(){initNavTree('_a_x25_8h_source.html',''); initResiza
200
205 AX25Frame& operator=(const AX25Frame& frame);
206
-
214 int16_t setRepeaters(char** repeaterCallsigns, uint8_t* repeaterSSIDs, uint8_t numRepeaters);
+
214 int16_t setRepeaters(char** repeaterCallsigns, const uint8_t* repeaterSSIDs, uint8_t numRepeaters);
215
220 void setRecvSequence(uint8_t seqNumber);
221
@@ -290,11 +290,11 @@ $(document).ready(function(){initNavTree('_a_x25_8h_source.html',''); initResiza
AX25Frame::control
uint8_t control
The control field.
Definition AX25.h:101
AX25Frame::repeaterSSIDs
uint8_t * repeaterSSIDs
Array of repeater SSIDs.
Definition AX25.h:137
AX25Frame::infoLen
uint16_t infoLen
Number of bytes in the information field.
Definition AX25.h:111
-
AX25Frame::setRepeaters
int16_t setRepeaters(char **repeaterCallsigns, uint8_t *repeaterSSIDs, uint8_t numRepeaters)
Method to set the repeater callsigns and SSIDs.
Definition AX25.cpp:145
AX25Frame::destCallsign
char destCallsign[RADIOLIB_AX25_MAX_CALLSIGN_LEN+1]
Callsign of the destination station.
Definition AX25.h:76
AX25Frame::info
uint8_t * info
The info field.
Definition AX25.h:127
AX25Frame::protocolID
uint8_t protocolID
The protocol identifier (PID) field.
Definition AX25.h:106
AX25Frame::~AX25Frame
~AX25Frame()
Default destructor.
Definition AX25.cpp:92
+
AX25Frame::setRepeaters
int16_t setRepeaters(char **repeaterCallsigns, const uint8_t *repeaterSSIDs, uint8_t numRepeaters)
Method to set the repeater callsigns and SSIDs.
Definition AX25.cpp:145
AX25Frame::numRepeaters
uint8_t numRepeaters
Number of repeaters to be used.
Definition AX25.h:96
AX25Frame::rcvSeqNumber
uint8_t rcvSeqNumber
Receive sequence number.
Definition AX25.h:116
AX25Frame::destSSID
uint8_t destSSID
SSID of the destination station.
Definition AX25.h:81
diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html index 200e3475..1a9a0763 100644 --- a/_build_opt_8h_source.html +++ b/_build_opt_8h_source.html @@ -533,8 +533,8 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html',''); initRe
433
434 #define RADIOLIB_NC (0xFFFFFFFF)
435 #define RADIOLIB_NONVOLATILE
-
436 #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) (*((uint8_t *)(void *)(addr)))
-
437 #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) (*((uint32_t *)(void *)(addr)))
+
436 #define RADIOLIB_NONVOLATILE_READ_BYTE(addr) (*(reinterpret_cast<uint8_t *>(reinterpret_cast<void *>(addr))))
+
437 #define RADIOLIB_NONVOLATILE_READ_DWORD(addr) (*(reinterpret_cast<uint32_t *>(reinterpret_cast<void *>(addr))))
438 #define RADIOLIB_TYPE_ALIAS(type, alias) using alias = type;
439
440 #define DEC 10
diff --git a/_cryptography_8h_source.html b/_cryptography_8h_source.html index 06fa2efa..468225ab 100644 --- a/_cryptography_8h_source.html +++ b/_cryptography_8h_source.html @@ -195,11 +195,11 @@ $(document).ready(function(){initNavTree('_cryptography_8h_source.html',''); ini
103
108 void init(uint8_t* key);
109
-
118 size_t encryptECB(uint8_t* in, size_t len, uint8_t* out);
+
118 size_t encryptECB(const uint8_t* in, size_t len, uint8_t* out);
119
-
128 size_t decryptECB(uint8_t* in, size_t len, uint8_t* out);
+
128 size_t decryptECB(const uint8_t* in, size_t len, uint8_t* out);
129
-
136 void generateCMAC(uint8_t* in, size_t len, uint8_t* cmac);
+
136 void generateCMAC(const uint8_t* in, size_t len, uint8_t* cmac);
137
145 bool verifyCMAC(uint8_t* in, size_t len, const uint8_t* cmac);
146
@@ -234,11 +234,11 @@ $(document).ready(function(){initNavTree('_cryptography_8h_source.html',''); ini
174#endif
RadioLibAES128
Class to perform AES encryption, decryption and CMAC.
Definition Cryptography.h:97
RadioLibAES128::RadioLibAES128
RadioLibAES128()
Default constructor.
Definition Cryptography.cpp:5
+
RadioLibAES128::generateCMAC
void generateCMAC(const uint8_t *in, size_t len, uint8_t *cmac)
Calculate message authentication code according to RFC4493.
Definition Cryptography.cpp:46
RadioLibAES128::verifyCMAC
bool verifyCMAC(uint8_t *in, size_t len, const uint8_t *cmac)
Verify the received CMAC. This just calculates the CMAC again and compares the results.
Definition Cryptography.cpp:85
-
RadioLibAES128::generateCMAC
void generateCMAC(uint8_t *in, size_t len, uint8_t *cmac)
Calculate message authentication code according to RFC4493.
Definition Cryptography.cpp:46
RadioLibAES128::init
void init(uint8_t *key)
Initialize the AES.
Definition Cryptography.cpp:9
-
RadioLibAES128::encryptECB
size_t encryptECB(uint8_t *in, size_t len, uint8_t *out)
Perform ECB-type AES encryption.
Definition Cryptography.cpp:14
-
RadioLibAES128::decryptECB
size_t decryptECB(uint8_t *in, size_t len, uint8_t *out)
Perform ECB-type AES decryption.
Definition Cryptography.cpp:30
+
RadioLibAES128::encryptECB
size_t encryptECB(const uint8_t *in, size_t len, uint8_t *out)
Perform ECB-type AES encryption.
Definition Cryptography.cpp:14
+
RadioLibAES128::decryptECB
size_t decryptECB(const uint8_t *in, size_t len, uint8_t *out)
Perform ECB-type AES decryption.
Definition Cryptography.cpp:30
diff --git a/_f_s_k4_8h_source.html b/_f_s_k4_8h_source.html index f5e84c2d..1025b05b 100644 --- a/_f_s_k4_8h_source.html +++ b/_f_s_k4_8h_source.html @@ -125,9 +125,9 @@ $(document).ready(function(){initNavTree('_f_s_k4_8h_source.html',''); initResiz
47
54 int16_t setCorrection(int16_t offsets[4], float length = 1.0f);
55
-
62 size_t write(uint8_t* buff, size_t len);
+
62 size_t write(const uint8_t* buff, size_t len);
63
-
69 size_t write(uint8_t b);
+
69 size_t write(uint8_t b);
70
75 int16_t standby();
76
@@ -158,9 +158,9 @@ $(document).ready(function(){initNavTree('_f_s_k4_8h_source.html',''); initResiz
AFSKClient
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition AFSK.h:16
FSK4Client
Client for FSK-4 communication. The public interface is the same as Arduino Serial.
Definition FSK4.h:15
FSK4Client::begin
int16_t begin(float base, uint32_t shift, uint16_t rate)
Initialization method.
Definition FSK4.cpp:19
+
FSK4Client::write
size_t write(const uint8_t *buff, size_t len)
Transmit binary data.
Definition FSK4.cpp:57
FSK4Client::idle
void idle()
Send out idle condition (RF tone at mark frequency).
Definition FSK4.cpp:43
FSK4Client::standby
int16_t standby()
Stop transmitting.
Definition FSK4.cpp:98
-
FSK4Client::write
size_t write(uint8_t *buff, size_t len)
Transmit binary data.
Definition FSK4.cpp:57
FSK4Client::setCorrection
int16_t setCorrection(int16_t offsets[4], float length=1.0f)
Set correction coefficients for frequencies and tone length.
Definition FSK4.cpp:48
PhysicalLayer
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition PhysicalLayer.h:151
RadioLibTime_t
unsigned long RadioLibTime_t
Type used for durations in RadioLib.
Definition TypeDef.h:642
diff --git a/_hellschreiber_8h_source.html b/_hellschreiber_8h_source.html index 66cf7502..a0db8bb3 100644 --- a/_hellschreiber_8h_source.html +++ b/_hellschreiber_8h_source.html @@ -214,8 +214,8 @@ $(document).ready(function(){initNavTree('_hellschreiber_8h_source.html',''); in
144 uint32_t pixelDuration = 0;
145 bool invert = false;
146
-
147 size_t printNumber(unsigned long, uint8_t);
-
148 size_t printFloat(double, uint8_t);
+
147 size_t printNumber(unsigned long, uint8_t) override;
+
148 size_t printFloat(double, uint8_t) override;
149
150 int16_t transmitDirect(uint32_t freq = 0, uint32_t freqHz = 0);
151 int16_t standby();
diff --git a/_lo_ra_w_a_n_8h_source.html b/_lo_ra_w_a_n_8h_source.html index 5c9351a9..0f3dc701 100644 --- a/_lo_ra_w_a_n_8h_source.html +++ b/_lo_ra_w_a_n_8h_source.html @@ -308,714 +308,716 @@ $(document).ready(function(){initNavTree('_lo_ra_w_a_n_8h_source.html',''); init
208#define RADIOLIB_LORAWAN_MAX_MAC_COMMAND_LEN_UP (2)
209#define RADIOLIB_LORAWAN_MAX_NUM_ADR_COMMANDS (8)
210
-
-
215struct LoRaWANMacCommand_t {
-
217 const uint8_t cid;
-
218
-
220 const uint8_t lenDn;
-
221
-
223 const uint8_t lenUp;
-
224
-
226 const bool persist;
-
227
-
229 const bool user;
-
230};
+
211#define RADIOLIB_LORAWAN_MAX_DOWNLINK_SIZE (250)
+
212
+
+ +
219 const uint8_t cid;
+
220
+
222 const uint8_t lenDn;
+
223
+
225 const uint8_t lenUp;
+
226
+
228 const bool persist;
+
229
+
231 const bool user;
+
232};
-
231
-
232#define RADIOLIB_LORAWAN_MAC_COMMAND_NONE { .cid = 0, .lenDn = 0, .lenUp = 0, .persist = false, .user = false }
233
-
234constexpr LoRaWANMacCommand_t MacTable[RADIOLIB_LORAWAN_NUM_MAC_COMMANDS] = {
-
235 { RADIOLIB_LORAWAN_MAC_RESET, 1, 1, true, false },
-
236 { RADIOLIB_LORAWAN_MAC_LINK_CHECK, 2, 0, false, true },
-
237 { RADIOLIB_LORAWAN_MAC_LINK_ADR, 4, 1, false, false },
-
238 { RADIOLIB_LORAWAN_MAC_DUTY_CYCLE, 1, 0, false, false },
-
239 { RADIOLIB_LORAWAN_MAC_RX_PARAM_SETUP, 4, 1, true, false },
-
240 { RADIOLIB_LORAWAN_MAC_DEV_STATUS, 0, 2, false, false },
-
241 { RADIOLIB_LORAWAN_MAC_NEW_CHANNEL, 5, 1, false, false },
-
242 { RADIOLIB_LORAWAN_MAC_RX_TIMING_SETUP, 1, 0, true, false },
-
243 { RADIOLIB_LORAWAN_MAC_TX_PARAM_SETUP, 1, 0, true, false },
-
244 { RADIOLIB_LORAWAN_MAC_DL_CHANNEL, 4, 1, true, false },
-
245 { RADIOLIB_LORAWAN_MAC_REKEY, 1, 1, true, false },
-
246 { RADIOLIB_LORAWAN_MAC_ADR_PARAM_SETUP, 1, 0, false, false },
-
247 { RADIOLIB_LORAWAN_MAC_DEVICE_TIME, 5, 0, false, true },
-
248 { RADIOLIB_LORAWAN_MAC_FORCE_REJOIN, 2, 0, false, false },
-
249 { RADIOLIB_LORAWAN_MAC_REJOIN_PARAM_SETUP, 1, 1, false, false },
-
250 { RADIOLIB_LORAWAN_MAC_PROPRIETARY, 5, 0, false, true },
-
251};
-
252
-
253#define RADIOLIB_LORAWAN_NONCES_VERSION_VAL (0x0001)
+
234#define RADIOLIB_LORAWAN_MAC_COMMAND_NONE { .cid = 0, .lenDn = 0, .lenUp = 0, .persist = false, .user = false }
+
235
+
236constexpr LoRaWANMacCommand_t MacTable[RADIOLIB_LORAWAN_NUM_MAC_COMMANDS] = {
+
237 { RADIOLIB_LORAWAN_MAC_RESET, 1, 1, true, false },
+
238 { RADIOLIB_LORAWAN_MAC_LINK_CHECK, 2, 0, false, true },
+
239 { RADIOLIB_LORAWAN_MAC_LINK_ADR, 4, 1, false, false },
+
240 { RADIOLIB_LORAWAN_MAC_DUTY_CYCLE, 1, 0, false, false },
+
241 { RADIOLIB_LORAWAN_MAC_RX_PARAM_SETUP, 4, 1, true, false },
+
242 { RADIOLIB_LORAWAN_MAC_DEV_STATUS, 0, 2, false, false },
+
243 { RADIOLIB_LORAWAN_MAC_NEW_CHANNEL, 5, 1, false, false },
+
244 { RADIOLIB_LORAWAN_MAC_RX_TIMING_SETUP, 1, 0, true, false },
+
245 { RADIOLIB_LORAWAN_MAC_TX_PARAM_SETUP, 1, 0, true, false },
+
246 { RADIOLIB_LORAWAN_MAC_DL_CHANNEL, 4, 1, true, false },
+
247 { RADIOLIB_LORAWAN_MAC_REKEY, 1, 1, true, false },
+
248 { RADIOLIB_LORAWAN_MAC_ADR_PARAM_SETUP, 1, 0, false, false },
+
249 { RADIOLIB_LORAWAN_MAC_DEVICE_TIME, 5, 0, false, true },
+
250 { RADIOLIB_LORAWAN_MAC_FORCE_REJOIN, 2, 0, false, false },
+
251 { RADIOLIB_LORAWAN_MAC_REJOIN_PARAM_SETUP, 1, 1, false, false },
+
252 { RADIOLIB_LORAWAN_MAC_PROPRIETARY, 5, 0, false, true },
+
253};
254
-
255enum LoRaWANSchemeBase_t {
-
256 RADIOLIB_LORAWAN_NONCES_START = 0x00,
-
257 RADIOLIB_LORAWAN_NONCES_VERSION = RADIOLIB_LORAWAN_NONCES_START, // 2 bytes
-
258 RADIOLIB_LORAWAN_NONCES_MODE = RADIOLIB_LORAWAN_NONCES_VERSION + sizeof(uint16_t), // 2 bytes
-
259 RADIOLIB_LORAWAN_NONCES_CLASS = RADIOLIB_LORAWAN_NONCES_MODE + sizeof(uint16_t), // 1 byte
-
260 RADIOLIB_LORAWAN_NONCES_PLAN = RADIOLIB_LORAWAN_NONCES_CLASS + sizeof(uint8_t), // 1 byte
-
261 RADIOLIB_LORAWAN_NONCES_CHECKSUM = RADIOLIB_LORAWAN_NONCES_PLAN + sizeof(uint8_t), // 2 bytes
-
262 RADIOLIB_LORAWAN_NONCES_DEV_NONCE = RADIOLIB_LORAWAN_NONCES_CHECKSUM + sizeof(uint16_t), // 2 bytes
-
263 RADIOLIB_LORAWAN_NONCES_JOIN_NONCE = RADIOLIB_LORAWAN_NONCES_DEV_NONCE + sizeof(uint16_t), // 3 bytes
-
264 RADIOLIB_LORAWAN_NONCES_ACTIVE = RADIOLIB_LORAWAN_NONCES_JOIN_NONCE + 3, // 1 byte
-
265 RADIOLIB_LORAWAN_NONCES_SIGNATURE = RADIOLIB_LORAWAN_NONCES_ACTIVE + sizeof(uint8_t), // 2 bytes
-
266 RADIOLIB_LORAWAN_NONCES_BUF_SIZE = RADIOLIB_LORAWAN_NONCES_SIGNATURE + sizeof(uint16_t) // Nonces buffer size
-
267};
-
268
-
269enum LoRaWANSchemeSession_t {
-
270 RADIOLIB_LORAWAN_SESSION_START = 0x00,
-
271 RADIOLIB_LORAWAN_SESSION_NWK_SENC_KEY = RADIOLIB_LORAWAN_SESSION_START, // 16 bytes
-
272 RADIOLIB_LORAWAN_SESSION_APP_SKEY = RADIOLIB_LORAWAN_SESSION_NWK_SENC_KEY + RADIOLIB_AES128_KEY_SIZE, // 16 bytes
-
273 RADIOLIB_LORAWAN_SESSION_FNWK_SINT_KEY = RADIOLIB_LORAWAN_SESSION_APP_SKEY + RADIOLIB_AES128_KEY_SIZE, // 16 bytes
-
274 RADIOLIB_LORAWAN_SESSION_SNWK_SINT_KEY = RADIOLIB_LORAWAN_SESSION_FNWK_SINT_KEY + RADIOLIB_AES128_KEY_SIZE, // 16 bytes
-
275 RADIOLIB_LORAWAN_SESSION_DEV_ADDR = RADIOLIB_LORAWAN_SESSION_SNWK_SINT_KEY + RADIOLIB_AES128_KEY_SIZE, // 4 bytes
-
276 RADIOLIB_LORAWAN_SESSION_NONCES_SIGNATURE = RADIOLIB_LORAWAN_SESSION_DEV_ADDR + sizeof(uint32_t), // 2 bytes
-
277 RADIOLIB_LORAWAN_SESSION_FCNT_UP = RADIOLIB_LORAWAN_SESSION_NONCES_SIGNATURE + sizeof(uint16_t), // 4 bytes
-
278 RADIOLIB_LORAWAN_SESSION_N_FCNT_DOWN = RADIOLIB_LORAWAN_SESSION_FCNT_UP + sizeof(uint32_t), // 4 bytes
-
279 RADIOLIB_LORAWAN_SESSION_A_FCNT_DOWN = RADIOLIB_LORAWAN_SESSION_N_FCNT_DOWN + sizeof(uint32_t), // 4 bytes
-
280 RADIOLIB_LORAWAN_SESSION_ADR_FCNT = RADIOLIB_LORAWAN_SESSION_A_FCNT_DOWN + sizeof(uint32_t), // 4 bytes
-
281 RADIOLIB_LORAWAN_SESSION_CONF_FCNT_UP = RADIOLIB_LORAWAN_SESSION_ADR_FCNT + sizeof(uint32_t), // 4 bytes
-
282 RADIOLIB_LORAWAN_SESSION_CONF_FCNT_DOWN = RADIOLIB_LORAWAN_SESSION_CONF_FCNT_UP + sizeof(uint32_t), // 4 bytes
-
283 RADIOLIB_LORAWAN_SESSION_RJ_COUNT0 = RADIOLIB_LORAWAN_SESSION_CONF_FCNT_DOWN + sizeof(uint32_t), // 2 bytes
-
284 RADIOLIB_LORAWAN_SESSION_RJ_COUNT1 = RADIOLIB_LORAWAN_SESSION_RJ_COUNT0 + sizeof(uint16_t), // 2 bytes
-
285 RADIOLIB_LORAWAN_SESSION_HOMENET_ID = RADIOLIB_LORAWAN_SESSION_RJ_COUNT1 + sizeof(uint16_t), // 4 bytes
-
286 RADIOLIB_LORAWAN_SESSION_VERSION = RADIOLIB_LORAWAN_SESSION_HOMENET_ID + sizeof(uint32_t), // 1 byte
-
287 RADIOLIB_LORAWAN_SESSION_LINK_ADR = RADIOLIB_LORAWAN_SESSION_VERSION + sizeof(uint8_t), // 14 bytes
-
288 RADIOLIB_LORAWAN_SESSION_DUTY_CYCLE = RADIOLIB_LORAWAN_SESSION_LINK_ADR + 14, // 1 byte
-
289 RADIOLIB_LORAWAN_SESSION_RX_PARAM_SETUP = RADIOLIB_LORAWAN_SESSION_DUTY_CYCLE + 1, // 4 bytes
-
290 RADIOLIB_LORAWAN_SESSION_RX_TIMING_SETUP = RADIOLIB_LORAWAN_SESSION_RX_PARAM_SETUP + 4, // 1 byte
-
291 RADIOLIB_LORAWAN_SESSION_TX_PARAM_SETUP = RADIOLIB_LORAWAN_SESSION_RX_TIMING_SETUP + 1, // 1 byte
-
292 RADIOLIB_LORAWAN_SESSION_ADR_PARAM_SETUP = RADIOLIB_LORAWAN_SESSION_TX_PARAM_SETUP + 1, // 1 byte
-
293 RADIOLIB_LORAWAN_SESSION_REJOIN_PARAM_SETUP = RADIOLIB_LORAWAN_SESSION_ADR_PARAM_SETUP + 1, // 1 byte
-
294 RADIOLIB_LORAWAN_SESSION_UL_CHANNELS = RADIOLIB_LORAWAN_SESSION_REJOIN_PARAM_SETUP + 1, // 16*5 bytes
-
295 RADIOLIB_LORAWAN_SESSION_DL_CHANNELS = RADIOLIB_LORAWAN_SESSION_UL_CHANNELS + RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS*5, // 16*4 bytes
-
296 RADIOLIB_LORAWAN_SESSION_AVAILABLE_CHANNELS = RADIOLIB_LORAWAN_SESSION_DL_CHANNELS + RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS*4, // 2 bytes
-
297 RADIOLIB_LORAWAN_SESSION_MAC_QUEUE = RADIOLIB_LORAWAN_SESSION_AVAILABLE_CHANNELS + sizeof(uint16_t), // 15 bytes
-
298 RADIOLIB_LORAWAN_SESSION_MAC_QUEUE_LEN = RADIOLIB_LORAWAN_SESSION_MAC_QUEUE + RADIOLIB_LORAWAN_FHDR_FOPTS_MAX_LEN, // 1 byte
-
299 RADIOLIB_LORAWAN_SESSION_SIGNATURE = RADIOLIB_LORAWAN_SESSION_MAC_QUEUE_LEN + sizeof(uint8_t), // 2 bytes
-
300 RADIOLIB_LORAWAN_SESSION_BUF_SIZE = RADIOLIB_LORAWAN_SESSION_SIGNATURE + sizeof(uint16_t) // Session buffer size
-
301};
-
302
-
- - -
311
-
313 uint8_t idx;
-
314
-
316 uint32_t freq;
-
317
-
319 uint8_t drMin;
-
320
-
322 uint8_t drMax;
-
323
-
325 uint8_t dr;
-
326
- -
329};
+
255#define RADIOLIB_LORAWAN_NONCES_VERSION_VAL (0x0001)
+
256
+
257enum LoRaWANSchemeBase_t {
+
258 RADIOLIB_LORAWAN_NONCES_START = 0x00,
+
259 RADIOLIB_LORAWAN_NONCES_VERSION = RADIOLIB_LORAWAN_NONCES_START, // 2 bytes
+
260 RADIOLIB_LORAWAN_NONCES_MODE = RADIOLIB_LORAWAN_NONCES_VERSION + sizeof(uint16_t), // 2 bytes
+
261 RADIOLIB_LORAWAN_NONCES_CLASS = RADIOLIB_LORAWAN_NONCES_MODE + sizeof(uint16_t), // 1 byte
+
262 RADIOLIB_LORAWAN_NONCES_PLAN = RADIOLIB_LORAWAN_NONCES_CLASS + sizeof(uint8_t), // 1 byte
+
263 RADIOLIB_LORAWAN_NONCES_CHECKSUM = RADIOLIB_LORAWAN_NONCES_PLAN + sizeof(uint8_t), // 2 bytes
+
264 RADIOLIB_LORAWAN_NONCES_DEV_NONCE = RADIOLIB_LORAWAN_NONCES_CHECKSUM + sizeof(uint16_t), // 2 bytes
+
265 RADIOLIB_LORAWAN_NONCES_JOIN_NONCE = RADIOLIB_LORAWAN_NONCES_DEV_NONCE + sizeof(uint16_t), // 3 bytes
+
266 RADIOLIB_LORAWAN_NONCES_ACTIVE = RADIOLIB_LORAWAN_NONCES_JOIN_NONCE + 3, // 1 byte
+
267 RADIOLIB_LORAWAN_NONCES_SIGNATURE = RADIOLIB_LORAWAN_NONCES_ACTIVE + sizeof(uint8_t), // 2 bytes
+
268 RADIOLIB_LORAWAN_NONCES_BUF_SIZE = RADIOLIB_LORAWAN_NONCES_SIGNATURE + sizeof(uint16_t) // Nonces buffer size
+
269};
+
270
+
271enum LoRaWANSchemeSession_t {
+
272 RADIOLIB_LORAWAN_SESSION_START = 0x00,
+
273 RADIOLIB_LORAWAN_SESSION_NWK_SENC_KEY = RADIOLIB_LORAWAN_SESSION_START, // 16 bytes
+
274 RADIOLIB_LORAWAN_SESSION_APP_SKEY = RADIOLIB_LORAWAN_SESSION_NWK_SENC_KEY + RADIOLIB_AES128_KEY_SIZE, // 16 bytes
+
275 RADIOLIB_LORAWAN_SESSION_FNWK_SINT_KEY = RADIOLIB_LORAWAN_SESSION_APP_SKEY + RADIOLIB_AES128_KEY_SIZE, // 16 bytes
+
276 RADIOLIB_LORAWAN_SESSION_SNWK_SINT_KEY = RADIOLIB_LORAWAN_SESSION_FNWK_SINT_KEY + RADIOLIB_AES128_KEY_SIZE, // 16 bytes
+
277 RADIOLIB_LORAWAN_SESSION_DEV_ADDR = RADIOLIB_LORAWAN_SESSION_SNWK_SINT_KEY + RADIOLIB_AES128_KEY_SIZE, // 4 bytes
+
278 RADIOLIB_LORAWAN_SESSION_NONCES_SIGNATURE = RADIOLIB_LORAWAN_SESSION_DEV_ADDR + sizeof(uint32_t), // 2 bytes
+
279 RADIOLIB_LORAWAN_SESSION_FCNT_UP = RADIOLIB_LORAWAN_SESSION_NONCES_SIGNATURE + sizeof(uint16_t), // 4 bytes
+
280 RADIOLIB_LORAWAN_SESSION_N_FCNT_DOWN = RADIOLIB_LORAWAN_SESSION_FCNT_UP + sizeof(uint32_t), // 4 bytes
+
281 RADIOLIB_LORAWAN_SESSION_A_FCNT_DOWN = RADIOLIB_LORAWAN_SESSION_N_FCNT_DOWN + sizeof(uint32_t), // 4 bytes
+
282 RADIOLIB_LORAWAN_SESSION_ADR_FCNT = RADIOLIB_LORAWAN_SESSION_A_FCNT_DOWN + sizeof(uint32_t), // 4 bytes
+
283 RADIOLIB_LORAWAN_SESSION_CONF_FCNT_UP = RADIOLIB_LORAWAN_SESSION_ADR_FCNT + sizeof(uint32_t), // 4 bytes
+
284 RADIOLIB_LORAWAN_SESSION_CONF_FCNT_DOWN = RADIOLIB_LORAWAN_SESSION_CONF_FCNT_UP + sizeof(uint32_t), // 4 bytes
+
285 RADIOLIB_LORAWAN_SESSION_RJ_COUNT0 = RADIOLIB_LORAWAN_SESSION_CONF_FCNT_DOWN + sizeof(uint32_t), // 2 bytes
+
286 RADIOLIB_LORAWAN_SESSION_RJ_COUNT1 = RADIOLIB_LORAWAN_SESSION_RJ_COUNT0 + sizeof(uint16_t), // 2 bytes
+
287 RADIOLIB_LORAWAN_SESSION_HOMENET_ID = RADIOLIB_LORAWAN_SESSION_RJ_COUNT1 + sizeof(uint16_t), // 4 bytes
+
288 RADIOLIB_LORAWAN_SESSION_VERSION = RADIOLIB_LORAWAN_SESSION_HOMENET_ID + sizeof(uint32_t), // 1 byte
+
289 RADIOLIB_LORAWAN_SESSION_LINK_ADR = RADIOLIB_LORAWAN_SESSION_VERSION + sizeof(uint8_t), // 14 bytes
+
290 RADIOLIB_LORAWAN_SESSION_DUTY_CYCLE = RADIOLIB_LORAWAN_SESSION_LINK_ADR + 14, // 1 byte
+
291 RADIOLIB_LORAWAN_SESSION_RX_PARAM_SETUP = RADIOLIB_LORAWAN_SESSION_DUTY_CYCLE + 1, // 4 bytes
+
292 RADIOLIB_LORAWAN_SESSION_RX_TIMING_SETUP = RADIOLIB_LORAWAN_SESSION_RX_PARAM_SETUP + 4, // 1 byte
+
293 RADIOLIB_LORAWAN_SESSION_TX_PARAM_SETUP = RADIOLIB_LORAWAN_SESSION_RX_TIMING_SETUP + 1, // 1 byte
+
294 RADIOLIB_LORAWAN_SESSION_ADR_PARAM_SETUP = RADIOLIB_LORAWAN_SESSION_TX_PARAM_SETUP + 1, // 1 byte
+
295 RADIOLIB_LORAWAN_SESSION_REJOIN_PARAM_SETUP = RADIOLIB_LORAWAN_SESSION_ADR_PARAM_SETUP + 1, // 1 byte
+
296 RADIOLIB_LORAWAN_SESSION_UL_CHANNELS = RADIOLIB_LORAWAN_SESSION_REJOIN_PARAM_SETUP + 1, // 16*5 bytes
+
297 RADIOLIB_LORAWAN_SESSION_DL_CHANNELS = RADIOLIB_LORAWAN_SESSION_UL_CHANNELS + RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS*5, // 16*4 bytes
+
298 RADIOLIB_LORAWAN_SESSION_AVAILABLE_CHANNELS = RADIOLIB_LORAWAN_SESSION_DL_CHANNELS + RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS*4, // 2 bytes
+
299 RADIOLIB_LORAWAN_SESSION_MAC_QUEUE = RADIOLIB_LORAWAN_SESSION_AVAILABLE_CHANNELS + sizeof(uint16_t), // 15 bytes
+
300 RADIOLIB_LORAWAN_SESSION_MAC_QUEUE_LEN = RADIOLIB_LORAWAN_SESSION_MAC_QUEUE + RADIOLIB_LORAWAN_FHDR_FOPTS_MAX_LEN, // 1 byte
+
301 RADIOLIB_LORAWAN_SESSION_SIGNATURE = RADIOLIB_LORAWAN_SESSION_MAC_QUEUE_LEN + sizeof(uint8_t), // 2 bytes
+
302 RADIOLIB_LORAWAN_SESSION_BUF_SIZE = RADIOLIB_LORAWAN_SESSION_SIGNATURE + sizeof(uint16_t) // Session buffer size
+
303};
+
304
+
+ + +
313
+
315 uint8_t idx;
+
316
+
318 uint32_t freq;
+
319
+
321 uint8_t drMin;
+
322
+
324 uint8_t drMax;
+
325
+
327 uint8_t dr;
+
328
+ +
331};
-
330
-
331// alias for unused channel
-
332#define RADIOLIB_LORAWAN_CHANNEL_NONE { .enabled = false, .idx = RADIOLIB_LORAWAN_CHANNEL_INDEX_NONE, .freq = 0, \
-
333 .drMin = 0, .drMax = 0, .dr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED, .available = false }
-
334
-
- -
342 uint8_t numChannels;
-
343
-
345 uint32_t freqStart;
-
346
-
348 uint32_t freqStep;
-
349
-
351 uint8_t drMin;
-
352
-
354 uint8_t drMax;
-
355
- -
358};
+
332
+
333// alias for unused channel
+
334#define RADIOLIB_LORAWAN_CHANNEL_NONE { .enabled = false, .idx = RADIOLIB_LORAWAN_CHANNEL_INDEX_NONE, .freq = 0, \
+
335 .drMin = 0, .drMax = 0, .dr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED, .available = false }
+
336
+
+ +
344 uint8_t numChannels;
+
345
+
347 uint32_t freqStart;
+
348
+
350 uint32_t freqStep;
+
351
+
353 uint8_t drMin;
+
354
+
356 uint8_t drMax;
+
357
+ +
360};
-
359
-
360// alias for unused channel span
-
361#define RADIOLIB_LORAWAN_CHANNEL_SPAN_NONE { .numChannels = 0, .freqStart = 0, .freqStep = 0, .drMin = 0, .drMax = 0, .drJoinRequest = RADIOLIB_LORAWAN_DATA_RATE_UNUSED }
-
362
-
- -
369 uint8_t bandNum;
-
370
-
372 uint8_t bandType;
-
373
-
375 uint32_t freqMin;
-
376
-
378 uint32_t freqMax;
-
379
-
381 uint8_t payloadLenMax[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES];
-
382
-
384 int8_t powerMax;
-
385
- -
388
- -
391
- -
394
- -
397
- -
400
- -
403
-
405 uint8_t numTxSpans;
-
406
- -
409
- -
412
-
413 uint8_t rx1DrTable[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES][8];
+
361
+
362// alias for unused channel span
+
363#define RADIOLIB_LORAWAN_CHANNEL_SPAN_NONE { .numChannels = 0, .freqStart = 0, .freqStep = 0, .drMin = 0, .drMax = 0, .drJoinRequest = RADIOLIB_LORAWAN_DATA_RATE_UNUSED }
+
364
+
+ +
371 uint8_t bandNum;
+
372
+
374 uint8_t bandType;
+
375
+
377 uint32_t freqMin;
+
378
+
380 uint32_t freqMax;
+
381
+
383 uint8_t payloadLenMax[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES];
+
384
+
386 int8_t powerMax;
+
387
+ +
390
+ +
393
+ +
396
+ +
399
+ +
402
+ +
405
+
407 uint8_t numTxSpans;
+
408
+ +
411
+
414
- -
417
- -
420
- -
423
-
425 uint8_t dataRates[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES];
-
426};
+
415 uint8_t rx1DrTable[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES][8];
+
416
+ +
419
+ +
422
+ +
425
+
427 uint8_t dataRates[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES];
+
428};
-
427
-
428// supported bands
-
429extern const LoRaWANBand_t EU868;
-
430extern const LoRaWANBand_t US915;
-
431extern const LoRaWANBand_t EU433;
-
432extern const LoRaWANBand_t AU915;
-
433extern const LoRaWANBand_t CN500;
-
434extern const LoRaWANBand_t AS923;
-
435extern const LoRaWANBand_t AS923_2;
-
436extern const LoRaWANBand_t AS923_3;
-
437extern const LoRaWANBand_t AS923_4;
-
438extern const LoRaWANBand_t KR920;
-
439extern const LoRaWANBand_t IN865;
-
440
-
445enum LoRaWANBandNum_t {
-
446 BandEU868,
-
447 BandUS915,
-
448 BandEU433,
-
449 BandAU915,
-
450 BandCN500,
-
451 BandAS923,
-
452 BandAS923_2,
-
453 BandAS923_3,
-
454 BandAS923_4,
-
455 BandKR920,
-
456 BandIN865,
-
457 BandLast
-
458};
-
459
-
460// provide easy access to the number of currently supported bands
-
461#define RADIOLIB_LORAWAN_NUM_SUPPORTED_BANDS (BandLast - BandEU868)
-
462
-
463// array of currently supported bands
-
464extern const LoRaWANBand_t* LoRaWANBands[];
-
465
-
- -
472 bool newSession = false;
-
473
-
475 uint16_t devNonce = 0;
-
476
-
478 uint32_t joinNonce = 0;
-
479};
+
429
+
430// supported bands
+
431extern const LoRaWANBand_t EU868;
+
432extern const LoRaWANBand_t US915;
+
433extern const LoRaWANBand_t EU433;
+
434extern const LoRaWANBand_t AU915;
+
435extern const LoRaWANBand_t CN500;
+
436extern const LoRaWANBand_t AS923;
+
437extern const LoRaWANBand_t AS923_2;
+
438extern const LoRaWANBand_t AS923_3;
+
439extern const LoRaWANBand_t AS923_4;
+
440extern const LoRaWANBand_t KR920;
+
441extern const LoRaWANBand_t IN865;
+
442
+
447enum LoRaWANBandNum_t {
+
448 BandEU868,
+
449 BandUS915,
+
450 BandEU433,
+
451 BandAU915,
+
452 BandCN500,
+
453 BandAS923,
+
454 BandAS923_2,
+
455 BandAS923_3,
+
456 BandAS923_4,
+
457 BandKR920,
+
458 BandIN865,
+
459 BandLast
+
460};
+
461
+
462// provide easy access to the number of currently supported bands
+
463#define RADIOLIB_LORAWAN_NUM_SUPPORTED_BANDS (BandLast - BandEU868)
+
464
+
465// array of currently supported bands
+
466extern const LoRaWANBand_t* LoRaWANBands[];
+
467
+
+ +
474 bool newSession = false;
+
475
+
477 uint16_t devNonce = 0;
+
478
+
480 uint32_t joinNonce = 0;
+
481};
-
480
-
- -
487 uint8_t dir;
-
488
- -
491
- -
495
- -
498
-
500 uint8_t datarate;
-
501
-
503 float freq;
-
504
-
506 int16_t power;
-
507
-
509 uint32_t fCnt;
-
510
-
512 uint8_t fPort;
-
513
-
515 uint8_t nbTrans;
-
516};
+
482
+
+ +
489 uint8_t dir;
+
490
+ +
493
+ +
497
+ +
500
+
502 uint8_t datarate;
+
503
+
505 float freq;
+
506
+
508 int16_t power;
+
509
+
511 uint32_t fCnt;
+
512
+
514 uint8_t fPort;
+
515
+
517 uint8_t nbTrans;
+
518};
-
517
-
- -
523 public:
-
524
-
531 LoRaWANNode(PhysicalLayer* phy, const LoRaWANBand_t* band, uint8_t subBand = 0);
-
532
-
537 uint8_t* getBufferNonces();
-
538
-
544 int16_t setBufferNonces(const uint8_t* persistentBuffer);
-
545
-
549 void clearSession();
-
550
-
555 uint8_t* getBufferSession();
-
556
-
562 int16_t setBufferSession(const uint8_t* persistentBuffer);
-
563
-
572 int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, const uint8_t* nwkKey, const uint8_t* appKey);
-
573
-
584 int16_t beginABP(uint32_t addr, const uint8_t* fNwkSIntKey, const uint8_t* sNwkSIntKey, const uint8_t* nwkSEncKey, const uint8_t* appSKey);
-
585
-
592 virtual int16_t activateOTAA(uint8_t initialDr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED, LoRaWANJoinEvent_t *joinEvent = NULL);
-
593
-
600 virtual int16_t activateABP(uint8_t initialDr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED);
-
601
-
603 bool isActivated();
-
604
-
605 #if defined(RADIOLIB_BUILD_ARDUINO)
-
618 virtual int16_t sendReceive(const String& strUp, uint8_t fPort, String& strDown, bool isConfirmed = false, LoRaWANEvent_t* eventUp = NULL, LoRaWANEvent_t* eventDown = NULL);
-
619 #endif
-
620
-
632 virtual int16_t sendReceive(const char* strUp, uint8_t fPort, bool isConfirmed = false, LoRaWANEvent_t* eventUp = NULL, LoRaWANEvent_t* eventDown = NULL);
-
633
-
647 virtual int16_t sendReceive(const char* strUp, uint8_t fPort, uint8_t* dataDown, size_t* lenDown, bool isConfirmed = false, LoRaWANEvent_t* eventUp = NULL, LoRaWANEvent_t* eventDown = NULL);
-
648
-
661 virtual int16_t sendReceive(const uint8_t* dataUp, size_t lenUp, uint8_t fPort = 1, bool isConfirmed = false, LoRaWANEvent_t* eventUp = NULL, LoRaWANEvent_t* eventDown = NULL);
-
662
-
677 virtual int16_t sendReceive(const uint8_t* dataUp, size_t lenUp, uint8_t fPort, uint8_t* dataDown, size_t* lenDown, bool isConfirmed = false, LoRaWANEvent_t* eventUp = NULL, LoRaWANEvent_t* eventDown = NULL);
-
678
-
686 int16_t sendMacCommandReq(uint8_t cid);
-
687
-
696 int16_t getMacLinkCheckAns(uint8_t* margin, uint8_t* gwCnt);
-
697
-
707 int16_t getMacDeviceTimeAns(uint32_t* gpsEpoch, uint8_t* fraction, bool returnUnix = true);
-
708
-
714 int16_t setDatarate(uint8_t drUp);
-
715
-
721 int16_t setTxPower(int8_t txPower);
-
722
-
729 int16_t setRx2Dr(uint8_t dr);
-
730
-
735 void setADR(bool enable = true);
-
736
-
743 void setDutyCycle(bool enable = true, RadioLibTime_t msPerHour = 0);
-
744
-
751 void setDwellTime(bool enable, RadioLibTime_t msPerUplink = 0);
-
752
-
760 void setCSMA(bool csmaEnabled, uint8_t maxChanges = 4, uint8_t backoffMax = 0, uint8_t difsSlots = 2);
-
761
-
767 void setDeviceStatus(uint8_t battLevel);
-
768
- -
777
-
782 uint32_t getFCntUp();
-
783
-
788 uint32_t getNFCntDown();
-
789
-
794 uint32_t getAFCntDown();
-
795
-
801 void resetFCntDown();
-
802
-
807 uint32_t getDevAddr();
-
808
- -
814
- -
823
- -
826
-
831 uint8_t getMaxPayloadLen();
-
832
-
837 bool TS009 = false;
-
838
- -
852
-
853#if !RADIOLIB_GODMODE
-
854 protected:
-
855#endif
-
856 PhysicalLayer* phyLayer = NULL;
-
857 const LoRaWANBand_t* band = NULL;
-
858
-
859 // a buffer that holds all LW base parameters that should persist at all times!
-
860 uint8_t bufferNonces[RADIOLIB_LORAWAN_NONCES_BUF_SIZE] = { 0 };
-
861
-
862 // a buffer that holds all LW session parameters that preferably persist, but can be afforded to get lost
-
863 uint8_t bufferSession[RADIOLIB_LORAWAN_SESSION_BUF_SIZE] = { 0 };
-
864
-
865 uint8_t fOptsUp[RADIOLIB_LORAWAN_FHDR_FOPTS_MAX_LEN] = { 0 };
-
866 uint8_t fOptsDown[RADIOLIB_LORAWAN_FHDR_FOPTS_MAX_LEN] = { 0 };
-
867 uint8_t fOptsUpLen = 0;
-
868 uint8_t fOptsDownLen = 0;
-
869
-
870 uint16_t lwMode = RADIOLIB_LORAWAN_MODE_NONE;
-
871 uint8_t lwClass = RADIOLIB_LORAWAN_CLASS_A;
-
872 bool isActive = false;
-
873
-
874 uint64_t joinEUI = 0;
-
875 uint64_t devEUI = 0;
-
876 uint8_t nwkKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
877 uint8_t appKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
878
-
879 // the following is either provided by the network server (OTAA)
-
880 // or directly entered by the user (ABP)
-
881 uint32_t devAddr = 0;
-
882 uint8_t appSKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
883 uint8_t fNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
884 uint8_t sNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
885 uint8_t nwkSEncKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
886 uint8_t jSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
-
887
-
888 uint16_t keyCheckSum = 0;
-
889
-
890 // device-specific parameters, persistent through sessions
-
891 uint16_t devNonce = 0;
-
892 uint32_t joinNonce = 0;
-
893
-
894 // session-specific parameters
-
895 uint32_t homeNetId = 0;
-
896 uint8_t adrLimitExp = RADIOLIB_LORAWAN_ADR_ACK_LIMIT_EXP;
-
897 uint8_t adrDelayExp = RADIOLIB_LORAWAN_ADR_ACK_DELAY_EXP;
-
898 uint8_t nbTrans = 1; // Number of allowed frame retransmissions
-
899 uint8_t txPowerSteps = 0;
-
900 uint8_t txPowerMax = 0;
-
901 uint32_t fCntUp = 0;
-
902 uint32_t aFCntDown = 0;
-
903 uint32_t nFCntDown = 0;
-
904 uint32_t confFCntUp = RADIOLIB_LORAWAN_FCNT_NONE;
-
905 uint32_t confFCntDown = RADIOLIB_LORAWAN_FCNT_NONE;
-
906 uint32_t adrFCnt = 0;
-
907
-
908 // ADR is enabled by default
-
909 bool adrEnabled = true;
-
910
-
911 // duty cycle is set upon initialization and activated in regions that impose this
-
912 bool dutyCycleEnabled = false;
-
913 uint32_t dutyCycle = 0;
-
914
-
915 // dwell time is set upon initialization and activated in regions that impose this
-
916 uint16_t dwellTimeUp = 0;
-
917 uint16_t dwellTimeDn = 0;
-
918
-
919 RadioLibTime_t tUplink = 0; // scheduled uplink transmission time (internal clock)
-
920 RadioLibTime_t tDownlink = 0; // time at end of downlink reception
-
921
-
922 // enable/disable CSMA for LoRaWAN
-
923 bool csmaEnabled = false;
-
924
-
925 // maximum number of channel hops during CSMA
-
926 uint8_t maxChanges = RADIOLIB_LORAWAN_MAX_CHANGES_DEFAULT;
-
927
-
928 // number of backoff slots to be checked after DIFS phase.
-
929 // A random BO avoids collisions in the case where two or more nodes start the CSMA
-
930 // process at the same time.
-
931 uint8_t backoffMax = RADIOLIB_LORAWAN_BACKOFF_MAX_DEFAULT;
-
932
-
933 // number of CADs to estimate a clear CH
-
934 uint8_t difsSlots = RADIOLIB_LORAWAN_DIFS_DEFAULT;
-
935
-
936 // available channel frequencies from list passed during OTA activation
-
937 LoRaWANChannel_t channelPlan[2][RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS];
-
938
-
939 // currently configured channels for TX, RX1, RX2
-
940 LoRaWANChannel_t channels[3] = { RADIOLIB_LORAWAN_CHANNEL_NONE, RADIOLIB_LORAWAN_CHANNEL_NONE,
-
941 RADIOLIB_LORAWAN_CHANNEL_NONE };
-
942
-
943 // delays between the uplink and RX1/2 windows
-
944 // the first field is meaningless, but is used for offsetting for Rx windows 1 and 2
-
945 RadioLibTime_t rxDelays[3] = { 0, RADIOLIB_LORAWAN_RECEIVE_DELAY_1_MS, RADIOLIB_LORAWAN_RECEIVE_DELAY_2_MS };
-
946
-
947 // offset between TX and RX1 (such that RX1 has equal or lower DR)
-
948 uint8_t rx1DrOffset = 0;
-
949
-
950 // LoRaWAN revision (1.0 vs 1.1)
-
951 uint8_t rev = 0;
-
952
-
953 // Time on Air of last uplink
-
954 RadioLibTime_t lastToA = 0;
-
955
-
956 // timestamp to measure the RX1/2 delay (from uplink end)
-
957 RadioLibTime_t rxDelayStart = 0;
-
958
-
959 // timestamp when the Rx1/2 windows were closed (timeout or uplink received)
-
960 RadioLibTime_t rxDelayEnd = 0;
-
961
-
962 // device status - battery level
-
963 uint8_t battLevel = 0xFF;
-
964
-
965 // indicates whether an uplink has MAC commands as payload
-
966 bool isMACPayload = false;
-
967
-
968 // save the selected sub-band in case this must be restored in ADR control
-
969 uint8_t subBand = 0;
-
970
-
971 // allow port 226 for devices implementing TS011
-
972 bool TS011 = false;
-
973
-
974 // this will reset the device credentials, so the device starts completely new
-
975 void clearNonces();
-
976
-
977 // start a fresh session using default parameters
-
978 void createSession(uint16_t lwMode, uint8_t initialDr);
-
979
-
980 // setup Join-Request payload
-
981 void composeJoinRequest(uint8_t* joinRequestMsg);
-
982
-
983 // extract Join-Accept payload and start a new session
-
984 int16_t processJoinAccept(LoRaWANJoinEvent_t *joinEvent);
-
985
-
986 // a join-accept can piggy-back a set of channels or channel masks
-
987 void processCFList(uint8_t* cfList);
-
988
-
989 // check whether payload length and fport are allowed
-
990 int16_t isValidUplink(uint8_t* len, uint8_t fPort);
-
991
-
992 // perform ADR backoff
-
993 void adrBackoff();
-
994
-
995 // create an encrypted uplink buffer, composing metadata, user data and MAC data
-
996 void composeUplink(const uint8_t* in, uint8_t lenIn, uint8_t* out, uint8_t fPort, bool isConfirmed);
-
997
-
998 // generate and set the MIC of an uplink buffer (depends on selected channels)
-
999 void micUplink(uint8_t* inOut, uint8_t lenInOut);
-
1000
-
1001 // transmit uplink buffer on a specified channel
-
1002 int16_t transmitUplink(LoRaWANChannel_t* chnl, uint8_t* in, uint8_t len, bool retrans);
-
1003
-
1004 // wait for, open and listen during receive windows; only performs listening
-
1005 int16_t receiveCommon(uint8_t dir, const LoRaWANChannel_t* dlChannels, const RadioLibTime_t* dlDelays, uint8_t numWindows, RadioLibTime_t tReference);
-
1006
-
1007 // extract downlink payload and process MAC commands
-
1008 int16_t parseDownlink(uint8_t* data, size_t* len, LoRaWANEvent_t* event = NULL);
-
1009
-
1010 // execute mac command, return the number of processed bytes for sequential processing
-
1011 bool execMacCommand(uint8_t cid, uint8_t* optIn, uint8_t lenIn);
-
1012 bool execMacCommand(uint8_t cid, uint8_t* optIn, uint8_t lenIn, uint8_t* optOut);
-
1013
-
1014 // possible override for additional MAC commands that are not in the base specification
-
1015 virtual bool derivedMacHandler(uint8_t cid, uint8_t* optIn, uint8_t lenIn, uint8_t* optOut);
-
1016
-
1017 // pre-process a (set of) LinkAdrReq commands into one super-channel-mask + Tx/Dr/NbTrans fields
-
1018 void preprocessMacLinkAdr(uint8_t* mPtr, uint8_t cLen, uint8_t* mAdrOpt);
-
1019
-
1020 // post-process a (set of) LinkAdrAns commands depending on LoRaWAN version
-
1021 void postprocessMacLinkAdr(uint8_t* ack, uint8_t cLen);
-
1022
-
1023 // get the properties of a MAC command given a certain command ID
-
1024 int16_t getMacCommand(uint8_t cid, LoRaWANMacCommand_t* cmd);
-
1025
-
1026 // possible override for additional MAC commands that are not in the base specification
-
1027 virtual int16_t derivedMacFinder(uint8_t cid, LoRaWANMacCommand_t* cmd);
-
1028
-
1029 // get the length of a certain MAC command in a specific direction (up/down)
-
1030 // if inclusive is true, add one for the CID byte
-
1031 int16_t getMacLen(uint8_t cid, uint8_t* len, uint8_t dir, bool inclusive = false);
-
1032
-
1033 // find out of a MAC command should persist destruction
-
1034 // in uplink direction, some commands must persist if no downlink is received
-
1035 // in downlink direction, the user-accessible MAC commands remain available for retrieval
-
1036 bool isPersistentMacCommand(uint8_t cid, uint8_t dir);
-
1037
-
1038 // push MAC command to queue, done by copy
-
1039 int16_t pushMacCommand(uint8_t cid, uint8_t* cOcts, uint8_t* out, uint8_t* lenOut, uint8_t dir);
-
1040
-
1041 // retrieve the payload of a certain MAC command, if present in the buffer
-
1042 int16_t getMacPayload(uint8_t cid, uint8_t* in, uint8_t lenIn, uint8_t* out, uint8_t dir);
-
1043
-
1044 // delete a specific MAC command from queue, indicated by the command ID
-
1045 int16_t deleteMacCommand(uint8_t cid, uint8_t* inOut, uint8_t* lenInOut, uint8_t dir);
-
1046
-
1047 // clear a MAC buffer, possible retaining persistent MAC commands
-
1048 void clearMacCommands(uint8_t* inOut, uint8_t* lenInOut, uint8_t dir);
-
1049
-
1050 // configure the common physical layer properties (frequency, sync word etc.)
-
1051 int16_t setPhyProperties(const LoRaWANChannel_t* chnl, uint8_t dir, int8_t pwr, size_t pre = 0);
-
1052
-
1053 // Performs CSMA as per LoRa Alliance Technical Recommendation 13 (TR-013).
-
1054 bool csmaChannelClear(uint8_t difs, uint8_t numBackoff);
-
1055
-
1056 // perform a single CAD operation for the under SF/CH combination. Returns either busy or otherwise.
-
1057 bool cadChannelClear();
-
1058
-
1059 // (dynamic bands:) get or (fixed bands:) create a complete 80-bit channel mask for current configuration
-
1060 void getChannelPlanMask(uint64_t* chMaskGrp0123, uint32_t* chMaskGrp45);
-
1061
-
1062 // setup uplink/downlink channel data rates and frequencies
-
1063 // for dynamic channels, there is a small set of predefined channels
-
1064 // in case of JoinRequest, add some optional extra frequencies
-
1065 void selectChannelPlanDyn();
-
1066
-
1067 // setup uplink/downlink channel data rates and frequencies
-
1068 // for fixed bands, we only allow one sub-band at a time to be selected
-
1069 void selectChannelPlanFix();
-
1070
-
1071 // get the number of available channels,
-
1072 // along with a 16-bit mask indicating which channels can be used next for uplink/downlink
-
1073 uint8_t getAvailableChannels(uint16_t* mask);
-
1074
-
1075 // (re)set/restore which channels can be used next for uplink/downlink
-
1076 void setAvailableChannels(uint16_t mask);
-
1077
-
1078 // select a set of random TX/RX channels for up- and downlink
-
1079 int16_t selectChannels();
-
1080
-
1081 // apply a 96-bit channel mask
-
1082 bool applyChannelMask(uint64_t chMaskGrp0123, uint32_t chMaskGrp45);
-
1083
-
1084#if RADIOLIB_DEBUG_PROTOCOL
-
1085 // print the available channels through debug
-
1086 void printChannels();
-
1087#endif
-
1088
-
1089 // method to generate message integrity code
-
1090 uint32_t generateMIC(uint8_t* msg, size_t len, uint8_t* key);
-
1091
-
1092 // method to verify message integrity code
-
1093 // it assumes that the MIC is the last 4 bytes of the message
-
1094 bool verifyMIC(uint8_t* msg, size_t len, uint8_t* key);
-
1095
-
1096 // find the first usable data rate for the given band
-
1097 int16_t findDataRate(uint8_t dr, DataRate_t* dataRate);
-
1098
-
1099 // function to encrypt and decrypt payloads (regular uplink/downlink)
-
1100 void processAES(const uint8_t* in, size_t len, uint8_t* key, uint8_t* out, uint32_t fCnt, uint8_t dir, uint8_t ctrId, bool counter);
-
1101
-
1102 // 16-bit checksum method that takes a uint8_t array of even length and calculates the checksum
-
1103 static uint16_t checkSum16(const uint8_t *key, uint16_t keyLen);
-
1104
-
1105 // check the integrity of a buffer using a 16-bit checksum located in the last two bytes of the buffer
-
1106 static int16_t checkBufferCommon(const uint8_t *buffer, uint16_t size);
-
1107
-
1108 // network-to-host conversion method - takes data from network packet and converts it to the host endians
-
1109 template<typename T>
-
1110 static T ntoh(const uint8_t* buff, size_t size = 0);
-
1111
-
1112 // host-to-network conversion method - takes data from host variable and and converts it to network packet endians
-
1113 template<typename T>
-
1114 static void hton(uint8_t* buff, T val, size_t size = 0);
-
1115};
+
519
+
+ +
525 public:
+
526
+
533 LoRaWANNode(PhysicalLayer* phy, const LoRaWANBand_t* band, uint8_t subBand = 0);
+
534
+
539 uint8_t* getBufferNonces();
+
540
+
546 int16_t setBufferNonces(const uint8_t* persistentBuffer);
+
547
+
551 void clearSession();
+
552
+
557 uint8_t* getBufferSession();
+
558
+
564 int16_t setBufferSession(const uint8_t* persistentBuffer);
+
565
+
574 int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, const uint8_t* nwkKey, const uint8_t* appKey);
+
575
+
586 int16_t beginABP(uint32_t addr, const uint8_t* fNwkSIntKey, const uint8_t* sNwkSIntKey, const uint8_t* nwkSEncKey, const uint8_t* appSKey);
+
587
+
594 virtual int16_t activateOTAA(uint8_t initialDr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED, LoRaWANJoinEvent_t *joinEvent = NULL);
+
595
+
602 virtual int16_t activateABP(uint8_t initialDr = RADIOLIB_LORAWAN_DATA_RATE_UNUSED);
+
603
+
605 bool isActivated();
+
606
+
607 #if defined(RADIOLIB_BUILD_ARDUINO)
+
620 virtual int16_t sendReceive(const String& strUp, uint8_t fPort, String& strDown, bool isConfirmed = false, LoRaWANEvent_t* eventUp = NULL, LoRaWANEvent_t* eventDown = NULL);
+
621 #endif
+
622
+
634 virtual int16_t sendReceive(const char* strUp, uint8_t fPort, bool isConfirmed = false, LoRaWANEvent_t* eventUp = NULL, LoRaWANEvent_t* eventDown = NULL);
+
635
+
649 virtual int16_t sendReceive(const char* strUp, uint8_t fPort, uint8_t* dataDown, size_t* lenDown, bool isConfirmed = false, LoRaWANEvent_t* eventUp = NULL, LoRaWANEvent_t* eventDown = NULL);
+
650
+
663 virtual int16_t sendReceive(const uint8_t* dataUp, size_t lenUp, uint8_t fPort = 1, bool isConfirmed = false, LoRaWANEvent_t* eventUp = NULL, LoRaWANEvent_t* eventDown = NULL);
+
664
+
679 virtual int16_t sendReceive(const uint8_t* dataUp, size_t lenUp, uint8_t fPort, uint8_t* dataDown, size_t* lenDown, bool isConfirmed = false, LoRaWANEvent_t* eventUp = NULL, LoRaWANEvent_t* eventDown = NULL);
+
680
+
688 int16_t sendMacCommandReq(uint8_t cid);
+
689
+
698 int16_t getMacLinkCheckAns(uint8_t* margin, uint8_t* gwCnt);
+
699
+
709 int16_t getMacDeviceTimeAns(uint32_t* gpsEpoch, uint8_t* fraction, bool returnUnix = true);
+
710
+
716 int16_t setDatarate(uint8_t drUp);
+
717
+
723 int16_t setTxPower(int8_t txPower);
+
724
+
731 int16_t setRx2Dr(uint8_t dr);
+
732
+
737 void setADR(bool enable = true);
+
738
+
745 void setDutyCycle(bool enable = true, RadioLibTime_t msPerHour = 0);
+
746
+
753 void setDwellTime(bool enable, RadioLibTime_t msPerUplink = 0);
+
754
+
762 void setCSMA(bool csmaEnabled, uint8_t maxChanges = 4, uint8_t backoffMax = 0, uint8_t difsSlots = 2);
+
763
+
769 void setDeviceStatus(uint8_t battLevel);
+
770
+ +
779
+
784 uint32_t getFCntUp();
+
785
+
790 uint32_t getNFCntDown();
+
791
+
796 uint32_t getAFCntDown();
+
797
+
803 void resetFCntDown();
+
804
+
809 uint32_t getDevAddr();
+
810
+ +
816
+ +
825
+ +
828
+
833 uint8_t getMaxPayloadLen();
+
834
+
839 bool TS009 = false;
+
840
+ +
854
+
855#if !RADIOLIB_GODMODE
+
856 protected:
+
857#endif
+
858 PhysicalLayer* phyLayer = NULL;
+
859 const LoRaWANBand_t* band = NULL;
+
860
+
861 // a buffer that holds all LW base parameters that should persist at all times!
+
862 uint8_t bufferNonces[RADIOLIB_LORAWAN_NONCES_BUF_SIZE] = { 0 };
+
863
+
864 // a buffer that holds all LW session parameters that preferably persist, but can be afforded to get lost
+
865 uint8_t bufferSession[RADIOLIB_LORAWAN_SESSION_BUF_SIZE] = { 0 };
+
866
+
867 uint8_t fOptsUp[RADIOLIB_LORAWAN_FHDR_FOPTS_MAX_LEN] = { 0 };
+
868 uint8_t fOptsDown[RADIOLIB_LORAWAN_FHDR_FOPTS_MAX_LEN] = { 0 };
+
869 uint8_t fOptsUpLen = 0;
+
870 uint8_t fOptsDownLen = 0;
+
871
+
872 uint16_t lwMode = RADIOLIB_LORAWAN_MODE_NONE;
+
873 uint8_t lwClass = RADIOLIB_LORAWAN_CLASS_A;
+
874 bool isActive = false;
+
875
+
876 uint64_t joinEUI = 0;
+
877 uint64_t devEUI = 0;
+
878 uint8_t nwkKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+
879 uint8_t appKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+
880
+
881 // the following is either provided by the network server (OTAA)
+
882 // or directly entered by the user (ABP)
+
883 uint32_t devAddr = 0;
+
884 uint8_t appSKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+
885 uint8_t fNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+
886 uint8_t sNwkSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+
887 uint8_t nwkSEncKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+
888 uint8_t jSIntKey[RADIOLIB_AES128_KEY_SIZE] = { 0 };
+
889
+
890 uint16_t keyCheckSum = 0;
+
891
+
892 // device-specific parameters, persistent through sessions
+
893 uint16_t devNonce = 0;
+
894 uint32_t joinNonce = 0;
+
895
+
896 // session-specific parameters
+
897 uint32_t homeNetId = 0;
+
898 uint8_t adrLimitExp = RADIOLIB_LORAWAN_ADR_ACK_LIMIT_EXP;
+
899 uint8_t adrDelayExp = RADIOLIB_LORAWAN_ADR_ACK_DELAY_EXP;
+
900 uint8_t nbTrans = 1; // Number of allowed frame retransmissions
+
901 uint8_t txPowerSteps = 0;
+
902 uint8_t txPowerMax = 0;
+
903 uint32_t fCntUp = 0;
+
904 uint32_t aFCntDown = 0;
+
905 uint32_t nFCntDown = 0;
+
906 uint32_t confFCntUp = RADIOLIB_LORAWAN_FCNT_NONE;
+
907 uint32_t confFCntDown = RADIOLIB_LORAWAN_FCNT_NONE;
+
908 uint32_t adrFCnt = 0;
+
909
+
910 // ADR is enabled by default
+
911 bool adrEnabled = true;
+
912
+
913 // duty cycle is set upon initialization and activated in regions that impose this
+
914 bool dutyCycleEnabled = false;
+
915 uint32_t dutyCycle = 0;
+
916
+
917 // dwell time is set upon initialization and activated in regions that impose this
+
918 uint16_t dwellTimeUp = 0;
+
919 uint16_t dwellTimeDn = 0;
+
920
+
921 RadioLibTime_t tUplink = 0; // scheduled uplink transmission time (internal clock)
+
922 RadioLibTime_t tDownlink = 0; // time at end of downlink reception
+
923
+
924 // enable/disable CSMA for LoRaWAN
+
925 bool csmaEnabled = false;
+
926
+
927 // maximum number of channel hops during CSMA
+
928 uint8_t maxChanges = RADIOLIB_LORAWAN_MAX_CHANGES_DEFAULT;
+
929
+
930 // number of backoff slots to be checked after DIFS phase.
+
931 // A random BO avoids collisions in the case where two or more nodes start the CSMA
+
932 // process at the same time.
+
933 uint8_t backoffMax = RADIOLIB_LORAWAN_BACKOFF_MAX_DEFAULT;
+
934
+
935 // number of CADs to estimate a clear CH
+
936 uint8_t difsSlots = RADIOLIB_LORAWAN_DIFS_DEFAULT;
+
937
+
938 // available channel frequencies from list passed during OTA activation
+
939 LoRaWANChannel_t channelPlan[2][RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS];
+
940
+
941 // currently configured channels for TX, RX1, RX2
+
942 LoRaWANChannel_t channels[3] = { RADIOLIB_LORAWAN_CHANNEL_NONE, RADIOLIB_LORAWAN_CHANNEL_NONE,
+
943 RADIOLIB_LORAWAN_CHANNEL_NONE };
+
944
+
945 // delays between the uplink and RX1/2 windows
+
946 // the first field is meaningless, but is used for offsetting for Rx windows 1 and 2
+
947 RadioLibTime_t rxDelays[3] = { 0, RADIOLIB_LORAWAN_RECEIVE_DELAY_1_MS, RADIOLIB_LORAWAN_RECEIVE_DELAY_2_MS };
+
948
+
949 // offset between TX and RX1 (such that RX1 has equal or lower DR)
+
950 uint8_t rx1DrOffset = 0;
+
951
+
952 // LoRaWAN revision (1.0 vs 1.1)
+
953 uint8_t rev = 0;
+
954
+
955 // Time on Air of last uplink
+
956 RadioLibTime_t lastToA = 0;
+
957
+
958 // timestamp to measure the RX1/2 delay (from uplink end)
+
959 RadioLibTime_t rxDelayStart = 0;
+
960
+
961 // timestamp when the Rx1/2 windows were closed (timeout or uplink received)
+
962 RadioLibTime_t rxDelayEnd = 0;
+
963
+
964 // device status - battery level
+
965 uint8_t battLevel = 0xFF;
+
966
+
967 // indicates whether an uplink has MAC commands as payload
+
968 bool isMACPayload = false;
+
969
+
970 // save the selected sub-band in case this must be restored in ADR control
+
971 uint8_t subBand = 0;
+
972
+
973 // allow port 226 for devices implementing TS011
+
974 bool TS011 = false;
+
975
+
976 // this will reset the device credentials, so the device starts completely new
+
977 void clearNonces();
+
978
+
979 // start a fresh session using default parameters
+
980 void createSession(uint16_t lwMode, uint8_t initialDr);
+
981
+
982 // setup Join-Request payload
+
983 void composeJoinRequest(uint8_t* joinRequestMsg);
+
984
+
985 // extract Join-Accept payload and start a new session
+
986 int16_t processJoinAccept(LoRaWANJoinEvent_t *joinEvent);
+
987
+
988 // a join-accept can piggy-back a set of channels or channel masks
+
989 void processCFList(const uint8_t* cfList);
+
990
+
991 // check whether payload length and fport are allowed
+
992 int16_t isValidUplink(uint8_t* len, uint8_t fPort);
+
993
+
994 // perform ADR backoff
+
995 void adrBackoff();
+
996
+
997 // create an encrypted uplink buffer, composing metadata, user data and MAC data
+
998 void composeUplink(const uint8_t* in, uint8_t lenIn, uint8_t* out, uint8_t fPort, bool isConfirmed);
+
999
+
1000 // generate and set the MIC of an uplink buffer (depends on selected channels)
+
1001 void micUplink(uint8_t* inOut, uint8_t lenInOut);
+
1002
+
1003 // transmit uplink buffer on a specified channel
+
1004 int16_t transmitUplink(const LoRaWANChannel_t* chnl, uint8_t* in, uint8_t len, bool retrans);
+
1005
+
1006 // wait for, open and listen during receive windows; only performs listening
+
1007 int16_t receiveCommon(uint8_t dir, const LoRaWANChannel_t* dlChannels, const RadioLibTime_t* dlDelays, uint8_t numWindows, RadioLibTime_t tReference);
+
1008
+
1009 // extract downlink payload and process MAC commands
+
1010 int16_t parseDownlink(uint8_t* data, size_t* len, LoRaWANEvent_t* event = NULL);
+
1011
+
1012 // execute mac command, return the number of processed bytes for sequential processing
+
1013 bool execMacCommand(uint8_t cid, uint8_t* optIn, uint8_t lenIn);
+
1014 bool execMacCommand(uint8_t cid, uint8_t* optIn, uint8_t lenIn, uint8_t* optOut);
+
1015
+
1016 // possible override for additional MAC commands that are not in the base specification
+
1017 virtual bool derivedMacHandler(uint8_t cid, uint8_t* optIn, uint8_t lenIn, uint8_t* optOut);
+
1018
+
1019 // pre-process a (set of) LinkAdrReq commands into one super-channel-mask + Tx/Dr/NbTrans fields
+
1020 void preprocessMacLinkAdr(uint8_t* mPtr, uint8_t cLen, uint8_t* mAdrOpt);
+
1021
+
1022 // post-process a (set of) LinkAdrAns commands depending on LoRaWAN version
+
1023 void postprocessMacLinkAdr(uint8_t* ack, uint8_t cLen);
+
1024
+
1025 // get the properties of a MAC command given a certain command ID
+
1026 int16_t getMacCommand(uint8_t cid, LoRaWANMacCommand_t* cmd);
+
1027
+
1028 // possible override for additional MAC commands that are not in the base specification
+
1029 virtual int16_t derivedMacFinder(uint8_t cid, LoRaWANMacCommand_t* cmd);
+
1030
+
1031 // get the length of a certain MAC command in a specific direction (up/down)
+
1032 // if inclusive is true, add one for the CID byte
+
1033 int16_t getMacLen(uint8_t cid, uint8_t* len, uint8_t dir, bool inclusive = false);
+
1034
+
1035 // find out of a MAC command should persist destruction
+
1036 // in uplink direction, some commands must persist if no downlink is received
+
1037 // in downlink direction, the user-accessible MAC commands remain available for retrieval
+
1038 bool isPersistentMacCommand(uint8_t cid, uint8_t dir);
+
1039
+
1040 // push MAC command to queue, done by copy
+
1041 int16_t pushMacCommand(uint8_t cid, const uint8_t* cOcts, uint8_t* out, uint8_t* lenOut, uint8_t dir);
+
1042
+
1043 // retrieve the payload of a certain MAC command, if present in the buffer
+
1044 int16_t getMacPayload(uint8_t cid, const uint8_t* in, uint8_t lenIn, uint8_t* out, uint8_t dir);
+
1045
+
1046 // delete a specific MAC command from queue, indicated by the command ID
+
1047 int16_t deleteMacCommand(uint8_t cid, uint8_t* inOut, uint8_t* lenInOut, uint8_t dir);
+
1048
+
1049 // clear a MAC buffer, possible retaining persistent MAC commands
+
1050 void clearMacCommands(uint8_t* inOut, uint8_t* lenInOut, uint8_t dir);
+
1051
+
1052 // configure the common physical layer properties (frequency, sync word etc.)
+
1053 int16_t setPhyProperties(const LoRaWANChannel_t* chnl, uint8_t dir, int8_t pwr, size_t pre = 0);
+
1054
+
1055 // Performs CSMA as per LoRa Alliance Technical Recommendation 13 (TR-013).
+
1056 bool csmaChannelClear(uint8_t difs, uint8_t numBackoff);
+
1057
+
1058 // perform a single CAD operation for the under SF/CH combination. Returns either busy or otherwise.
+
1059 bool cadChannelClear();
+
1060
+
1061 // (dynamic bands:) get or (fixed bands:) create a complete 80-bit channel mask for current configuration
+
1062 void getChannelPlanMask(uint64_t* chMaskGrp0123, uint32_t* chMaskGrp45);
+
1063
+
1064 // setup uplink/downlink channel data rates and frequencies
+
1065 // for dynamic channels, there is a small set of predefined channels
+
1066 // in case of JoinRequest, add some optional extra frequencies
+
1067 void selectChannelPlanDyn();
+
1068
+
1069 // setup uplink/downlink channel data rates and frequencies
+
1070 // for fixed bands, we only allow one sub-band at a time to be selected
+
1071 void selectChannelPlanFix();
+
1072
+
1073 // get the number of available channels,
+
1074 // along with a 16-bit mask indicating which channels can be used next for uplink/downlink
+
1075 uint8_t getAvailableChannels(uint16_t* mask);
+
1076
+
1077 // (re)set/restore which channels can be used next for uplink/downlink
+
1078 void setAvailableChannels(uint16_t mask);
+
1079
+
1080 // select a set of random TX/RX channels for up- and downlink
+
1081 int16_t selectChannels();
+
1082
+
1083 // apply a 96-bit channel mask
+
1084 bool applyChannelMask(uint64_t chMaskGrp0123, uint32_t chMaskGrp45);
+
1085
+
1086#if RADIOLIB_DEBUG_PROTOCOL
+
1087 // print the available channels through debug
+
1088 void printChannels();
+
1089#endif
+
1090
+
1091 // method to generate message integrity code
+
1092 uint32_t generateMIC(const uint8_t* msg, size_t len, uint8_t* key);
+
1093
+
1094 // method to verify message integrity code
+
1095 // it assumes that the MIC is the last 4 bytes of the message
+
1096 bool verifyMIC(uint8_t* msg, size_t len, uint8_t* key);
+
1097
+
1098 // find the first usable data rate for the given band
+
1099 int16_t findDataRate(uint8_t dr, DataRate_t* dataRate);
+
1100
+
1101 // function to encrypt and decrypt payloads (regular uplink/downlink)
+
1102 void processAES(const uint8_t* in, size_t len, uint8_t* key, uint8_t* out, uint32_t fCnt, uint8_t dir, uint8_t ctrId, bool counter);
+
1103
+
1104 // 16-bit checksum method that takes a uint8_t array of even length and calculates the checksum
+
1105 static uint16_t checkSum16(const uint8_t *key, uint16_t keyLen);
+
1106
+
1107 // check the integrity of a buffer using a 16-bit checksum located in the last two bytes of the buffer
+
1108 static int16_t checkBufferCommon(const uint8_t *buffer, uint16_t size);
+
1109
+
1110 // network-to-host conversion method - takes data from network packet and converts it to the host endians
+
1111 template<typename T>
+
1112 static T ntoh(const uint8_t* buff, size_t size = 0);
+
1113
+
1114 // host-to-network conversion method - takes data from host variable and and converts it to network packet endians
+
1115 template<typename T>
+
1116 static void hton(uint8_t* buff, T val, size_t size = 0);
+
1117};
-
1116
-
1117template<typename T>
-
1118T LoRaWANNode::ntoh(const uint8_t* buff, size_t size) {
-
1119 const uint8_t* buffPtr = buff;
-
1120 size_t targetSize = sizeof(T);
-
1121 if(size != 0) {
-
1122 targetSize = size;
-
1123 }
-
1124 T res = 0;
-
1125 for(size_t i = 0; i < targetSize; i++) {
-
1126 res |= (uint32_t)(*(buffPtr++)) << 8*i;
-
1127 }
-
1128 return(res);
-
1129}
-
1130
-
1131template<typename T>
-
1132void LoRaWANNode::hton(uint8_t* buff, T val, size_t size) {
-
1133 uint8_t* buffPtr = buff;
-
1134 size_t targetSize = sizeof(T);
-
1135 if(size != 0) {
-
1136 targetSize = size;
-
1137 }
-
1138 for(size_t i = 0; i < targetSize; i++) {
-
1139 *(buffPtr++) = val >> 8*i;
-
1140 }
-
1141}
-
1142
-
1143#endif
-
LoRaWAN-compatible node (class A device).
Definition LoRaWAN.h:522
+
1118
+
1119template<typename T>
+
1120T LoRaWANNode::ntoh(const uint8_t* buff, size_t size) {
+
1121 const uint8_t* buffPtr = buff;
+
1122 size_t targetSize = sizeof(T);
+
1123 if(size != 0) {
+
1124 targetSize = size;
+
1125 }
+
1126 T res = 0;
+
1127 for(size_t i = 0; i < targetSize; i++) {
+
1128 res |= (uint32_t)(*(buffPtr++)) << 8*i;
+
1129 }
+
1130 return(res);
+
1131}
+
1132
+
1133template<typename T>
+
1134void LoRaWANNode::hton(uint8_t* buff, T val, size_t size) {
+
1135 uint8_t* buffPtr = buff;
+
1136 size_t targetSize = sizeof(T);
+
1137 if(size != 0) {
+
1138 targetSize = size;
+
1139 }
+
1140 for(size_t i = 0; i < targetSize; i++) {
+
1141 *(buffPtr++) = val >> 8*i;
+
1142 }
+
1143}
+
1144
+
1145#endif
+
LoRaWAN-compatible node (class A device).
Definition LoRaWAN.h:524
void clearSession()
Clear an active session, so that the device will have to rejoin the network.
Definition LoRaWAN.cpp:278
virtual int16_t sendReceive(const char *strUp, uint8_t fPort, 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:43
-
int16_t setDatarate(uint8_t drUp)
Set uplink datarate. This should not be used when ADR is enabled.
Definition LoRaWAN.cpp:2624
-
void scheduleTransmission(RadioLibTime_t tUplink)
Set the exact time a transmission should occur. Note: this is the internal clock time....
Definition LoRaWAN.cpp:2757
-
RadioLibTime_t scanGuard
Rx window padding in milliseconds according to the spec, the Rx window must be at least enough time t...
Definition LoRaWAN.h:851
-
void setCSMA(bool csmaEnabled, uint8_t maxChanges=4, uint8_t backoffMax=0, uint8_t difsSlots=2)
Configures CSMA for LoRaWAN as per TR013, LoRa Alliance.
Definition LoRaWAN.cpp:2739
-
void setDutyCycle(bool enable=true, RadioLibTime_t msPerHour=0)
Toggle adherence to dutyCycle limits to on or off.
Definition LoRaWAN.cpp:2714
-
int16_t beginABP(uint32_t addr, const uint8_t *fNwkSIntKey, const uint8_t *sNwkSIntKey, const uint8_t *nwkSEncKey, const uint8_t *appSKey)
Set the device credentials and activation configuration.
Definition LoRaWAN.cpp:613
-
RadioLibTime_t timeUntilUplink()
Returns time in milliseconds until next uplink is available under dutyCycle limits.
Definition LoRaWAN.cpp:3265
-
void setDeviceStatus(uint8_t battLevel)
Set device status.
Definition LoRaWAN.cpp:2753
-
RadioLibTime_t dutyCycleInterval(RadioLibTime_t msPerHour, RadioLibTime_t airtime)
Calculate the minimum interval to adhere to a certain dutyCycle. This interval is based on the ToA of...
Definition LoRaWAN.cpp:3255
-
void setDwellTime(bool enable, RadioLibTime_t msPerUplink=0)
Set or disable uplink dwell time limitation; enabled by default if mandatory.
Definition LoRaWAN.cpp:2726
-
uint32_t getAFCntDown()
Returns the last application downlink's frame counter; also 0 if no application downlink occured yet.
Definition LoRaWAN.cpp:2773
-
RadioLibTime_t getLastToA()
Get the Time-on-air of the last uplink message (in milliseconds).
Definition LoRaWAN.cpp:2786
-
virtual int16_t activateABP(uint8_t initialDr=RADIOLIB_LORAWAN_DATA_RATE_UNUSED)
Join network by restoring ABP session or performing over-the-air activation. In this procedure,...
Definition LoRaWAN.cpp:958
-
bool TS009
TS009 Protocol Specification Verification switch (allows FPort 224 and cuts off uplink payload instea...
Definition LoRaWAN.h:837
+
int16_t setDatarate(uint8_t drUp)
Set uplink datarate. This should not be used when ADR is enabled.
Definition LoRaWAN.cpp:2619
+
void scheduleTransmission(RadioLibTime_t tUplink)
Set the exact time a transmission should occur. Note: this is the internal clock time....
Definition LoRaWAN.cpp:2752
+
RadioLibTime_t scanGuard
Rx window padding in milliseconds according to the spec, the Rx window must be at least enough time t...
Definition LoRaWAN.h:853
+
void setCSMA(bool csmaEnabled, uint8_t maxChanges=4, uint8_t backoffMax=0, uint8_t difsSlots=2)
Configures CSMA for LoRaWAN as per TR013, LoRa Alliance.
Definition LoRaWAN.cpp:2734
+
void setDutyCycle(bool enable=true, RadioLibTime_t msPerHour=0)
Toggle adherence to dutyCycle limits to on or off.
Definition LoRaWAN.cpp:2709
+
int16_t beginABP(uint32_t addr, const uint8_t *fNwkSIntKey, const uint8_t *sNwkSIntKey, const uint8_t *nwkSEncKey, const uint8_t *appSKey)
Set the device credentials and activation configuration.
Definition LoRaWAN.cpp:614
+
RadioLibTime_t timeUntilUplink()
Returns time in milliseconds until next uplink is available under dutyCycle limits.
Definition LoRaWAN.cpp:3260
+
void setDeviceStatus(uint8_t battLevel)
Set device status.
Definition LoRaWAN.cpp:2748
+
RadioLibTime_t dutyCycleInterval(RadioLibTime_t msPerHour, RadioLibTime_t airtime)
Calculate the minimum interval to adhere to a certain dutyCycle. This interval is based on the ToA of...
Definition LoRaWAN.cpp:3250
+
void setDwellTime(bool enable, RadioLibTime_t msPerUplink=0)
Set or disable uplink dwell time limitation; enabled by default if mandatory.
Definition LoRaWAN.cpp:2721
+
uint32_t getAFCntDown()
Returns the last application downlink's frame counter; also 0 if no application downlink occured yet.
Definition LoRaWAN.cpp:2768
+
RadioLibTime_t getLastToA()
Get the Time-on-air of the last uplink message (in milliseconds).
Definition LoRaWAN.cpp:2781
+
virtual int16_t activateABP(uint8_t initialDr=RADIOLIB_LORAWAN_DATA_RATE_UNUSED)
Join network by restoring ABP session or performing over-the-air activation. In this procedure,...
Definition LoRaWAN.cpp:959
+
bool TS009
TS009 Protocol Specification Verification switch (allows FPort 224 and cuts off uplink payload instea...
Definition LoRaWAN.h:839
uint8_t * getBufferNonces()
Returns the pointer to the internal buffer that holds the LW base parameters.
Definition LoRaWAN.cpp:227
uint8_t * getBufferSession()
Returns the pointer to the internal buffer that holds the LW session parameters.
Definition LoRaWAN.cpp:428
-
bool isActivated()
Whether there is an ongoing session active.
Definition LoRaWAN.cpp:1048
-
int16_t setTxPower(int8_t txPower)
Configure TX power of the radio module.
Definition LoRaWAN.cpp:2657
-
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:2475
-
uint32_t getNFCntDown()
Returns the last network downlink's frame counter; also 0 if no network downlink occured yet.
Definition LoRaWAN.cpp:2769
-
int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, const uint8_t *nwkKey, const uint8_t *appKey)
Set the device credentials and activation configuration.
Definition LoRaWAN.cpp:584
-
uint8_t getMaxPayloadLen()
Returns the maximum allowed uplink payload size given the current MAC state. Most importantly,...
Definition LoRaWAN.cpp:3274
-
virtual int16_t activateOTAA(uint8_t initialDr=RADIOLIB_LORAWAN_DATA_RATE_UNUSED, LoRaWANJoinEvent_t *joinEvent=NULL)
Join network by restoring OTAA session or performing over-the-air activation. By this procedure,...
Definition LoRaWAN.cpp:868
-
uint32_t getFCntUp()
Returns the last uplink's frame counter; also 0 if no uplink occured yet.
Definition LoRaWAN.cpp:2762
+
bool isActivated()
Whether there is an ongoing session active.
Definition LoRaWAN.cpp:1049
+
int16_t setTxPower(int8_t txPower)
Configure TX power of the radio module.
Definition LoRaWAN.cpp:2652
+
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:2470
+
uint32_t getNFCntDown()
Returns the last network downlink's frame counter; also 0 if no network downlink occured yet.
Definition LoRaWAN.cpp:2764
+
int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, const uint8_t *nwkKey, const uint8_t *appKey)
Set the device credentials and activation configuration.
Definition LoRaWAN.cpp:585
+
uint8_t getMaxPayloadLen()
Returns the maximum allowed uplink payload size given the current MAC state. Most importantly,...
Definition LoRaWAN.cpp:3269
+
virtual int16_t activateOTAA(uint8_t initialDr=RADIOLIB_LORAWAN_DATA_RATE_UNUSED, LoRaWANJoinEvent_t *joinEvent=NULL)
Join network by restoring OTAA session or performing over-the-air activation. By this procedure,...
Definition LoRaWAN.cpp:869
+
uint32_t getFCntUp()
Returns the last uplink's frame counter; also 0 if no uplink occured yet.
Definition LoRaWAN.cpp:2757
int16_t setBufferNonces(const uint8_t *persistentBuffer)
Fill the internal buffer that holds the LW base parameters with a supplied buffer.
Definition LoRaWAN.cpp:242
-
int16_t setRx2Dr(uint8_t dr)
Configure the Rx2 datarate for ABP mode. This should not be needed for LoRaWAN 1.1 as it is configure...
Definition LoRaWAN.cpp:2683
-
int16_t sendMacCommandReq(uint8_t cid)
Add a MAC command to the uplink queue. Only LinkCheck and DeviceTime are available to the user....
Definition LoRaWAN.cpp:2440
-
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:2464
-
void setADR(bool enable=true)
Toggle ADR to on or off.
Definition LoRaWAN.cpp:2710
+
int16_t setRx2Dr(uint8_t dr)
Configure the Rx2 datarate for ABP mode. This should not be needed for LoRaWAN 1.1 as it is configure...
Definition LoRaWAN.cpp:2678
+
int16_t sendMacCommandReq(uint8_t cid)
Add a MAC command to the uplink queue. Only LinkCheck and DeviceTime are available to the user....
Definition LoRaWAN.cpp:2435
+
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:2459
+
void setADR(bool enable=true)
Toggle ADR to on or off.
Definition LoRaWAN.cpp:2705
int16_t setBufferSession(const uint8_t *persistentBuffer)
Fill the internal buffer that holds the LW session parameters with a supplied buffer.
Definition LoRaWAN.cpp:460
-
uint32_t getDevAddr()
Returns the DevAddr of the device, regardless of OTAA or ABP mode.
Definition LoRaWAN.cpp:2782
-
void resetFCntDown()
Reset the downlink frame counters (application and network) This is unsafe and can possibly allow rep...
Definition LoRaWAN.cpp:2777
+
uint32_t getDevAddr()
Returns the DevAddr of the device, regardless of OTAA or ABP mode.
Definition LoRaWAN.cpp:2777
+
void resetFCntDown()
Reset the downlink frame counters (application and network) This is unsafe and can possibly allow rep...
Definition LoRaWAN.cpp:2772
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition PhysicalLayer.h:151
unsigned long RadioLibTime_t
Type used for durations in RadioLib.
Definition TypeDef.h:642
-
Structure to save information about LoRaWAN band.
Definition LoRaWAN.h:367
-
int8_t powerMax
Maximum allowed output power in this band in dBm.
Definition LoRaWAN.h:384
-
bool txParamSupported
Whether this band implements the MAC command TxParamSetupReq.
Definition LoRaWAN.h:399
-
LoRaWANChannel_t txAck[2]
Relay channels for ACK downlink.
Definition LoRaWAN.h:422
-
RadioLibTime_t dutyCycle
Number of milliseconds per hour of allowed Time-on-Air.
Definition LoRaWAN.h:390
-
uint8_t dataRates[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES]
The corresponding datarates, bandwidths and coding rates for DR index.
Definition LoRaWAN.h:425
-
RadioLibTime_t dwellTimeUp
Maximum dwell time per uplink message in milliseconds.
Definition LoRaWAN.h:393
-
LoRaWANChannel_t txWoR[2]
Relay channels for WoR uplink.
Definition LoRaWAN.h:419
-
uint32_t freqMin
Minimum allowed frequency (coded in 100 Hz steps)
Definition LoRaWAN.h:375
-
uint8_t payloadLenMax[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES]
Array of allowed maximum application payload lengths for each data rate (N-value)
Definition LoRaWAN.h:381
-
LoRaWANChannel_t txFreqs[3]
A set of default uplink (TX) channels for dynamic bands.
Definition LoRaWAN.h:402
-
int8_t powerNumSteps
Number of power steps in this band.
Definition LoRaWAN.h:387
-
LoRaWANChannelSpan_t txSpans[2]
Default uplink (TX) channel spans for fixed bands, including Join-Request parameters.
Definition LoRaWAN.h:408
-
uint8_t bandNum
Identier for this band.
Definition LoRaWAN.h:369
-
uint32_t freqMax
Maximum allowed frequency (coded in 100 Hz steps)
Definition LoRaWAN.h:378
-
uint8_t bandType
Whether the channels are fixed per specification, or dynamically allocated through the network (plus ...
Definition LoRaWAN.h:372
-
LoRaWANChannel_t rx2
Backup channel for downlink (RX2) window.
Definition LoRaWAN.h:416
-
uint8_t numTxSpans
The number of TX channel spans for fixed bands.
Definition LoRaWAN.h:405
-
RadioLibTime_t dwellTimeDn
Maximum dwell time per downlink message in milliseconds.
Definition LoRaWAN.h:396
-
LoRaWANChannelSpan_t rx1Span
Default downlink (RX1) channel span for fixed bands.
Definition LoRaWAN.h:411
+
Structure to save information about LoRaWAN band.
Definition LoRaWAN.h:369
+
int8_t powerMax
Maximum allowed output power in this band in dBm.
Definition LoRaWAN.h:386
+
bool txParamSupported
Whether this band implements the MAC command TxParamSetupReq.
Definition LoRaWAN.h:401
+
LoRaWANChannel_t txAck[2]
Relay channels for ACK downlink.
Definition LoRaWAN.h:424
+
RadioLibTime_t dutyCycle
Number of milliseconds per hour of allowed Time-on-Air.
Definition LoRaWAN.h:392
+
uint8_t dataRates[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES]
The corresponding datarates, bandwidths and coding rates for DR index.
Definition LoRaWAN.h:427
+
RadioLibTime_t dwellTimeUp
Maximum dwell time per uplink message in milliseconds.
Definition LoRaWAN.h:395
+
LoRaWANChannel_t txWoR[2]
Relay channels for WoR uplink.
Definition LoRaWAN.h:421
+
uint32_t freqMin
Minimum allowed frequency (coded in 100 Hz steps)
Definition LoRaWAN.h:377
+
uint8_t payloadLenMax[RADIOLIB_LORAWAN_CHANNEL_NUM_DATARATES]
Array of allowed maximum application payload lengths for each data rate (N-value)
Definition LoRaWAN.h:383
+
LoRaWANChannel_t txFreqs[3]
A set of default uplink (TX) channels for dynamic bands.
Definition LoRaWAN.h:404
+
int8_t powerNumSteps
Number of power steps in this band.
Definition LoRaWAN.h:389
+
LoRaWANChannelSpan_t txSpans[2]
Default uplink (TX) channel spans for fixed bands, including Join-Request parameters.
Definition LoRaWAN.h:410
+
uint8_t bandNum
Identier for this band.
Definition LoRaWAN.h:371
+
uint32_t freqMax
Maximum allowed frequency (coded in 100 Hz steps)
Definition LoRaWAN.h:380
+
uint8_t bandType
Whether the channels are fixed per specification, or dynamically allocated through the network (plus ...
Definition LoRaWAN.h:374
+
LoRaWANChannel_t rx2
Backup channel for downlink (RX2) window.
Definition LoRaWAN.h:418
+
uint8_t numTxSpans
The number of TX channel spans for fixed bands.
Definition LoRaWAN.h:407
+
RadioLibTime_t dwellTimeDn
Maximum dwell time per downlink message in milliseconds.
Definition LoRaWAN.h:398
+
LoRaWANChannelSpan_t rx1Span
Default downlink (RX1) channel span for fixed bands.
Definition LoRaWAN.h:413
IDs of all currently supported bands.
-
Structure to save information about LoRaWAN channels. To save space, adjacent channels are saved in "...
Definition LoRaWAN.h:308
-
bool available
Whether this channel is available for channel selection.
Definition LoRaWAN.h:328
-
uint8_t dr
Datarate currently in use on this channel.
Definition LoRaWAN.h:325
-
uint32_t freq
The channel frequency (coded in 100 Hz steps)
Definition LoRaWAN.h:316
-
uint8_t idx
The channel number, as specified by defaults or the network.
Definition LoRaWAN.h:313
-
uint8_t drMin
Minimum allowed datarate for this channel.
Definition LoRaWAN.h:319
-
bool enabled
Whether this channel is enabled (can be used) or is disabled.
Definition LoRaWAN.h:310
-
uint8_t drMax
Maximum allowed datarate for this channel (inclusive)
Definition LoRaWAN.h:322
-
Structure to save information about LoRaWAN channels. To save space, adjacent channels are saved in "...
Definition LoRaWAN.h:340
-
uint8_t drJoinRequest
Allowed data rates for a join request message.
Definition LoRaWAN.h:357
-
uint32_t freqStart
Center frequency of the first channel in span (coded in 100 Hz steps)
Definition LoRaWAN.h:345
-
uint8_t numChannels
Total number of channels in the span.
Definition LoRaWAN.h:342
-
uint8_t drMax
Maximum allowed datarate for all channels in this span (inclusive)
Definition LoRaWAN.h:354
-
uint32_t freqStep
Frequency step between adjacent channels (coded in 100 Hz steps)
Definition LoRaWAN.h:348
-
uint8_t drMin
Minimum allowed datarate for all channels in this span.
Definition LoRaWAN.h:351
-
Structure to save extra information about uplink/downlink event.
Definition LoRaWAN.h:485
-
float freq
Frequency in MHz.
Definition LoRaWAN.h:503
-
bool confirmed
Whether the event is confirmed or not (e.g., confirmed uplink sent by user application)
Definition LoRaWAN.h:490
-
uint8_t fPort
Port number.
Definition LoRaWAN.h:512
-
int16_t power
Transmit power in dBm for uplink, or RSSI for downlink.
Definition LoRaWAN.h:506
-
bool confirming
Whether the event is confirming a previous request (e.g., server downlink reply to confirmed uplink s...
Definition LoRaWAN.h:494
-
uint8_t datarate
Datarate.
Definition LoRaWAN.h:500
-
uint8_t dir
Event direction, one of RADIOLIB_LORAWAN_CHANNEL_DIR_*.
Definition LoRaWAN.h:487
-
uint8_t nbTrans
Number of times this uplink was transmitted (ADR)
Definition LoRaWAN.h:515
-
uint32_t fCnt
The appropriate frame counter - for different events, different frame counters will be reported!
Definition LoRaWAN.h:509
-
bool frmPending
Whether further downlink messages are pending on the server side.
Definition LoRaWAN.h:497
-
Structure to save extra information about activation event.
Definition LoRaWAN.h:470
-
bool newSession
Whether a new session was started.
Definition LoRaWAN.h:472
-
uint32_t joinNonce
The received Join-Request JoinNonce value.
Definition LoRaWAN.h:478
-
uint16_t devNonce
The transmitted Join-Request DevNonce value.
Definition LoRaWAN.h:475
-
MAC command specification structure.
Definition LoRaWAN.h:215
-
const uint8_t lenDn
Uplink message length.
Definition LoRaWAN.h:220
-
const bool user
Whether this MAC command can be issued by the user or not.
Definition LoRaWAN.h:229
-
const uint8_t cid
Command ID.
Definition LoRaWAN.h:217
-
const uint8_t lenUp
Downlink message length.
Definition LoRaWAN.h:223
-
const bool persist
Some commands must be resent until Class A downlink received.
Definition LoRaWAN.h:226
+
Structure to save information about LoRaWAN channels. To save space, adjacent channels are saved in "...
Definition LoRaWAN.h:310
+
bool available
Whether this channel is available for channel selection.
Definition LoRaWAN.h:330
+
uint8_t dr
Datarate currently in use on this channel.
Definition LoRaWAN.h:327
+
uint32_t freq
The channel frequency (coded in 100 Hz steps)
Definition LoRaWAN.h:318
+
uint8_t idx
The channel number, as specified by defaults or the network.
Definition LoRaWAN.h:315
+
uint8_t drMin
Minimum allowed datarate for this channel.
Definition LoRaWAN.h:321
+
bool enabled
Whether this channel is enabled (can be used) or is disabled.
Definition LoRaWAN.h:312
+
uint8_t drMax
Maximum allowed datarate for this channel (inclusive)
Definition LoRaWAN.h:324
+
Structure to save information about LoRaWAN channels. To save space, adjacent channels are saved in "...
Definition LoRaWAN.h:342
+
uint8_t drJoinRequest
Allowed data rates for a join request message.
Definition LoRaWAN.h:359
+
uint32_t freqStart
Center frequency of the first channel in span (coded in 100 Hz steps)
Definition LoRaWAN.h:347
+
uint8_t numChannels
Total number of channels in the span.
Definition LoRaWAN.h:344
+
uint8_t drMax
Maximum allowed datarate for all channels in this span (inclusive)
Definition LoRaWAN.h:356
+
uint32_t freqStep
Frequency step between adjacent channels (coded in 100 Hz steps)
Definition LoRaWAN.h:350
+
uint8_t drMin
Minimum allowed datarate for all channels in this span.
Definition LoRaWAN.h:353
+
Structure to save extra information about uplink/downlink event.
Definition LoRaWAN.h:487
+
float freq
Frequency in MHz.
Definition LoRaWAN.h:505
+
bool confirmed
Whether the event is confirmed or not (e.g., confirmed uplink sent by user application)
Definition LoRaWAN.h:492
+
uint8_t fPort
Port number.
Definition LoRaWAN.h:514
+
int16_t power
Transmit power in dBm for uplink, or RSSI for downlink.
Definition LoRaWAN.h:508
+
bool confirming
Whether the event is confirming a previous request (e.g., server downlink reply to confirmed uplink s...
Definition LoRaWAN.h:496
+
uint8_t datarate
Datarate.
Definition LoRaWAN.h:502
+
uint8_t dir
Event direction, one of RADIOLIB_LORAWAN_CHANNEL_DIR_*.
Definition LoRaWAN.h:489
+
uint8_t nbTrans
Number of times this uplink was transmitted (ADR)
Definition LoRaWAN.h:517
+
uint32_t fCnt
The appropriate frame counter - for different events, different frame counters will be reported!
Definition LoRaWAN.h:511
+
bool frmPending
Whether further downlink messages are pending on the server side.
Definition LoRaWAN.h:499
+
Structure to save extra information about activation event.
Definition LoRaWAN.h:472
+
bool newSession
Whether a new session was started.
Definition LoRaWAN.h:474
+
uint32_t joinNonce
The received Join-Request JoinNonce value.
Definition LoRaWAN.h:480
+
uint16_t devNonce
The transmitted Join-Request DevNonce value.
Definition LoRaWAN.h:477
+
MAC command specification structure.
Definition LoRaWAN.h:217
+
const uint8_t lenDn
Uplink message length.
Definition LoRaWAN.h:222
+
const bool user
Whether this MAC command can be issued by the user or not.
Definition LoRaWAN.h:231
+
const uint8_t cid
Command ID.
Definition LoRaWAN.h:219
+
const uint8_t lenUp
Downlink message length.
Definition LoRaWAN.h:225
+
const bool persist
Some commands must be resent until Class A downlink received.
Definition LoRaWAN.h:228
Common data rate structure.
Definition PhysicalLayer.h:74
diff --git a/_morse_8h_source.html b/_morse_8h_source.html index 701b3da9..68f56e89 100644 --- a/_morse_8h_source.html +++ b/_morse_8h_source.html @@ -231,8 +231,8 @@ $(document).ready(function(){initNavTree('_morse_8h_source.html',''); initResiza
172 uint32_t pauseCounter = 0;
173 RadioLibTime_t pauseStart = 0;
174
-
175 size_t printNumber(unsigned long, uint8_t);
-
176 size_t printFloat(double, uint8_t);
+
175 size_t printNumber(unsigned long, uint8_t) override;
+
176 size_t printFloat(double, uint8_t) override;
177
178 int16_t transmitDirect(uint32_t freq = 0, uint32_t freqHz = 0);
179 int16_t standby();
@@ -243,9 +243,9 @@ $(document).ready(function(){initNavTree('_morse_8h_source.html',''); initResiza
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition AFSK.h:16
Client for Morse Code communication. The public interface is the same as Arduino Serial.
Definition Morse.h:94
size_t startSignal()
Send start signal.
Definition Morse.cpp:41
-
size_t write(uint8_t b) override
Write one byte. Implementation of interface of the RadioLibPrint/Print class.
Definition Morse.cpp:115
+
size_t write(uint8_t b) override
Write one byte. Implementation of interface of the RadioLibPrint/Print class.
Definition Morse.cpp:116
int16_t begin(float base, uint8_t speed=20)
Initialization method.
Definition Morse.cpp:23
-
int read(uint8_t *symbol, uint8_t *len, float low=0.75f, float high=1.25f)
Read Morse tone on input pin.
Definition Morse.cpp:63
+
int read(uint8_t *symbol, uint8_t *len, float low=0.75f, float high=1.25f)
Read Morse tone on input pin.
Definition Morse.cpp:64
static char decode(uint8_t symbol, uint8_t len)
Decode Morse symbol to ASCII.
Definition Morse.cpp:45
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition PhysicalLayer.h:151
Printing class, based on Arduino Print class with additional encodings.
Definition Print.h:17
diff --git a/_pager_8h_source.html b/_pager_8h_source.html index f7b6007e..7d5f817b 100644 --- a/_pager_8h_source.html +++ b/_pager_8h_source.html @@ -172,7 +172,7 @@ $(document).ready(function(){initNavTree('_pager_8h_source.html',''); initResiza
100
109 int16_t transmit(const char* str, uint32_t addr, uint8_t encoding = RADIOLIB_PAGER_BCD, uint8_t function = RADIOLIB_PAGER_FUNC_AUTO);
110
-
120 int16_t transmit(uint8_t* data, size_t len, uint32_t addr, uint8_t encoding = RADIOLIB_PAGER_BCD, uint8_t function = RADIOLIB_PAGER_FUNC_AUTO);
+
120 int16_t transmit(const uint8_t* data, size_t len, uint32_t addr, uint8_t encoding = RADIOLIB_PAGER_BCD, uint8_t function = RADIOLIB_PAGER_FUNC_AUTO);
121
122 #if !RADIOLIB_EXCLUDE_DIRECT_RECEIVE
131 int16_t startReceive(uint32_t pin, uint32_t addr, uint32_t mask = 0xFFFFF);
@@ -206,7 +206,7 @@ $(document).ready(function(){initNavTree('_pager_8h_source.html',''); initResiza
190 size_t filterNumAddresses = 0;
191 bool inv = false;
192
-
193 void write(uint32_t* data, size_t len);
+
193 void write(const uint32_t* data, size_t len);
194 void write(uint32_t codeWord);
195 int16_t startReceiveCommon();
196 bool addressMatched(uint32_t addr);
diff --git a/_physical_layer_8h_source.html b/_physical_layer_8h_source.html index 0bd858cf..005d1808 100644 --- a/_physical_layer_8h_source.html +++ b/_physical_layer_8h_source.html @@ -418,7 +418,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:54
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:522
+
LoRaWAN-compatible node (class A device).
Definition LoRaWAN.h:524
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition Module.h:73
Client for Morse Code communication. The public interface is the same as Arduino Serial.
Definition Morse.h:94
Client for Pager communication.
Definition Pager.h:62
diff --git a/_print_8h_source.html b/_print_8h_source.html index f4f85326..0a1f594b 100644 --- a/_print_8h_source.html +++ b/_print_8h_source.html @@ -159,8 +159,8 @@ $(document).ready(function(){initNavTree('_print_8h_source.html',''); initResiza
62 uint8_t encoding = RADIOLIB_ASCII_EXTENDED;
63 const char* lineFeed = "\r\n";
64
-
65 size_t printNumber(unsigned long, uint8_t);
-
66 size_t printFloat(double, uint8_t);
+
65 virtual size_t printNumber(unsigned long, uint8_t);
+
66 virtual size_t printFloat(double, uint8_t);
67
68};
diff --git a/_s_x1272_8h_source.html b/_s_x1272_8h_source.html index b8445d44..84460ac3 100644 --- a/_s_x1272_8h_source.html +++ b/_s_x1272_8h_source.html @@ -196,7 +196,7 @@ $(document).ready(function(){initNavTree('_s_x1272_8h_source.html',''); initResi
104
105 // basic methods
106
-
121 int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
121 virtual int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
122
135 int16_t beginFSK(float freq = 915.0, float br = 4.8, float freqDev = 5.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
136
@@ -208,7 +208,7 @@ $(document).ready(function(){initNavTree('_s_x1272_8h_source.html',''); initResi
150
156 int16_t setBandwidth(float bw);
157
-
163 int16_t setSpreadingFactor(uint8_t sf);
+
163 virtual int16_t setSpreadingFactor(uint8_t sf);
164
170 int16_t setCodingRate(uint8_t cr);
171
@@ -255,7 +255,7 @@ $(document).ready(function(){initNavTree('_s_x1272_8h_source.html',''); initResi
317 int16_t setSpreadingFactorRaw(uint8_t newSpreadingFactor);
318 int16_t setCodingRateRaw(uint8_t newCodingRate);
319
-
320 int16_t configFSK();
+
320 int16_t configFSK() override;
321 void errataFix(bool rx) override;
322
323#if !RADIOLIB_GODMODE
@@ -282,7 +282,7 @@ $(document).ready(function(){initNavTree('_s_x1272_8h_source.html',''); initResi
int16_t implicitHeader(size_t len)
Set implicit header mode for future reception/transmission. Required for spreading factor 6.
Definition SX1272.cpp:499
float getRSSI() override
Gets recorded signal strength indicator. Overload with packet mode enabled for PhysicalLayer compatib...
Definition SX1272.cpp:439
int16_t setDataRate(DataRate_t dr) override
Set data.
Definition SX1272.cpp:226
-
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode.
Definition SX1272.cpp:134
+
virtual int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode.
Definition SX1272.cpp:134
int16_t beginFSK(float freq=915.0, float br=4.8, float freqDev=5.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition SX1272.cpp:41
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK...
Definition SX1272.cpp:374
int16_t setCodingRate(uint8_t cr)
Sets LoRa link coding rate denominator. Allowed values range from 5 to 8. Only available in LoRa mode...
Definition SX1272.cpp:188
@@ -292,7 +292,7 @@ $(document).ready(function(){initNavTree('_s_x1272_8h_source.html',''); initResi
int16_t setFrequency(float freq) override
Sets carrier frequency. Allowed values range from 860.0 MHz to 1020.0 MHz.
Definition SX1272.cpp:85
int16_t setGain(uint8_t gain)
Sets gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is...
Definition SX1272.cpp:337
int16_t explicitHeader()
Set explicit header mode for future reception/transmission.
Definition SX1272.cpp:504
-
int16_t begin(float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition SX1272.cpp:9
+
virtual int16_t begin(float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition SX1272.cpp:9
int16_t setOutputPower(int8_t power) override
Sets transmission output power. Allowed values range from -1 to 14 dBm (RFO pin) or +2 to +20 dBm (PA...
Definition SX1272.cpp:278
Base class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from thi...
Definition SX127x.h:583
Common data rate structure.
Definition PhysicalLayer.h:74
diff --git a/_s_x1273_8h_source.html b/_s_x1273_8h_source.html index 60fb90e8..de560a2d 100644 --- a/_s_x1273_8h_source.html +++ b/_s_x1273_8h_source.html @@ -117,11 +117,11 @@ $(document).ready(function(){initNavTree('_s_x1273_8h_source.html',''); initResi
24
25 // basic methods
26
-
41 int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
41 int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0) override;
42
43 // configuration methods
44
-
50 int16_t setSpreadingFactor(uint8_t sf);
+
50 int16_t setSpreadingFactor(uint8_t sf) override;
51
57 int16_t setDataRate(DataRate_t dr) override;
58
@@ -142,9 +142,9 @@ $(document).ready(function(){initNavTree('_s_x1273_8h_source.html',''); initResi
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition Module.h:73
Derived class for SX1272 modules. Also used as base class for SX1273. Both modules use the same basic...
Definition SX1272.h:94
Derived class for SX1273 modules. Overrides some methods from SX1272 due to different parameter range...
Definition SX1273.h:14
-
int16_t begin(float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition SX1273.cpp:8
-
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode.
Definition SX1273.cpp:40
int16_t checkDataRate(DataRate_t dr) override
Check the data rate can be configured by this module.
Definition SX1273.cpp:95
+
int16_t begin(float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0) override
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition SX1273.cpp:8
+
int16_t setSpreadingFactor(uint8_t sf) override
Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode.
Definition SX1273.cpp:40
int16_t setDataRate(DataRate_t dr) override
Set data.
Definition SX1273.cpp:70
int16_t setModem(ModemType_t modem) override
Set modem for the radio to use. Will perform full reset and reconfigure the radio using its default p...
Definition SX1273.cpp:118
Common data rate structure.
Definition PhysicalLayer.h:74
diff --git a/_s_x1276_8h_source.html b/_s_x1276_8h_source.html index f649aa1d..398eb91b 100644 --- a/_s_x1276_8h_source.html +++ b/_s_x1276_8h_source.html @@ -117,9 +117,9 @@ $(document).ready(function(){initNavTree('_s_x1276_8h_source.html',''); initResi
24
25 // basic methods
26
-
41 int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
41 int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0) override;
42
-
55 int16_t beginFSK(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
+
55 int16_t beginFSK(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false) override;
56
57 // configuration methods
58
@@ -147,9 +147,9 @@ $(document).ready(function(){initNavTree('_s_x1276_8h_source.html',''); initResi
Only exists as alias for SX1276, since there seems to be no difference between RFM96 and SX1276 modul...
Derived class for SX1276 modules. Overrides some methods from SX1278 due to different parameter range...
Definition SX1276.h:14
int16_t setModem(ModemType_t modem) override
Set modem for the radio to use. Will perform full reset and reconfigure the radio using its default p...
Definition SX1276.cpp:82
+
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0) override
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition SX1276.cpp:8
int16_t setFrequency(float freq) override
Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz.
Definition SX1276.cpp:71
-
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition SX1276.cpp:8
-
int16_t beginFSK(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition SX1276.cpp:40
+
int16_t beginFSK(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false) override
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition SX1276.cpp:40
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279,...
Definition SX1278.h:105
diff --git a/_s_x1277_8h_source.html b/_s_x1277_8h_source.html index fffd13de..c3ddefb7 100644 --- a/_s_x1277_8h_source.html +++ b/_s_x1277_8h_source.html @@ -117,15 +117,15 @@ $(document).ready(function(){initNavTree('_s_x1277_8h_source.html',''); initResi
24
25 // basic methods
26
-
41 int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
41 int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0) override;
42
-
55 int16_t beginFSK(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
+
55 int16_t beginFSK(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false) override;
56
57 // configuration methods
58
64 int16_t setFrequency(float freq) override;
65
-
71 int16_t setSpreadingFactor(uint8_t sf);
+
71 int16_t setSpreadingFactor(uint8_t sf) override;
72
78 int16_t setDataRate(DataRate_t dr) override;
79
@@ -148,13 +148,13 @@ $(document).ready(function(){initNavTree('_s_x1277_8h_source.html',''); initResi
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition Module.h:73
RFM97
Only exists as alias for SX1277, since there seems to be no difference between RFM97 and SX1277 modul...
SX1277
Derived class for SX1277 modules. Overrides some methods from SX1278 due to different parameter range...
Definition SX1277.h:14
-
SX1277::setSpreadingFactor
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode.
Definition SX1277.cpp:82
-
SX1277::begin
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition SX1277.cpp:8
+
SX1277::beginFSK
int16_t beginFSK(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false) override
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition SX1277.cpp:40
SX1277::setDataRate
int16_t setDataRate(DataRate_t dr) override
Set data.
Definition SX1277.cpp:112
-
SX1277::beginFSK
int16_t beginFSK(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition SX1277.cpp:40
SX1277::setFrequency
int16_t setFrequency(float freq) override
Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz.
Definition SX1277.cpp:71
SX1277::setModem
int16_t setModem(ModemType_t modem) override
Set modem for the radio to use. Will perform full reset and reconfigure the radio using its default p...
Definition SX1277.cpp:160
SX1277::checkDataRate
int16_t checkDataRate(DataRate_t dr) override
Check the data rate can be configured by this module.
Definition SX1277.cpp:137
+
SX1277::setSpreadingFactor
int16_t setSpreadingFactor(uint8_t sf) override
Sets LoRa link spreading factor. Allowed values range from 6 to 9. Only available in LoRa mode.
Definition SX1277.cpp:82
+
SX1277::begin
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0) override
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition SX1277.cpp:8
SX1278
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279,...
Definition SX1278.h:105
DataRate_t
Common data rate structure.
Definition PhysicalLayer.h:74
diff --git a/_s_x1278_8h_source.html b/_s_x1278_8h_source.html index 060e7e34..061e25a9 100644 --- a/_s_x1278_8h_source.html +++ b/_s_x1278_8h_source.html @@ -207,9 +207,9 @@ $(document).ready(function(){initNavTree('_s_x1278_8h_source.html',''); initResi
115
116 // basic methods
117
-
132 int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
132 virtual int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
133
-
146 int16_t beginFSK(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
+
146 virtual int16_t beginFSK(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
147
151 void reset() override;
152
@@ -219,7 +219,7 @@ $(document).ready(function(){initNavTree('_s_x1278_8h_source.html',''); initResi
161
167 int16_t setBandwidth(float bw);
168
-
174 int16_t setSpreadingFactor(uint8_t sf);
+
174 virtual int16_t setSpreadingFactor(uint8_t sf);
175
181 int16_t setCodingRate(uint8_t cr);
182
@@ -266,7 +266,7 @@ $(document).ready(function(){initNavTree('_s_x1278_8h_source.html',''); initResi
329 int16_t setSpreadingFactorRaw(uint8_t newSpreadingFactor);
330 int16_t setCodingRateRaw(uint8_t newCodingRate);
331
-
332 int16_t configFSK();
+
332 int16_t configFSK() override;
333 void errataFix(bool rx) override;
334
335#if !RADIOLIB_GODMODE
@@ -298,14 +298,14 @@ $(document).ready(function(){initNavTree('_s_x1278_8h_source.html',''); initResi
SX1278::explicitHeader
int16_t explicitHeader()
Set explicit header mode for future reception/transmission.
Definition SX1278.cpp:542
SX1278::checkDataRate
int16_t checkDataRate(DataRate_t dr) override
Check the data rate can be configured by this module.
Definition SX1278.cpp:269
SX1278::setCodingRate
int16_t setCodingRate(uint8_t cr)
Sets LoRa link coding rate denominator. Allowed values range from 5 to 8. Only available in LoRa mode...
Definition SX1278.cpp:202
-
SX1278::beginFSK
int16_t beginFSK(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition SX1278.cpp:41
-
SX1278::begin
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition SX1278.cpp:9
+
SX1278::beginFSK
virtual int16_t beginFSK(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition SX1278.cpp:41
+
SX1278::begin
virtual int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition SX1278.cpp:9
SX1278::setGain
int16_t setGain(uint8_t gain)
Sets gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is...
Definition SX1278.cpp:366
SX1278::checkOutputPower
int16_t checkOutputPower(int8_t power, int8_t *clipped) override
Check if output power is configurable. This method is needed for compatibility with PhysicalLayer::ch...
Definition SX1278.cpp:338
SX1278::setCRC
int16_t setCRC(bool enable, bool mode=false)
Enables/disables CRC check of received packets.
Definition SX1278.cpp:485
SX1278::setFrequency
int16_t setFrequency(float freq) override
Sets carrier frequency. Allowed values range from 137.0 MHz to 525.0 MHz.
Definition SX1278.cpp:85
SX1278::autoLDRO
int16_t autoLDRO()
Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method,...
Definition SX1278.cpp:528
-
SX1278::setSpreadingFactor
int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode.
Definition SX1278.cpp:148
+
SX1278::setSpreadingFactor
virtual int16_t setSpreadingFactor(uint8_t sf)
Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode.
Definition SX1278.cpp:148
SX1278::setDataShaping
int16_t setDataShaping(uint8_t sh) override
Sets Gaussian filter bandwidth-time product that will be used for data shaping. Only available in FSK...
Definition SX1278.cpp:404
SX1278::setBitRate
int16_t setBitRate(float br) override
Sets FSK bit rate. Allowed values range from 0.5 to 300 kbps. Only available in FSK mode.
Definition SX1278.cpp:236
SX127x
Base class for SX127x series. All derived classes for SX127x (e.g. SX1278 or SX1272) inherit from thi...
Definition SX127x.h:583
diff --git a/_s_x1279_8h_source.html b/_s_x1279_8h_source.html index 046b7985..8ea313ff 100644 --- a/_s_x1279_8h_source.html +++ b/_s_x1279_8h_source.html @@ -117,9 +117,9 @@ $(document).ready(function(){initNavTree('_s_x1279_8h_source.html',''); initResi
24
25 // basic methods
26
-
41 int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0);
+
41 int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 10, uint16_t preambleLength = 8, uint8_t gain = 0) override;
42
-
55 int16_t beginFSK(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false);
+
55 int16_t beginFSK(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 125.0, int8_t power = 10, uint16_t preambleLength = 16, bool enableOOK = false) override;
56
57 // configuration methods
58
@@ -140,9 +140,9 @@ $(document).ready(function(){initNavTree('_s_x1279_8h_source.html',''); initResi
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition Module.h:73
SX1278
Derived class for SX1278 modules. Also used as base class for SX1276, SX1277, SX1279,...
Definition SX1278.h:105
SX1279
Derived class for SX1279 modules. Overrides some methods from SX1278 due to different parameter range...
Definition SX1279.h:14
-
SX1279::begin
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition SX1279.cpp:8
-
SX1279::beginFSK
int16_t beginFSK(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition SX1279.cpp:40
+
SX1279::beginFSK
int16_t beginFSK(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false) override
FSK modem initialization method. Must be called at least once from Arduino sketch to initialize the m...
Definition SX1279.cpp:40
SX1279::setFrequency
int16_t setFrequency(float freq) override
Sets carrier frequency. Allowed values range from 137.0 MHz to 960.0 MHz.
Definition SX1279.cpp:71
+
SX1279::begin
int16_t begin(float freq=434.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0) override
LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the ...
Definition SX1279.cpp:8
SX1279::setModem
int16_t setModem(ModemType_t modem) override
Set modem for the radio to use. Will perform full reset and reconfigure the radio using its default p...
Definition SX1279.cpp:82
diff --git a/_s_x127x_8h_source.html b/_s_x127x_8h_source.html index 581eb450..6e122964 100644 --- a/_s_x127x_8h_source.html +++ b/_s_x127x_8h_source.html @@ -690,11 +690,11 @@ $(document).ready(function(){initNavTree('_s_x127x_8h_source.html',''); initResi
598
599 // basic methods
600
-
609 int16_t begin(uint8_t* chipVersions, uint8_t numVersions, uint8_t syncWord, uint16_t preambleLength);
+
609 int16_t begin(const uint8_t* chipVersions, uint8_t numVersions, uint8_t syncWord, uint16_t preambleLength);
610
614 virtual void reset() = 0;
615
-
626 int16_t beginFSK(uint8_t* chipVersions, uint8_t numVersions, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK);
+
626 int16_t beginFSK(const uint8_t* chipVersions, uint8_t numVersions, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK);
627
636 int16_t transmit(const uint8_t* data, size_t len, uint8_t addr = 0) override;
637
@@ -895,7 +895,7 @@ $(document).ready(function(){initNavTree('_s_x127x_8h_source.html',''); initResi
1251 bool ookEnabled = false;
1252 bool implicitHdr = false;
1253
-
1254 int16_t configFSK();
+
1254 virtual int16_t configFSK();
1255 int16_t getActiveModem();
1256 int16_t setFrequencyRaw(float newFreq);
1257 int16_t setBitRateCommon(float br, uint8_t fracRegAddr);
@@ -972,6 +972,7 @@ $(document).ready(function(){initNavTree('_s_x127x_8h_source.html',''); initResi
SX127x::getFHSSChannel
uint8_t getFHSSChannel(void)
Gets the FHSS channel in use.
Definition SX127x.cpp:1797
SX127x::invertPreamble
int16_t invertPreamble(bool enable)
Invert FSK preamble polarity. The default (non-inverted) is 0x55, the inverted is 0xAA.
Definition SX127x.cpp:812
SX127x::setAFCBandwidth
int16_t setAFCBandwidth(float afcBw)
Sets FSK automatic frequency correction bandwidth. Allowed values range from 2.6 to 250 kHz....
Definition SX127x.cpp:1009
+
SX127x::beginFSK
int16_t beginFSK(const uint8_t *chipVersions, uint8_t numVersions, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK)
Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK init...
Definition SX127x.cpp:72
SX127x::clearPacketReceivedAction
void clearPacketReceivedAction() override
Clears interrupt service routine to call when a packet is received.
Definition SX127x.cpp:479
SX127x::startChannelScan
int16_t startChannelScan() override
Interrupt-driven channel activity detection method. DIO0 will be activated when LoRa preamble is dete...
Definition SX127x.cpp:714
SX127x::fixedPacketLengthMode
int16_t fixedPacketLengthMode(uint8_t len=RADIOLIB_SX127X_MAX_PACKET_LENGTH_FSK)
Set modem in fixed packet length mode. Available in FSK mode only.
Definition SX127x.cpp:1240
@@ -982,6 +983,7 @@ $(document).ready(function(){initNavTree('_s_x127x_8h_source.html',''); initResi
SX127x::setDio1Action
void setDio1Action(void(*func)(void), uint32_t dir)
Set interrupt service routine function to call when DIO1 activates.
Definition SX127x.cpp:461
SX127x::setDIOPreambleDetect
int16_t setDIOPreambleDetect(bool usePreambleDetect)
Configure DIO mapping to use RSSI or Preamble Detect for pins that support it.
Definition SX127x.cpp:1820
SX127x::setFifoThreshold
void setFifoThreshold(uint8_t threshold)
Set FIFO threshold level. Be aware that threshold is also set in setFifoFullAction method....
Definition SX127x.cpp:508
+
SX127x::begin
int16_t begin(const uint8_t *chipVersions, uint8_t numVersions, uint8_t syncWord, uint16_t preambleLength)
Initialization method. Will be called with appropriate parameters when calling initialization method ...
Definition SX127x.cpp:9
SX127x::setFHSSHoppingPeriod
int16_t setFHSSHoppingPeriod(uint8_t freqHoppingPeriod)
Sets the hopping period and enables FHSS.
Definition SX127x.cpp:1789
SX127x::finishTransmit
int16_t finishTransmit() override
Clean up after transmission is done.
Definition SX127x.cpp:645
SX127x::disableBitSync
int16_t disableBitSync()
Disable Bit synchronizer (not allowed in Packet mode).
Definition SX127x.cpp:1167
@@ -992,7 +994,7 @@ $(document).ready(function(){initNavTree('_s_x127x_8h_source.html',''); initResi
SX127x::getTempRaw
int8_t getTempRaw()
Reads uncalibrated temperature value. This function will change operating mode and should not be call...
Definition SX127x.cpp:1566
SX127x::randomByte
uint8_t randomByte() override
Get one truly random byte from RSSI noise.
Definition SX127x.cpp:1537
SX127x::clearDio1Action
void clearDio1Action()
Clears interrupt service routine to call when DIO1 activates.
Definition SX127x.cpp:468
-
SX127x::setLowBatteryThreshold
int16_t setLowBatteryThreshold(int8_t level, uint32_t pin=RADIOLIB_NC)
Set low battery indicator threshold.
Definition SX127x.cpp:1886
+
SX127x::setLowBatteryThreshold
int16_t setLowBatteryThreshold(int8_t level, uint32_t pin=RADIOLIB_NC)
Set low battery indicator threshold.
Definition SX127x.cpp:1885
SX127x::getTimeOnAir
RadioLibTime_t getTimeOnAir(size_t len) override
Get expected time-on-air for a given size of payload.
Definition SX127x.cpp:1274
SX127x::clearIrqFlags
int16_t clearIrqFlags(uint32_t irq) override
Clear interrupt on a specific IRQ bit (e.g. RxTimeout, CadDone).
Definition SX127x.cpp:1425
SX127x::receiveDirect
int16_t receiveDirect() override
Enables direct reception mode on pins DIO1 (clock) and DIO2 (data). While in direct mode,...
Definition SX127x.cpp:342
@@ -1020,12 +1022,10 @@ $(document).ready(function(){initNavTree('_s_x127x_8h_source.html',''); initResi
SX127x::setPacketReceivedAction
void setPacketReceivedAction(void(*func)(void)) override
Sets interrupt service routine to call when a packet is received.
Definition SX127x.cpp:475
SX127x::setDirectAction
void setDirectAction(void(*func)(void)) override
Set interrupt service routine function to call when data bit is received in direct mode.
Definition SX127x.cpp:1780
SX127x::setDio0Action
void setDio0Action(void(*func)(void), uint32_t dir)
Set interrupt service routine function to call when DIO0 activates.
Definition SX127x.cpp:453
-
SX127x::begin
int16_t begin(uint8_t *chipVersions, uint8_t numVersions, uint8_t syncWord, uint16_t preambleLength)
Initialization method. Will be called with appropriate parameters when calling initialization method ...
Definition SX127x.cpp:9
SX127x::getChipVersion
int16_t getChipVersion()
Read version SPI register. Should return SX1278_CHIP_VERSION (0x12) or SX1272_CHIP_VERSION (0x22) if ...
Definition SX127x.cpp:1562
SX127x::transmitDirect
int16_t transmitDirect(uint32_t frf=0) override
Enables direct transmission mode on pins DIO1 (clock) and DIO2 (data). While in direct mode,...
Definition SX127x.cpp:313
SX127x::getFrequencyError
float getFrequencyError(bool autoCorrect=false)
Gets frequency error of the latest received packet.
Definition SX127x.cpp:831
SX127x::setDIOMapping
int16_t setDIOMapping(uint32_t pin, uint32_t value) override
Configure DIO pin mapping to get a given signal on a DIO pin (if available).
Definition SX127x.cpp:1810
-
SX127x::beginFSK
int16_t beginFSK(uint8_t *chipVersions, uint8_t numVersions, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK)
Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK init...
Definition SX127x.cpp:72
SX127x::disableAddressFiltering
int16_t disableAddressFiltering()
Disables FSK address filtering.
Definition SX127x.cpp:1113
RadioLibTime_t
unsigned long RadioLibTime_t
Type used for durations in RadioLib.
Definition TypeDef.h:642
RadioLibIrqFlags_t
uint32_t RadioLibIrqFlags_t
Type used for radio-agnostic IRQ flags. IRQ to enable corresponds to the bit index (RadioLibIrq_t)....
Definition TypeDef.h:648
diff --git a/_s_x1280_8h_source.html b/_s_x1280_8h_source.html index cd119410..c60eba5d 100644 --- a/_s_x1280_8h_source.html +++ b/_s_x1280_8h_source.html @@ -116,7 +116,7 @@ $(document).ready(function(){initNavTree('_s_x1280_8h_source.html',''); initResi
23
31 int16_t range(bool master, uint32_t addr, uint16_t calTable[3][6] = NULL);
32
-
40 int16_t startRanging(bool master, uint32_t addr, uint16_t calTable[3][6] = NULL);
+
40 int16_t startRanging(bool master, uint32_t addr, const uint16_t calTable[3][6] = NULL);
41
46 float getRangingResult();
47
@@ -132,8 +132,8 @@ $(document).ready(function(){initNavTree('_s_x1280_8h_source.html',''); initResi
56#endif
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition Module.h:73
SX1280
Derived class for SX1280 modules.
Definition SX1280.h:16
+
SX1280::startRanging
int16_t startRanging(bool master, uint32_t addr, const uint16_t calTable[3][6]=NULL)
Interrupt-driven ranging method.
Definition SX1280.cpp:36
SX1280::range
int16_t range(bool master, uint32_t addr, uint16_t calTable[3][6]=NULL)
Blocking ranging method.
Definition SX1280.cpp:9
-
SX1280::startRanging
int16_t startRanging(bool master, uint32_t addr, uint16_t calTable[3][6]=NULL)
Interrupt-driven ranging method.
Definition SX1280.cpp:36
SX1280::getRangingResult
float getRangingResult()
Gets ranging result of the last ranging exchange.
Definition SX1280.cpp:143
SX1281
Derived class for SX1281 modules.
Definition SX1281.h:15
diff --git a/_s_x128x_8h_source.html b/_s_x128x_8h_source.html index 038b73e0..0dc69427 100644 --- a/_s_x128x_8h_source.html +++ b/_s_x128x_8h_source.html @@ -612,9 +612,9 @@ $(document).ready(function(){initNavTree('_s_x128x_8h_source.html',''); initResi
890
891 // SX128x SPI command implementations
892 uint8_t getStatus();
-
893 int16_t writeRegister(uint16_t addr, uint8_t* data, uint8_t numBytes);
+
893 int16_t writeRegister(uint16_t addr, const uint8_t* data, uint8_t numBytes);
894 int16_t readRegister(uint16_t addr, uint8_t* data, uint8_t numBytes);
-
895 int16_t writeBuffer(uint8_t* data, uint8_t numBytes, uint8_t offset = 0x00);
+
895 int16_t writeBuffer(const uint8_t* data, uint8_t numBytes, uint8_t offset = 0x00);
896 int16_t readBuffer(uint8_t* data, uint8_t numBytes, uint8_t offset = 0x00);
897 int16_t setTx(uint16_t periodBaseCount = RADIOLIB_SX128X_TX_TIMEOUT_NONE, uint8_t periodBase = RADIOLIB_SX128X_PERIOD_BASE_15_625_US);
898 int16_t setRx(uint16_t periodBaseCount, uint8_t periodBase = RADIOLIB_SX128X_PERIOD_BASE_15_625_US);
diff --git a/_si4430_8h_source.html b/_si4430_8h_source.html index f01a1026..3c73a829 100644 --- a/_si4430_8h_source.html +++ b/_si4430_8h_source.html @@ -118,7 +118,7 @@ $(document).ready(function(){initNavTree('_si4430_8h_source.html',''); initResiz
25
26 // basic methods
27
-
38 int16_t begin(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 181.1, int8_t power = 10, uint8_t preambleLen = 16);
+
38 int16_t begin(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 181.1, int8_t power = 10, uint8_t preambleLen = 16) override;
39
40 // configuration methods
41
@@ -142,7 +142,7 @@ $(document).ready(function(){initNavTree('_si4430_8h_source.html',''); initResiz
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition Module.h:73
Si4430
Derived class for Si4430 modules.
Definition Si4430.h:15
Si4430::setFrequency
int16_t setFrequency(float freq) override
Sets carrier frequency. Allowed values range from 900.0 MHz to 960.0 MHz.
Definition Si4430.cpp:24
-
Si4430::begin
int16_t begin(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
Initialization method. Must be called at least once from Arduino sketch to initialize the module.
Definition Si4430.cpp:8
+
Si4430::begin
int16_t begin(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16) override
Initialization method. Must be called at least once from Arduino sketch to initialize the module.
Definition Si4430.cpp:8
Si4430::setOutputPower
int16_t setOutputPower(int8_t power) override
Sets output power. Allowed values range from -8 to 13 dBm in 3 dBm steps.
Definition Si4430.cpp:31
Si4432
Derived class for Si4432 modules.
Definition Si4432.h:15
diff --git a/_si4431_8h_source.html b/_si4431_8h_source.html index c58ed193..75391bfd 100644 --- a/_si4431_8h_source.html +++ b/_si4431_8h_source.html @@ -118,7 +118,7 @@ $(document).ready(function(){initNavTree('_si4431_8h_source.html',''); initResiz
25
26 // basic methods
27
-
38 int16_t begin(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 181.1, int8_t power = 10, uint8_t preambleLen = 16);
+
38 int16_t begin(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 181.1, int8_t power = 10, uint8_t preambleLen = 16) override;
39
40 // configuration methods
41
@@ -139,7 +139,7 @@ $(document).ready(function(){initNavTree('_si4431_8h_source.html',''); initResiz
60#endif
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition Module.h:73
Si4431
Derived class for Si4431 modules.
Definition Si4431.h:15
-
Si4431::begin
int16_t begin(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
Initialization method. Must be called at least once from Arduino sketch to initialize the module.
Definition Si4431.cpp:8
+
Si4431::begin
int16_t begin(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16) override
Initialization method. Must be called at least once from Arduino sketch to initialize the module.
Definition Si4431.cpp:8
Si4431::setOutputPower
int16_t setOutputPower(int8_t power) override
Sets output power. Allowed values range from -8 to 13 dBm in 3 dBm steps.
Definition Si4431.cpp:24
Si4432
Derived class for Si4432 modules.
Definition Si4432.h:15
diff --git a/_si4432_8h_source.html b/_si4432_8h_source.html index 1de047b5..98b0e7d7 100644 --- a/_si4432_8h_source.html +++ b/_si4432_8h_source.html @@ -118,7 +118,7 @@ $(document).ready(function(){initNavTree('_si4432_8h_source.html',''); initResiz
25
26 // basic methods
27
-
38 int16_t begin(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 181.1, int8_t power = 10, uint8_t preambleLen = 16);
+
38 virtual int16_t begin(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 181.1, int8_t power = 10, uint8_t preambleLen = 16);
39
40 // configuration methods
41
@@ -142,7 +142,7 @@ $(document).ready(function(){initNavTree('_si4432_8h_source.html',''); initResiz
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition Module.h:73
Si4432
Derived class for Si4432 modules.
Definition Si4432.h:15
Si4432::setOutputPower
int16_t setOutputPower(int8_t power) override
Sets output power. Allowed values range from -1 to 20 dBm in 3 dBm steps.
Definition Si4432.cpp:31
-
Si4432::begin
int16_t begin(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
Initialization method. Must be called at least once from Arduino sketch to initialize the module.
Definition Si4432.cpp:8
+
Si4432::begin
virtual int16_t begin(float freq=434.0, float br=4.8, float freqDev=5.0, float rxBw=181.1, int8_t power=10, uint8_t preambleLen=16)
Initialization method. Must be called at least once from Arduino sketch to initialize the module.
Definition Si4432.cpp:8
Si4432::setFrequency
int16_t setFrequency(float freq) override
Sets carrier frequency. Allowed values range from 240.0 MHz to 930.0 MHz.
Definition Si4432.cpp:24
Si443x
Base class for Si443x series. All derived classes for Si443x (e.g. Si4431 or Si4432) inherit from thi...
Definition Si443x.h:553
diff --git a/class_a_p_r_s_client-members.html b/class_a_p_r_s_client-members.html index 1308bae2..e0ffdb09 100644 --- a/class_a_p_r_s_client-members.html +++ b/class_a_p_r_s_client-members.html @@ -98,11 +98,11 @@ $(document).ready(function(){initNavTree('class_a_p_r_s_client.html',''); initRe - + - - + +
APRSClient(AX25Client *ax)APRSClientexplicit
APRSClient(PhysicalLayer *phy)APRSClientexplicit
begin(char sym, char *callsign=NULL, uint8_t ssid=0, bool alt=false)APRSClient
begin(char sym, const char *callsign=NULL, uint8_t ssid=0, bool alt=false)APRSClient
dropRepeaters()APRSClient
sendFrame(char *destCallsign, uint8_t destSSID, char *info)APRSClient
sendMicE(float lat, float lon, uint16_t heading, uint16_t speed, uint8_t type, uint8_t *telem=NULL, size_t telemLen=0, char *grid=NULL, char *status=NULL, int32_t alt=RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED)APRSClient
sendPosition(char *destCallsign, uint8_t destSSID, char *lat, char *lon, char *msg=NULL, char *time=NULL)APRSClient
sendMicE(float lat, float lon, uint16_t heading, uint16_t speed, uint8_t type, const uint8_t *telem=NULL, size_t telemLen=0, const char *grid=NULL, const char *status=NULL, int32_t alt=RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED)APRSClient
sendPosition(char *destCallsign, uint8_t destSSID, const char *lat, const char *lon, const char *msg=NULL, const char *time=NULL)APRSClient
useRepeaters(char **repeaterCallsigns, uint8_t *repeaterSSIDs, uint8_t numRepeaters)APRSClient
diff --git a/class_a_p_r_s_client.html b/class_a_p_r_s_client.html index 4e643579..3160c6f1 100644 --- a/class_a_p_r_s_client.html +++ b/class_a_p_r_s_client.html @@ -110,15 +110,15 @@ Public Member Functions  APRSClient (PhysicalLayer *phy)  Constructor for LoRa mode.
  -int16_t begin (char sym, char *callsign=NULL, uint8_t ssid=0, bool alt=false) - Initialization method.
-  -int16_t sendPosition (char *destCallsign, uint8_t destSSID, char *lat, char *lon, char *msg=NULL, char *time=NULL) - Transmit position.
-  -int16_t sendMicE (float lat, float lon, uint16_t heading, uint16_t speed, uint8_t type, uint8_t *telem=NULL, size_t telemLen=0, char *grid=NULL, char *status=NULL, int32_t alt=RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED) - Transmit position using Mic-E encoding.
-  +int16_t begin (char sym, const char *callsign=NULL, uint8_t ssid=0, bool alt=false) + Initialization method.
+  +int16_t sendPosition (char *destCallsign, uint8_t destSSID, const char *lat, const char *lon, const char *msg=NULL, const char *time=NULL) + Transmit position.
+  +int16_t sendMicE (float lat, float lon, uint16_t heading, uint16_t speed, uint8_t type, const uint8_t *telem=NULL, size_t telemLen=0, const char *grid=NULL, const char *status=NULL, int32_t alt=RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED) + Transmit position using Mic-E encoding.
+  int16_t sendFrame (char *destCallsign, uint8_t destSSID, char *info)  Transmit generic APRS frame.
  @@ -201,8 +201,8 @@ Public Member Functions

Member Function Documentation

- -

◆ begin()

+ +

◆ begin()

@@ -216,7 +216,7 @@ Public Member Functions - char *  + const char *  callsign = NULL, @@ -318,8 +318,8 @@ Public Member Functions
- -

◆ sendMicE()

+ +

◆ sendMicE()

@@ -357,7 +357,7 @@ Public Member Functions - uint8_t *  + const uint8_t *  telem = NULL, @@ -369,13 +369,13 @@ Public Member Functions - char *  + const char *  grid = NULL, - char *  + const char *  status = NULL, @@ -411,8 +411,8 @@ Public Member Functions
- -

◆ sendPosition()

+ +

◆ sendPosition()

@@ -432,25 +432,25 @@ Public Member Functions - char *  + const char *  lat, - char *  + const char *  lon, - char *  + const char *  msg = NULL, - char *  + const char *  time = NULL  diff --git a/class_a_p_r_s_client.js b/class_a_p_r_s_client.js index 9f0e3e40..1e013f88 100644 --- a/class_a_p_r_s_client.js +++ b/class_a_p_r_s_client.js @@ -2,10 +2,10 @@ var class_a_p_r_s_client = [ [ "APRSClient", "class_a_p_r_s_client.html#a08e166ed706d79c66c1d5b48f195724c", null ], [ "APRSClient", "class_a_p_r_s_client.html#afa314fad96837523df4a73cf47986f82", null ], - [ "begin", "class_a_p_r_s_client.html#a4d1468be141940a12fd3964957f79c1a", null ], + [ "begin", "class_a_p_r_s_client.html#a5391412e6081f1fb6fc4e6dabcb0c450", null ], [ "dropRepeaters", "class_a_p_r_s_client.html#afb2f43bc16cd406a079163f44d2a2d01", null ], [ "sendFrame", "class_a_p_r_s_client.html#a05076f44e5708f1230894c11053707b1", null ], - [ "sendMicE", "class_a_p_r_s_client.html#af8f28eba026b0f0a25c8ba54a96f4743", null ], - [ "sendPosition", "class_a_p_r_s_client.html#aebc95b926fb3d37f8489f895aa576d0e", null ], + [ "sendMicE", "class_a_p_r_s_client.html#a9f7fe08e1d0377c1e1953c7af38143a2", null ], + [ "sendPosition", "class_a_p_r_s_client.html#acd783aa3891c19910193ef9c01e1cce8", null ], [ "useRepeaters", "class_a_p_r_s_client.html#a454fb0a3423f75e909b16640b27b176a", null ] ]; \ No newline at end of file diff --git a/class_a_x25_frame-members.html b/class_a_x25_frame-members.html index 5091ded0..c3686ca4 100644 --- a/class_a_x25_frame-members.html +++ b/class_a_x25_frame-members.html @@ -98,7 +98,7 @@ $(document).ready(function(){initNavTree('class_a_x25_frame.html',''); initResiz - + @@ -113,7 +113,7 @@ $(document).ready(function(){initNavTree('class_a_x25_frame.html',''); initResiz - + diff --git a/class_a_x25_frame.html b/class_a_x25_frame.html index 43e6a1f6..caeb505a 100644 --- a/class_a_x25_frame.html +++ b/class_a_x25_frame.html @@ -111,9 +111,9 @@ Public Member Functions - - - + + + @@ -124,9 +124,9 @@ Public Member Functions - - - + + + @@ -322,8 +322,8 @@ uint8_t *  - + @@ -480,8 +480,8 @@ uint8_t *  - + diff --git a/class_a_x25_frame.js b/class_a_x25_frame.js index 2579c852..928c533d 100644 --- a/class_a_x25_frame.js +++ b/class_a_x25_frame.js @@ -2,12 +2,12 @@ var class_a_x25_frame = [ [ "AX25Frame", "class_a_x25_frame.html#a138d97d90a371bef7ebd86cce1cc4979", null ], [ "AX25Frame", "class_a_x25_frame.html#a60e1b318d6e4b9299a4eab72e40877fc", null ], - [ "AX25Frame", "class_a_x25_frame.html#a3899b8698d772b8285629d6a4f2a642a", null ], + [ "AX25Frame", "class_a_x25_frame.html#a713292937322e4be63e793092e17b680", null ], [ "AX25Frame", "class_a_x25_frame.html#a25b83cc9c281d2758165833fe238fe0e", null ], [ "~AX25Frame", "class_a_x25_frame.html#ab84a13f720ada37aee6201a560d9dc5a", null ], [ "operator=", "class_a_x25_frame.html#a52e7e5f6f48c3e62544721d2a5e00640", null ], [ "setRecvSequence", "class_a_x25_frame.html#a4696a8eede8bac85f0ee6de6fee79ea8", null ], - [ "setRepeaters", "class_a_x25_frame.html#a7f2d9f4f1ba29d0fd9f9f3f2cf03f797", null ], + [ "setRepeaters", "class_a_x25_frame.html#ac9a4e40266e81bd2245ebb361a03ddd9", null ], [ "setSendSequence", "class_a_x25_frame.html#a026e9b96fa69018590fcf6842df8be70", null ], [ "control", "class_a_x25_frame.html#a5b196079b539dc417ca65dd4ad622f8f", null ], [ "destCallsign", "class_a_x25_frame.html#a7fe9805148e2dd46d163cd989473dbff", null ], diff --git a/class_f_s_k4_client-members.html b/class_f_s_k4_client-members.html index c54f14ac..9540c881 100644 --- a/class_f_s_k4_client-members.html +++ b/class_f_s_k4_client-members.html @@ -102,7 +102,7 @@ $(document).ready(function(){initNavTree('class_f_s_k4_client.html',''); initRes - +
AX25Frame(const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control)AX25Frame
AX25Frame(const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, const char *info)AX25Frame
AX25Frame(const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, uint8_t *info, uint16_t infoLen)AX25Frame
AX25Frame(const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, const uint8_t *info, uint16_t infoLen)AX25Frame
AX25Frame(const AX25Frame &frame)AX25Frame
controlAX25Frame
destCallsignAX25Frame
repeaterSSIDsAX25Frame
sendSeqNumberAX25Frame
setRecvSequence(uint8_t seqNumber)AX25Frame
setRepeaters(char **repeaterCallsigns, uint8_t *repeaterSSIDs, uint8_t numRepeaters)AX25Frame
setRepeaters(char **repeaterCallsigns, const uint8_t *repeaterSSIDs, uint8_t numRepeaters)AX25Frame
setSendSequence(uint8_t seqNumber)AX25Frame
srcCallsignAX25Frame
srcSSIDAX25Frame
 AX25Frame (const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, const char *info)
 Overloaded constructor, for frames with C-string info field.
 
 AX25Frame (const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, uint8_t *info, uint16_t infoLen)
 Default constructor.
 
 AX25Frame (const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, const uint8_t *info, uint16_t infoLen)
 Default constructor.
 
 AX25Frame (const AX25Frame &frame)
 Copy constructor.
 
AX25Frameoperator= (const AX25Frame &frame)
 Overload for assignment operator.
 
int16_t setRepeaters (char **repeaterCallsigns, uint8_t *repeaterSSIDs, uint8_t numRepeaters)
 Method to set the repeater callsigns and SSIDs.
 
int16_t setRepeaters (char **repeaterCallsigns, const uint8_t *repeaterSSIDs, uint8_t numRepeaters)
 Method to set the repeater callsigns and SSIDs.
 
void setRecvSequence (uint8_t seqNumber)
 Method to set receive sequence number.
 
repeaterSSIDs - -

◆ AX25Frame() [3/4]

+ +

◆ AX25Frame() [3/4]

@@ -367,7 +367,7 @@ uint8_t * 
repeaterSSIDs uint8_t * const uint8_t *  info,
repeaterSSIDs - -

◆ setRepeaters()

+ +

◆ setRepeaters()

@@ -495,7 +495,7 @@ uint8_t * 
repeaterSSIDs uint8_t * const uint8_t *  repeaterSSIDs,
idle()FSK4Client
setCorrection(int16_t offsets[4], float length=1.0f)FSK4Client
standby()FSK4Client
write(uint8_t *buff, size_t len)FSK4Client
write(const uint8_t *buff, size_t len)FSK4Client
write(uint8_t b)FSK4Client
diff --git a/class_f_s_k4_client.html b/class_f_s_k4_client.html index 799d71be..57e2412b 100644 --- a/class_f_s_k4_client.html +++ b/class_f_s_k4_client.html @@ -120,9 +120,9 @@ void idle () int16_t setCorrection (int16_t offsets[4], float length=1.0f)  Set correction coefficients for frequencies and tone length.
  -size_t write (uint8_t *buff, size_t len) - Transmit binary data.
-  +size_t write (const uint8_t *buff, size_t len) + Transmit binary data.
+  size_t write (uint8_t b)  Transmit a single byte.
  @@ -305,8 +305,8 @@ void idle () - -

◆ write() [1/2]

+ +

◆ write() [1/2]

@@ -314,7 +314,7 @@ void idle () size_t FSK4Client::write ( - uint8_t *  + const uint8_t *  buff, diff --git a/class_f_s_k4_client.js b/class_f_s_k4_client.js index 6769f984..6df6a8a6 100644 --- a/class_f_s_k4_client.js +++ b/class_f_s_k4_client.js @@ -6,6 +6,6 @@ var class_f_s_k4_client = [ "idle", "class_f_s_k4_client.html#a79ca465012acc9223d61d5b063ff8257", null ], [ "setCorrection", "class_f_s_k4_client.html#aab85cb6519e5448dc332bf17bd60f90a", null ], [ "standby", "class_f_s_k4_client.html#a8b5765371ebbf68a21bc0bbfdf9f82ac", null ], - [ "write", "class_f_s_k4_client.html#aa59fb42d3eeafe5ab3f0437ef5567ec2", null ], + [ "write", "class_f_s_k4_client.html#a78ead0e1e85706ae513edbceb2184925", null ], [ "write", "class_f_s_k4_client.html#a31218736d4f9a3412ee9009a4c4f5a22", null ] ]; \ No newline at end of file diff --git a/class_pager_client-members.html b/class_pager_client-members.html index d794acb0..b8a9ea2f 100644 --- a/class_pager_client-members.html +++ b/class_pager_client-members.html @@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('class_pager_client.html',''); initResi startReceive(uint32_t pin, uint32_t addr, uint32_t mask=0xFFFFF)PagerClient startReceive(uint32_t pin, uint32_t *addrs, uint32_t *masks, size_t numAddress)PagerClient transmit(const char *str, uint32_t addr, uint8_t encoding=RADIOLIB_PAGER_BCD, uint8_t function=RADIOLIB_PAGER_FUNC_AUTO)PagerClient - transmit(uint8_t *data, size_t len, uint32_t addr, uint8_t encoding=RADIOLIB_PAGER_BCD, uint8_t function=RADIOLIB_PAGER_FUNC_AUTO)PagerClient + transmit(const uint8_t *data, size_t len, uint32_t addr, uint8_t encoding=RADIOLIB_PAGER_BCD, uint8_t function=RADIOLIB_PAGER_FUNC_AUTO)PagerClient
diff --git a/class_pager_client.html b/class_pager_client.html index 1a9f1cd8..200d46ff 100644 --- a/class_pager_client.html +++ b/class_pager_client.html @@ -116,9 +116,9 @@ Public Member Functions int16_t transmit (const char *str, uint32_t addr, uint8_t encoding=RADIOLIB_PAGER_BCD, uint8_t function=RADIOLIB_PAGER_FUNC_AUTO)  C-string transmit method.
  -int16_t transmit (uint8_t *data, size_t len, uint32_t addr, uint8_t encoding=RADIOLIB_PAGER_BCD, uint8_t function=RADIOLIB_PAGER_FUNC_AUTO) - Binary transmit method. Will transmit arbitrary binary data.
-  +int16_t transmit (const uint8_t *data, size_t len, uint32_t addr, uint8_t encoding=RADIOLIB_PAGER_BCD, uint8_t function=RADIOLIB_PAGER_FUNC_AUTO) + Binary transmit method. Will transmit arbitrary binary data.
+  int16_t startReceive (uint32_t pin, uint32_t addr, uint32_t mask=0xFFFFF)  Start reception of POCSAG packets.
  @@ -463,8 +463,8 @@ Public Member Functions - -

◆ transmit() [2/2]

+ +

◆ transmit() [2/2]

@@ -472,7 +472,7 @@ Public Member Functions int16_t PagerClient::transmit ( - uint8_t *  + const uint8_t *  data, diff --git a/class_pager_client.js b/class_pager_client.js index c65d04f6..da46e9dc 100644 --- a/class_pager_client.js +++ b/class_pager_client.js @@ -8,5 +8,5 @@ var class_pager_client = [ "startReceive", "class_pager_client.html#a9c0f13846fbc333a35a16a98b6575ca6", null ], [ "startReceive", "class_pager_client.html#ac232570ac012ff315a1971ab0422fed3", null ], [ "transmit", "class_pager_client.html#adbab4e162a5719bd4407a42a85d26ff6", null ], - [ "transmit", "class_pager_client.html#aa9df7f8675170affc5256a896168601b", null ] + [ "transmit", "class_pager_client.html#a8cd7dd862fa437658acdbd8147083a08", null ] ]; \ No newline at end of file diff --git a/class_radio_lib_a_e_s128-members.html b/class_radio_lib_a_e_s128-members.html index 7e607fa1..878267de 100644 --- a/class_radio_lib_a_e_s128-members.html +++ b/class_radio_lib_a_e_s128-members.html @@ -96,9 +96,9 @@ $(document).ready(function(){initNavTree('class_radio_lib_a_e_s128.html',''); in

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

- - - + + + diff --git a/class_radio_lib_a_e_s128.html b/class_radio_lib_a_e_s128.html index 906f332e..b688218c 100644 --- a/class_radio_lib_a_e_s128.html +++ b/class_radio_lib_a_e_s128.html @@ -111,15 +111,15 @@ Public Member Functions - - - - - - - - - + + + + + + + + + @@ -128,8 +128,8 @@ Public Member Functions

Class to perform AES encryption, decryption and CMAC.

Most of the implementation here is adapted from https://github.com/kokke/tiny-AES-c Additional code and CMAC calculation is from https://github.com/megrxu/AES-CMAC

Member Function Documentation

- -

◆ decryptECB()

+ +

◆ decryptECB()

@@ -137,7 +137,7 @@ Public Member Functions
- + @@ -173,8 +173,8 @@ Public Member Functions - -

◆ encryptECB()

+ +

◆ encryptECB()

@@ -182,7 +182,7 @@ Public Member Functions
- + @@ -218,8 +218,8 @@ Public Member Functions - -

◆ generateCMAC()

+ +

◆ generateCMAC()

@@ -227,7 +227,7 @@ Public Member Functions
- + diff --git a/class_radio_lib_a_e_s128.js b/class_radio_lib_a_e_s128.js index 9eba690b..b1a4747e 100644 --- a/class_radio_lib_a_e_s128.js +++ b/class_radio_lib_a_e_s128.js @@ -1,9 +1,9 @@ var class_radio_lib_a_e_s128 = [ [ "RadioLibAES128", "class_radio_lib_a_e_s128.html#a11f816221d1c06432ff80f2678ef46fe", null ], - [ "decryptECB", "class_radio_lib_a_e_s128.html#abe0e368c6a94b2caf1559add1c262a98", null ], - [ "encryptECB", "class_radio_lib_a_e_s128.html#a4c7b49c3ed16f3849d8050a24a11c3c1", null ], - [ "generateCMAC", "class_radio_lib_a_e_s128.html#a260a1ac84386141781b3d7c213ff161c", null ], + [ "decryptECB", "class_radio_lib_a_e_s128.html#ace646a86f293a791008212ac8bcbc01c", null ], + [ "encryptECB", "class_radio_lib_a_e_s128.html#a6d05efec834b1ae7c5e46f9ef80f1464", null ], + [ "generateCMAC", "class_radio_lib_a_e_s128.html#a1330c5668c22e5f0b65681cf875f5fe3", null ], [ "init", "class_radio_lib_a_e_s128.html#a2f688dbdf2b0506c077ca4501e40e22e", null ], [ "verifyCMAC", "class_radio_lib_a_e_s128.html#a235daad00bd77a406d7fc187bcb2192e", null ] ]; \ No newline at end of file diff --git a/class_s_x1272-members.html b/class_s_x1272-members.html index bf711d15..d3e04459 100644 --- a/class_s_x1272-members.html +++ b/class_s_x1272-members.html @@ -98,10 +98,10 @@ $(document).ready(function(){initNavTree('class_s_x1272.html',''); initResizable
decryptECB(uint8_t *in, size_t len, uint8_t *out)RadioLibAES128
encryptECB(uint8_t *in, size_t len, uint8_t *out)RadioLibAES128
generateCMAC(uint8_t *in, size_t len, uint8_t *cmac)RadioLibAES128
decryptECB(const uint8_t *in, size_t len, uint8_t *out)RadioLibAES128
encryptECB(const uint8_t *in, size_t len, uint8_t *out)RadioLibAES128
generateCMAC(const uint8_t *in, size_t len, uint8_t *cmac)RadioLibAES128
init(uint8_t *key)RadioLibAES128
RadioLibAES128()RadioLibAES128
verifyCMAC(uint8_t *in, size_t len, const uint8_t *cmac)RadioLibAES128
void init (uint8_t *key)
 Initialize the AES.
 
size_t encryptECB (uint8_t *in, size_t len, uint8_t *out)
 Perform ECB-type AES encryption.
 
size_t decryptECB (uint8_t *in, size_t len, uint8_t *out)
 Perform ECB-type AES decryption.
 
void generateCMAC (uint8_t *in, size_t len, uint8_t *cmac)
 Calculate message authentication code according to RFC4493.
 
size_t encryptECB (const uint8_t *in, size_t len, uint8_t *out)
 Perform ECB-type AES encryption.
 
size_t decryptECB (const uint8_t *in, size_t len, uint8_t *out)
 Perform ECB-type AES decryption.
 
void generateCMAC (const uint8_t *in, size_t len, uint8_t *cmac)
 Calculate message authentication code according to RFC4493.
 
bool verifyCMAC (uint8_t *in, size_t len, const uint8_t *cmac)
 Verify the received CMAC. This just calculates the CMAC again and compares the results.
 
size_t RadioLibAES128::decryptECB (uint8_t * const uint8_t *  in,
size_t RadioLibAES128::encryptECB (uint8_t * const uint8_t *  in,
void RadioLibAES128::generateCMAC (uint8_t * const uint8_t *  in,
- - + + - + @@ -213,7 +213,7 @@ $(document).ready(function(){initNavTree('class_s_x1272.html',''); initResizable - + diff --git a/class_s_x1272.html b/class_s_x1272.html index d91d70fe..acf31b3e 100644 --- a/class_s_x1272.html +++ b/class_s_x1272.html @@ -118,7 +118,7 @@ Public Member Functions - + @@ -133,7 +133,7 @@ Public Member Functions - + @@ -197,12 +197,12 @@ Public Member Functions - - - - - - + + + + + + @@ -599,6 +599,9 @@ void <
+
autoLDRO()SX1272
available()PhysicalLayer
begin(float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)SX1272
SX127x::begin(uint8_t *chipVersions, uint8_t numVersions, uint8_t syncWord, uint16_t preambleLength)SX127x
begin(float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)SX1272virtual
SX127x::begin(const uint8_t *chipVersions, uint8_t numVersions, uint8_t syncWord, uint16_t preambleLength)SX127x
beginFSK(float freq=915.0, float br=4.8, float freqDev=5.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)SX1272
SX127x::beginFSK(uint8_t *chipVersions, uint8_t numVersions, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK)SX127x
SX127x::beginFSK(const uint8_t *chipVersions, uint8_t numVersions, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK)SX127x
calculateRxTimeout(RadioLibTime_t timeoutUs) overrideSX127xvirtual
checkDataRate(DataRate_t dr) overrideSX1272virtual
checkIrq(RadioLibIrqType_t irq)PhysicalLayer
setRSSIConfig(uint8_t smoothingSamples, int8_t offset=0)SX127x
setRSSIThreshold(float dbm)SX127x
setRxBandwidth(float rxBw)SX127x
setSpreadingFactor(uint8_t sf)SX1272
setSpreadingFactor(uint8_t sf)SX1272virtual
setSyncWord(uint8_t syncWord)SX127x
setSyncWord(uint8_t *syncWord, size_t len) overrideSX127xvirtual
sleep() overrideSX127xvirtual
 SX1272 (Module *mod)
 Default constructor. Called from Arduino sketch when creating new LoRa instance.
 
int16_t begin (float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
virtual int16_t begin (float freq=915.0, float bw=125.0, uint8_t sf=9, uint8_t cr=7, uint8_t syncWord=RADIOLIB_SX127X_SYNC_WORD, int8_t power=10, uint16_t preambleLength=8, uint8_t gain=0)
 LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module.
 
int16_t beginFSK (float freq=915.0, float br=4.8, float freqDev=5.0, float rxBw=125.0, int8_t power=10, uint16_t preambleLength=16, bool enableOOK=false)
int16_t setBandwidth (float bw)
 Sets LoRa link bandwidth. Allowed values are 125, 250 and 500 kHz. Only available in LoRa mode.
 
int16_t setSpreadingFactor (uint8_t sf)
virtual int16_t setSpreadingFactor (uint8_t sf)
 Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode.
 
int16_t setCodingRate (uint8_t cr)
 SX127x (Module *mod)
 Default constructor. Called internally when creating new LoRa instance.
 
int16_t begin (uint8_t *chipVersions, uint8_t numVersions, uint8_t syncWord, uint16_t preambleLength)
 Initialization method. Will be called with appropriate parameters when calling initialization method from derived class.
 
int16_t beginFSK (uint8_t *chipVersions, uint8_t numVersions, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK)
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class.
 
int16_t begin (const uint8_t *chipVersions, uint8_t numVersions, uint8_t syncWord, uint16_t preambleLength)
 Initialization method. Will be called with appropriate parameters when calling initialization method from derived class.
 
int16_t beginFSK (const uint8_t *chipVersions, uint8_t numVersions, float freqDev, float rxBw, uint16_t preambleLength, bool enableOOK)
 Initialization method for FSK modem. Will be called with appropriate parameters when calling FSK initialization method from derived class.
 
int16_t transmit (const uint8_t *data, size_t len, uint8_t addr=0) override
 Binary transmit method. Will transmit arbitrary binary data up to 255 bytes long using LoRa or up to 63 bytes using FSK modem. For overloads to transmit Arduino String or C-string, see PhysicalLayer::transmit.
 
dropSync ()
+ + + + +
@@ -654,6 +657,11 @@ void <
int16_t SX1272::begin dropSync ()
+
+virtual

LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module.

@@ -672,6 +680,8 @@ void dropSync ()<
Returns
Status Codes
+

Reimplemented in SX1273.

+
@@ -1465,6 +1475,9 @@ void dropSync ()<
+ + + + + +
@@ -1474,6 +1487,11 @@ void <
int16_t SX1272::setSpreadingFactor dropSync ()
+
+virtual

Sets LoRa link spreading factor. Allowed values range from 6 to 12. Only available in LoRa mode.

@@ -1485,6 +1503,8 @@ void dropSync ()<
Returns
Status Codes
+

Reimplemented in SX1273.

+

The documentation for this class was generated from the following files: