1#if !defined(_RADIOLIB_PHYSICAL_LAYER_H)
2#define _RADIOLIB_PHYSICAL_LAYER_H
4#include "../../TypeDef.h"
5#include "../../Module.h"
8enum RadioLibIrqType_t {
9 RADIOLIB_IRQ_TX_DONE = 0x00,
10 RADIOLIB_IRQ_RX_DONE = 0x01,
11 RADIOLIB_IRQ_PREAMBLE_DETECTED = 0x02,
12 RADIOLIB_IRQ_SYNC_WORD_VALID = 0x03,
13 RADIOLIB_IRQ_HEADER_VALID = 0x04,
14 RADIOLIB_IRQ_HEADER_ERR = 0x05,
15 RADIOLIB_IRQ_CRC_ERR = 0x06,
16 RADIOLIB_IRQ_CAD_DONE = 0x07,
17 RADIOLIB_IRQ_CAD_DETECTED = 0x08,
18 RADIOLIB_IRQ_TIMEOUT = 0x09,
19 RADIOLIB_IRQ_NOT_SUPPORTED = 0x1F,
23#define RADIOLIB_IRQ_RX_DEFAULT_FLAGS ((1UL << RADIOLIB_IRQ_RX_DONE) | (1UL << RADIOLIB_IRQ_TIMEOUT) | (1UL << RADIOLIB_IRQ_CRC_ERR) | (1UL << RADIOLIB_IRQ_HEADER_VALID) | (1UL << RADIOLIB_IRQ_HEADER_ERR))
24#define RADIOLIB_IRQ_RX_DEFAULT_MASK ((1UL << RADIOLIB_IRQ_RX_DONE))
25#define RADIOLIB_IRQ_CAD_DEFAULT_FLAGS ((1UL << RADIOLIB_IRQ_CAD_DETECTED) | (1UL << RADIOLIB_IRQ_CAD_DONE))
26#define RADIOLIB_IRQ_CAD_DEFAULT_MASK ((1UL << RADIOLIB_IRQ_CAD_DETECTED) | (1UL << RADIOLIB_IRQ_CAD_DONE))
230 RADIOLIB_MODEM_FSK = 0,
232 RADIOLIB_MODEM_LRFHSS,
240enum RadioModeType_t {
241 RADIOLIB_RADIO_MODE_NONE = 0,
242 RADIOLIB_RADIO_MODE_STANDBY,
243 RADIOLIB_RADIO_MODE_RX,
244 RADIOLIB_RADIO_MODE_TX,
245 RADIOLIB_RADIO_MODE_SCAN,
246 RADIOLIB_RADIO_MODE_SLEEP,
249#define RADIOLIB_LORA_SYNC_WORD_PRIVATE (0x12UL << 0)
250#define RADIOLIB_LORA_SYNC_WORD_PUBLIC (0x34UL << 0)
252#define RADIOLIB_LR_FHSS_CR_5_6 (0x00UL << 0)
253#define RADIOLIB_LR_FHSS_CR_2_3 (0x01UL << 0)
254#define RADIOLIB_LR_FHSS_CR_1_2 (0x02UL << 0)
255#define RADIOLIB_LR_FHSS_CR_1_3 (0x03UL << 0)
256#define RADIOLIB_LR_FHSS_BW_39_06 (0x00UL << 0)
257#define RADIOLIB_LR_FHSS_BW_85_94 (0x01UL << 0)
258#define RADIOLIB_LR_FHSS_BW_136_72 (0x02UL << 0)
259#define RADIOLIB_LR_FHSS_BW_183_59 (0x03UL << 0)
260#define RADIOLIB_LR_FHSS_BW_335_94 (0x04UL << 0)
261#define RADIOLIB_LR_FHSS_BW_386_72 (0x05UL << 0)
262#define RADIOLIB_LR_FHSS_BW_722_66 (0x06UL << 0)
263#define RADIOLIB_LR_FHSS_BW_773_44 (0x07UL << 0)
264#define RADIOLIB_LR_FHSS_BW_1523_4 (0x08UL << 0)
265#define RADIOLIB_LR_FHSS_BW_1574_2 (0x09UL << 0)
267#define RADIOLIB_FLRC_BR_2600 (0x00UL << 0)
268#define RADIOLIB_FLRC_BR_2080 (0x01UL << 0)
269#define RADIOLIB_FLRC_BR_1300 (0x02UL << 0)
270#define RADIOLIB_FLRC_BR_1040 (0x03UL << 0)
271#define RADIOLIB_FLRC_BR_650 (0x04UL << 0)
272#define RADIOLIB_FLRC_BR_520 (0x05UL << 0)
273#define RADIOLIB_FLRC_BR_325 (0x06UL << 0)
274#define RADIOLIB_FLRC_BR_260 (0x07UL << 0)
275#define RADIOLIB_FLRC_CR_1_2 (0x00UL << 0)
276#define RADIOLIB_FLRC_CR_3_4 (0x01UL << 0)
277#define RADIOLIB_FLRC_CR_1_0 (0x02UL << 0)
278#define RADIOLIB_FLRC_CR_2_3 (0x03UL << 0)
291 uint8_t
syncWord = RADIOLIB_LORA_SYNC_WORD_PRIVATE;
420 #if defined(RADIOLIB_BUILD_ARDUINO)
427 int16_t
transmit(__FlashStringHelper* fstr, uint8_t addr = 0);
435 int16_t
transmit(String& str, uint8_t addr = 0);
444 int16_t
transmit(
const char* str, uint8_t addr = 0);
453 virtual int16_t
transmit(
const uint8_t* data,
size_t len, uint8_t addr = 0);
455 #if defined(RADIOLIB_BUILD_ARDUINO)
471 virtual int16_t
sleep();
483 virtual int16_t
standby(uint8_t mode);
513 #if defined(RADIOLIB_BUILD_ARDUINO)
540 virtual int16_t
startTransmit(
const uint8_t* data,
size_t len, uint8_t addr = 0);
554 #if defined(RADIOLIB_BUILD_ARDUINO)
562 int16_t
readData(String& str,
size_t len = 0);
572 virtual int16_t
readData(uint8_t* data,
size_t len);
632 virtual int16_t
invertIQ(
bool enable);
655 virtual int16_t
setSyncWord(uint8_t* sync,
size_t len);
738 int16_t
checkIrq(RadioLibIrqType_t irq);
824 int32_t
random(int32_t max);
832 int32_t
random(int32_t min, int32_t max);
847 #if !RADIOLIB_EXCLUDE_DIRECT_RECEIVE
867 virtual void readBit(uint32_t pin);
886 uint8_t
read(
bool drop =
true);
928 virtual int16_t
setModem(ModemType_t modem);
935 virtual int16_t
getModem(ModemType_t* modem);
951 #if RADIOLIB_INTERRUPT_TIMING
958 void setInterruptSetup(
void (*func)(uint32_t));
990 uint32_t irqMap[10] = { 0 };
991 RadioModeType_t stagedMode = RADIOLIB_RADIO_MODE_NONE;
993#if !RADIOLIB_EXCLUDE_DIRECT_RECEIVE
994 void updateDirectBuffer(uint8_t bit);
1001 #if !RADIOLIB_EXCLUDE_DIRECT_RECEIVE
1002 uint8_t bufferBitPos = 0;
1003 uint8_t bufferWritePos = 0;
1004 uint8_t bufferReadPos = 0;
1005 uint8_t buffer[RADIOLIB_STATIC_ARRAY_SIZE] = { 0 };
1006 uint32_t syncBuffer = 0;
1007 uint32_t directSyncWord = 0;
1008 uint8_t directSyncWordLen = 0;
1009 uint32_t directSyncWordMask = 0;
1010 bool gotSync =
false;
1013 virtual Module* getMod() = 0;
1025 friend class FT8Client;
1027 friend class M17Client;
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition AFSK.h:16
Client for AX25 communication.
Definition AX25.h:232
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:19
LoRaWAN-compatible node (class A device).
Definition LoRaWAN.h:552
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition Module.h:69
Client for Morse Code communication. The public interface is the same as Arduino Serial.
Definition Morse.h:23
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition PhysicalLayer.h:390
virtual int16_t stageMode(RadioModeType_t mode, RadioModeConfig_t *cfg)
Stage mode of the radio to be launched later using launchMode.
Definition PhysicalLayer.cpp:559
int16_t calculateRxDutyCycle(size_t txPreLen, size_t rxPreLen, uint16_t minSymbols, DataRate_t *dr, uint32_t *wakePeriod, uint32_t *sleepPeriod)
Calculates sleep and wake cycles for startReceiveDutyCycle methods so that the receiver should not mi...
Definition PhysicalLayer.cpp:581
virtual int16_t invertIQ(bool enable)
Set IQ inversion. Must be implemented in module class if the module supports it.
Definition PhysicalLayer.cpp:265
virtual void clearChannelScanAction()
Clears interrupt service routine to call when a channel scan is finished.
Definition PhysicalLayer.cpp:545
virtual int16_t checkOutputPower(int8_t power, int8_t *clipped)
Check if output power is configurable. Must be implemented in module class if the module supports it.
Definition PhysicalLayer.cpp:275
virtual int16_t startReceive()
Sets module to received mode using its default configuration.
Definition PhysicalLayer.cpp:131
virtual uint8_t randomByte()
Get one truly random byte from RSSI noise. Must be implemented in module class.
Definition PhysicalLayer.cpp:426
size_t maxPacketLength
Maximum length of packet that can be received by the module.
Definition PhysicalLayer.h:397
virtual int16_t finishTransmit()
Clean up after transmission is done.
Definition PhysicalLayer.cpp:174
int16_t checkIrq(RadioLibIrqType_t irq)
Check whether a specific IRQ bit is set (e.g. RxTimeout, CadDone).
Definition PhysicalLayer.cpp:347
virtual int16_t setFrequencyDeviation(float freqDev)
Sets FSK frequency deviation from carrier frequency. Only available in FSK mode. Must be implemented ...
Definition PhysicalLayer.cpp:250
virtual size_t getPacketLength(bool update=true)
Query modem for the packet length of received payload. Must be implemented in module class.
Definition PhysicalLayer.cpp:304
virtual void setPacketSentAction(void(*func)(void))
Sets interrupt service routine to call when a packet is sent.
Definition PhysicalLayer.cpp:533
virtual int16_t readData(uint8_t *data, size_t len)
Reads data that was received after calling startReceive method.
Definition PhysicalLayer.cpp:225
void dropSync()
Forcefully drop synchronization.
Definition PhysicalLayer.cpp:449
int16_t transmit(const char *str, uint8_t addr=0)
C-string transmit method.
Definition PhysicalLayer.cpp:53
uint8_t read(bool drop=true)
Get data from direct mode buffer.
Definition PhysicalLayer.cpp:456
virtual RadioLibTime_t getTimeOnAir(size_t len)
Get expected time-on-air for a given size of payload.
Definition PhysicalLayer.cpp:325
virtual int16_t launchMode()
Launch previously staged mode.
Definition PhysicalLayer.cpp:565
virtual int16_t getChannelScanResult()
Read the channel scan result.
Definition PhysicalLayer.cpp:386
virtual void clearPacketSentAction()
Clears interrupt service routine to call when a packet is sent.
Definition PhysicalLayer.cpp:537
virtual int16_t setSyncWord(uint8_t *sync, size_t len)
Set sync word. Must be implemented in module class if the module supports it.
Definition PhysicalLayer.cpp:281
virtual int16_t setModem(ModemType_t modem)
Set modem for the radio to use. Will perform full reset and reconfigure the radio using its default p...
Definition PhysicalLayer.cpp:549
virtual ~PhysicalLayer()=default
Default destructor.
virtual void clearPacketReceivedAction()
Clears interrupt service routine to call when a packet is received.
Definition PhysicalLayer.cpp:529
virtual RadioLibTime_t calculateRxTimeout(RadioLibTime_t timeoutUs)
Calculate the timeout value for this specific module / series (in number of symbols or units of time)...
Definition PhysicalLayer.cpp:330
int16_t setIrq(RadioLibIrqFlags_t irq)
Set interrupt on specific IRQ bit(s) (e.g. RxTimeout, CadDone). Keep in mind that not all radio modul...
Definition PhysicalLayer.cpp:355
virtual int16_t setPreambleLength(size_t len)
Set preamble length. Must be implemented in module class if the module supports it.
Definition PhysicalLayer.cpp:287
int16_t startDirect()
Configure module parameters for direct modes. Must be called prior to "ham" modes like RTTY or AX....
Definition PhysicalLayer.cpp:430
virtual int16_t setFrequency(float freq)
Sets carrier frequency. Must be implemented in module class.
Definition PhysicalLayer.cpp:240
virtual int16_t finishReceive()
Clean up after reception is done.
Definition PhysicalLayer.cpp:178
int16_t setDirectSyncWord(uint32_t syncWord, uint8_t len)
Set sync word to be used to determine start of packet in direct reception mode.
Definition PhysicalLayer.cpp:464
int16_t startTransmit(const char *str, uint8_t addr=0)
Interrupt-driven Arduino String transmit method. Unlike the standard transmit method,...
Definition PhysicalLayer.cpp:156
virtual int16_t checkDataRate(DataRate_t dr, ModemType_t modem=RADIOLIB_MODEM_NONE)
Check the data rate can be configured by this module. Must be implemented in module class if the modu...
Definition PhysicalLayer.cpp:298
virtual int16_t transmitDirect(uint32_t frf=0)
Enables direct transmission mode on pins DIO1 (clock) and DIO2 (data). Must be implemented in module ...
Definition PhysicalLayer.cpp:231
float freqStep
Frequency step of the synthesizer in Hz.
Definition PhysicalLayer.h:394
virtual float getRSSI()
Gets RSSI (Received Signal Strength Indicator) of the last received packet.
Definition PhysicalLayer.cpp:309
int16_t available()
Get the number of direct mode bytes currently available in buffer.
Definition PhysicalLayer.cpp:445
virtual int16_t scanChannel()
Check whether the current communication channel is free or occupied. Performs CAD for LoRa modules,...
Definition PhysicalLayer.cpp:390
virtual void setDirectAction(void(*func)(void))
Set interrupt service routine function to call when data bit is received in direct mode....
Definition PhysicalLayer.cpp:515
virtual RadioLibTime_t calculateTimeOnAir(ModemType_t modem, DataRate_t dr, PacketConfig_t pc, size_t len)
Calculate the expected time-on-air for a given modem, data rate, packet configuration and payload siz...
Definition PhysicalLayer.cpp:317
virtual int16_t clearIrqFlags(uint32_t irq)
Clear interrupt on a specific IRQ bit (e.g. RxTimeout, CadDone). Must be implemented in module class.
Definition PhysicalLayer.cpp:372
virtual int16_t setDataRate(DataRate_t dr, ModemType_t modem=RADIOLIB_MODEM_NONE)
Set data rate. Must be implemented in module class if the module supports it.
Definition PhysicalLayer.cpp:292
virtual int16_t setEncoding(uint8_t encoding)
Sets FSK data encoding. Only available in FSK mode. Must be implemented in module class.
Definition PhysicalLayer.cpp:260
virtual int16_t standby()
Sets module to standby.
Definition PhysicalLayer.cpp:122
int32_t random(int32_t max)
Get truly random number in range 0 - max.
Definition PhysicalLayer.cpp:399
virtual void readBit(uint32_t pin)
Function to read and process data bit in direct reception mode. Must be implemented in module class.
Definition PhysicalLayer.cpp:519
virtual int16_t setOutputPower(int8_t power)
Set output power. Must be implemented in module class if the module supports it.
Definition PhysicalLayer.cpp:270
virtual int16_t receiveDirect()
Enables direct reception mode on pins DIO1 (clock) and DIO2 (data). Must be implemented in module cla...
Definition PhysicalLayer.cpp:236
virtual void setChannelScanAction(void(*func)(void))
Sets interrupt service routine to call when a channel scan is finished.
Definition PhysicalLayer.cpp:541
virtual int16_t startChannelScan()
Interrupt-driven channel activity detection method. Interrupt will be activated when packet is detect...
Definition PhysicalLayer.cpp:377
uint32_t getIrqMapped(RadioLibIrqFlags_t irq)
Convert from radio-agnostic IRQ flags to radio-specific flags.
Definition PhysicalLayer.cpp:335
virtual int16_t receive(uint8_t *data, size_t len, RadioLibTime_t timeout=0)
Binary receive method. Must be implemented in module class.
Definition PhysicalLayer.cpp:111
virtual int16_t setDataShaping(uint8_t sh)
Sets GFSK data shaping. Only available in FSK mode. Must be implemented in module class.
Definition PhysicalLayer.cpp:255
virtual void setPacketReceivedAction(void(*func)(void))
Sets interrupt service routine to call when a packet is received.
Definition PhysicalLayer.cpp:525
virtual int16_t setBitRate(float br)
Sets FSK bit rate. Only available in FSK mode. Must be implemented in module class.
Definition PhysicalLayer.cpp:245
virtual float getSNR()
Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa modem.
Definition PhysicalLayer.cpp:313
virtual int16_t getModem(ModemType_t *modem)
Get modem currently in use by the radio.
Definition PhysicalLayer.cpp:554
virtual int16_t sleep()
Sets module to sleep.
Definition PhysicalLayer.cpp:118
virtual uint32_t getIrqFlags()
Read currently active IRQ flags. Must be implemented in module class.
Definition PhysicalLayer.cpp:363
virtual int16_t setIrqFlags(uint32_t irq)
Set interrupt on DIO1 to be sent on a specific IRQ bit (e.g. RxTimeout, CadDone). Must be implemented...
Definition PhysicalLayer.cpp:367
int16_t clearIrq(RadioLibIrqFlags_t irq)
Clear interrupt on a specific IRQ bit (e.g. RxTimeout, CadDone). Keep in mind that not all radio modu...
Definition PhysicalLayer.cpp:359
PhysicalLayer()
Default constructor.
Definition PhysicalLayer.cpp:5
Client for RTTY communication. The public interface is the same as Arduino Serial.
Definition RTTY.h:17
Client for SSTV transmissions.
Definition SSTV.h:121
#define RADIOLIB_SHAPING_0_5
Gaussian shaping filter, BT = 0.5.
Definition TypeDef.h:27
bool resetOnStartup
Whether to reset the module on startup. Setting to false allows to restore radio operation by calling...
Definition PhysicalLayer.h:404
unsigned long RadioLibTime_t
Type used for durations in RadioLib.
Definition TypeDef.h:679
uint32_t RadioLibIrqFlags_t
Type used for radio-agnostic IRQ flags. IRQ to enable corresponds to the bit index (RadioLibIrq_t)....
Definition TypeDef.h:685
Channel scan configuration interpretation in case LoRa CAD is used.
Definition PhysicalLayer.h:129
RadioLibTime_t timeout
Timeout in microseconds.
Definition PhysicalLayer.h:143
uint8_t detPeak
Number of peak detection symbols.
Definition PhysicalLayer.h:134
uint8_t symNum
Number of symbols to consider signal present.
Definition PhysicalLayer.h:131
uint8_t exitMode
Exit mode after signal detection is complete - module-specific value.
Definition PhysicalLayer.h:140
RadioLibIrqFlags_t irqFlags
Optional IRQ flags to set, bits offset by the value of RADIOLIB_IRQ_.
Definition PhysicalLayer.h:146
RadioLibIrqFlags_t irqMask
Optional IRQ mask to set, bits offset by the value of RADIOLIB_IRQ_.
Definition PhysicalLayer.h:149
uint8_t detMin
Number of minimum detection symbols.
Definition PhysicalLayer.h:137
Definition PhysicalLayer.h:363
float frequency
Carrier frequency in MHz. Defaults to 2400.0 MHz.
Definition PhysicalLayer.h:365
float frequencyDeviation
BLE frequency deviation in kHz. Defaults to 400.0 kHz.
Definition PhysicalLayer.h:369
uint8_t dataShaping
Time-bandwidth product of the Gaussian filter to be used for shaping. Defaults to 0....
Definition PhysicalLayer.h:373
uint16_t bitRate
BLE bit rate in kbps. Defaults to 800 kbps.
Definition PhysicalLayer.h:367
int8_t power
Output power in dBm. Defaults to 10 dBm.
Definition PhysicalLayer.h:371
Definition PhysicalLayer.h:313
int8_t power
Output power in dBm. Defaults to 10 dBm.
Definition PhysicalLayer.h:319
float frequency
Carrier frequency in MHz. Defaults to 434.0 MHz.
Definition PhysicalLayer.h:315
float bitRate
FSK bit rate in kbps. Defaults to 4.8 kbps.
Definition PhysicalLayer.h:317
Definition PhysicalLayer.h:348
uint8_t codingRate
FLRC coding rate. Defaults to RADIOLIB_FLRC_CR_2_3 (coding rate 2/3).
Definition PhysicalLayer.h:354
float frequency
Carrier frequency in MHz. Defaults to 434.0 MHz.
Definition PhysicalLayer.h:350
uint16_t preambleLength
FLRC preamble length in bits. Defaults to 16 bits.
Definition PhysicalLayer.h:358
int8_t power
Output power in dBm. Defaults to 10 dBm.
Definition PhysicalLayer.h:356
float bitRate
FLRC bit rate in kbps. Defaults to 650 kbps.
Definition PhysicalLayer.h:352
uint8_t dataShaping
Time-bandwidth product of the Gaussian filter to be used for shaping. Defaults to 0....
Definition PhysicalLayer.h:360
Definition PhysicalLayer.h:298
float bitRate
FSK bit rate in kbps. Defaults to 4.8 kbps.
Definition PhysicalLayer.h:302
float receiverBandwidth
FSK receiver bandwidth in kHz. Defaults to 125.0 kHz.
Definition PhysicalLayer.h:306
uint16_t preambleLength
FSK preamble length in bits. Defaults to 16 bits.
Definition PhysicalLayer.h:310
float frequency
Carrier frequency in MHz. Defaults to 434.0 MHz.
Definition PhysicalLayer.h:300
int8_t power
Output power in dBm. Defaults to 10 dBm.
Definition PhysicalLayer.h:308
float frequencyDeviation
FSK frequency deviation in kHz. Defaults to 5.0 kHz.
Definition PhysicalLayer.h:304
Definition PhysicalLayer.h:335
uint8_t bandwidth
LR-FHSS bandwidth, one of RADIOLIB_LR_FHSS_BW_* values. Defaults to 722.66 kHz.
Definition PhysicalLayer.h:339
bool narrowGrid
Whether to use narrow (3.9 kHz) or wide (25.39 kHz) grid spacing. Defaults to true (narrow/non-FCC) g...
Definition PhysicalLayer.h:343
int8_t power
Output power in dBm. Defaults to 10 dBm.
Definition PhysicalLayer.h:345
uint8_t codingRate
LR-FHSS coding rate, one of RADIOLIB_LR_FHSS_CR_* values. Defaults to 2/3 coding rate.
Definition PhysicalLayer.h:341
float frequency
Carrier frequency in MHz. Defaults to 434.0 MHz.
Definition PhysicalLayer.h:337
Definition PhysicalLayer.h:280
uint16_t preambleLength
LoRa preamble length in symbols. Defaults to 8 symbols.
Definition PhysicalLayer.h:295
uint8_t codingRate
LoRa coding rate. Defaults to 7 (coding rate 4/7). Allowed values range from 4 to 8....
Definition PhysicalLayer.h:289
int8_t power
Output power in dBm. Defaults to 10 dBm.
Definition PhysicalLayer.h:293
uint8_t syncWord
1-byte LoRa sync word. Defaults to RADIOLIB_LORA_SYNC_WORD_PRIVATE (0x12).
Definition PhysicalLayer.h:291
float bandwidth
LoRa bandwidth in kHz. Defaults to 125.0 kHz.
Definition PhysicalLayer.h:284
uint8_t spreadingFactor
LoRa spreading factor. Defaults to 9.
Definition PhysicalLayer.h:286
float frequency
Carrier frequency in MHz. Defaults to 434.0 MHz.
Definition PhysicalLayer.h:282
Definition PhysicalLayer.h:322
int8_t power
Output power in dBm. Defaults to 10 dBm.
Definition PhysicalLayer.h:330
uint16_t preambleLength
FSK preamble length in bits. Defaults to 16 bits.
Definition PhysicalLayer.h:332
float bitRate
FSK bit rate in kbps. Defaults to 4.8 kbps.
Definition PhysicalLayer.h:326
float frequency
Carrier frequency in MHz. Defaults to 434.0 MHz.
Definition PhysicalLayer.h:324
float receiverBandwidth
FSK receiver bandwidth in kHz. Defaults to 125.0 kHz.
Definition PhysicalLayer.h:328
Definition PhysicalLayer.h:99
uint8_t crcLength
FSK CRC length in bytes.
Definition PhysicalLayer.h:107
uint8_t syncWordLength
Length of the sync word in bits.
Definition PhysicalLayer.h:104
uint16_t preambleLength
FSK preamble length in bits.
Definition PhysicalLayer.h:101
Data rate structure interpretation in case FSK is used.
Definition PhysicalLayer.h:47
float bitRate
FSK bit rate in kbps.
Definition PhysicalLayer.h:49
float freqDev
FSK frequency deviation in kHz.
Definition PhysicalLayer.h:52
Definition PhysicalLayer.h:85
bool implicitHeader
LoRa implicit header mode.
Definition PhysicalLayer.h:90
bool crcEnabled
LoRa CRC mode.
Definition PhysicalLayer.h:93
bool ldrOptimize
LoRa low data rate optimization.
Definition PhysicalLayer.h:96
uint16_t preambleLength
LoRa preamble length.
Definition PhysicalLayer.h:87
Data rate structure interpretation in case LoRa is used.
Definition PhysicalLayer.h:32
uint8_t spreadingFactor
LoRa spreading factor.
Definition PhysicalLayer.h:34
float bandwidth
LoRa bandwidth in kHz.
Definition PhysicalLayer.h:37
uint8_t codingRate
LoRa coding rate denominator.
Definition PhysicalLayer.h:40
Definition PhysicalLayer.h:110
uint8_t hdrCount
LR-FHSS header count (1 - 4)
Definition PhysicalLayer.h:112
Data rate structure interpretation in case LR-FHSS is used.
Definition PhysicalLayer.h:59
bool narrowGrid
Grid spacing.
Definition PhysicalLayer.h:67
uint8_t cr
Coding rate.
Definition PhysicalLayer.h:64
uint8_t bw
Bandwidth.
Definition PhysicalLayer.h:61
Channel scan configuration interpretation in case RSSI threshold is used.
Definition PhysicalLayer.h:156
float limit
RSSI limit in dBm.
Definition PhysicalLayer.h:158
Definition PhysicalLayer.h:178
RadioLibIrqFlags_t irqFlags
Sets the IRQ flags.
Definition PhysicalLayer.h:183
size_t len
Packet length, needed for some modules under special circumstances (e.g. LoRa implicit header mode).
Definition PhysicalLayer.h:189
uint32_t timeout
Raw timeout value. Some modules use this argument to specify operation mode (single vs....
Definition PhysicalLayer.h:180
RadioLibIrqFlags_t irqMask
Sets the mask of IRQ flags that will trigger the radio interrupt pin.
Definition PhysicalLayer.h:186
Definition PhysicalLayer.h:203
uint8_t mode
Module-specific sleep mode configuration.
Definition PhysicalLayer.h:205
Definition PhysicalLayer.h:173
uint8_t mode
Module-specific standby mode configuration.
Definition PhysicalLayer.h:175
Definition PhysicalLayer.h:192
const uint8_t * data
Binary data that will be transmitted.
Definition PhysicalLayer.h:194
uint8_t addr
Node address to transmit the packet to. Only used in FSK mode.
Definition PhysicalLayer.h:200
size_t len
Length of binary data to transmit (in bytes).
Definition PhysicalLayer.h:197
Common channel scan configuration structure.
Definition PhysicalLayer.h:165
RSSIScanConfig_t rssi
Interpretation for modems that use RSSI threshold.
Definition PhysicalLayer.h:170
CADScanConfig_t cad
Interpretation for modems that use CAD (usually LoRa modems)
Definition PhysicalLayer.h:167
Common data rate structure.
Definition PhysicalLayer.h:74
LrFhssRate_t lrFhss
Interpretation for LR-FHSS modems.
Definition PhysicalLayer.h:82
LoRaRate_t lora
Interpretation for LoRa modems.
Definition PhysicalLayer.h:76
FSKRate_t fsk
Interpretation for FSK modems.
Definition PhysicalLayer.h:79
Common packet configuration structure.
Definition PhysicalLayer.h:119
Definition PhysicalLayer.h:208
SleepConfig_t sleep
Interpretation for sleep mode.
Definition PhysicalLayer.h:222
StandbyConfig_t standby
Interpretation for standby mode.
Definition PhysicalLayer.h:210
ChannelScanConfig_t scan
Interpretation for scanning.
Definition PhysicalLayer.h:219
TransmitConfig_t transmit
Interpretation for Tx mode.
Definition PhysicalLayer.h:216
ReceiveConfig_t receive
Interpretation for Rx mode.
Definition PhysicalLayer.h:213