RadioLib
Universal wireless communication library for Arduino
Loading...
Searching...
No Matches
LR2012 Class Reference

Derived class for LR2012 modules. The LR2012 is the sub-GHz member of the LR20xx family: it shares the LR2021 command set, but has no high-frequency front end and no FLRC, O-QPSK, Bluetooth LE or Z-Wave support. More...

#include <LR2012.h>

Inheritance diagram for LR2012:
LR2021 LRxxxx PhysicalLayer

Public Member Functions

 LR2012 (Module *mod)
 Default constructor.
Public Member Functions inherited from LR2021
 LR2021 (Module *mod)
 Default constructor.
int16_t begin (const ConfigLoRa_t &config)
 Initialization method for LoRa modem.
int16_t beginGFSK (const ConfigFSK_t &config)
 Initialization method for FSK modem.
int16_t beginOOK (const ConfigOOK_t &config)
 Initialization method for OOK modem.
int16_t beginLRFHSS (const ConfigLRFHSS_t &config)
 Initialization method for LR-FHSS modem.
int16_t beginFLRC (const ConfigFLRC_t &config)
 Initialization method for FLRC modem.
int16_t transmit (const uint8_t *data, size_t len, uint8_t addr=0) override
 Blocking binary transmit method. Overloads for string-based transmissions are implemented in PhysicalLayer.
int16_t receive (uint8_t *data, size_t len, RadioLibTime_t timeout=0) override
 Blocking binary receive method. Overloads for string-based transmissions are implemented in PhysicalLayer.
int16_t transmitDirect (uint32_t frf=0) override
 Starts direct mode transmission.
int16_t receiveDirect () override
 Starts direct mode reception. Only implemented for PhysicalLayer compatibility, as LR2021 does not support direct mode reception. Will always return RADIOLIB_ERR_UNKNOWN.
int16_t scanChannel () override
 Performs scan for LoRa transmission in the current channel. Detects both preamble and payload.
int16_t scanChannel (const ChannelScanConfig_t &config) override
 Performs scan for LoRa transmission in the current channel. Detects both preamble and payload.
int16_t standby () override
 Sets the module to standby mode (overload for PhysicalLayer compatibility). Uses 13 MHz RC oscillator by default, or external oscillator if standbyXOSC is set to true.
int16_t standby (uint8_t mode) override
 Sets the module to standby mode.
int16_t standby (uint8_t mode, bool wakeup)
 Sets the module to standby mode.
int16_t sleep () override
 Sets the module to sleep mode. To wake the device up, call standby(). Overload with warm start enabled for PhysicalLayer compatibility.
int16_t sleep (bool retainConfig, uint32_t sleepTime)
 Sets the module to sleep mode. To wake the device up, call standby().
size_t getPacketLength (bool update=true) override
 Query modem for the packet length of received payload.
int16_t startReceive () override
 Interrupt-driven receive method with default parameters. Implemented for compatibility with PhysicalLayer.
int16_t startReceiveDutyCycle (uint32_t rxPeriod, uint32_t sleepPeriod, RadioLibIrqFlags_t irqFlags=RADIOLIB_IRQ_RX_DEFAULT_FLAGS, RadioLibIrqFlags_t irqMask=RADIOLIB_IRQ_RX_DEFAULT_MASK)
 Interrupt-driven receive method where the device mostly sleeps and periodically wakes to listen. Note that this function assumes the unit will take 500us + TCXO_delay to change state. See datasheet section 13.1.7, version 1.2.
int16_t startReceiveDutyCycleAuto (uint16_t senderPreambleLength=0, uint16_t minSymbols=0, RadioLibIrqFlags_t irqFlags=RADIOLIB_IRQ_RX_DEFAULT_FLAGS, RadioLibIrqFlags_t irqMask=RADIOLIB_IRQ_RX_DEFAULT_MASK)
 Calls startReceiveDutyCycle with rxPeriod and sleepPeriod set so the unit shouldn't miss any messages.
int16_t readData (uint8_t *data, size_t len) override
 Reads data received after calling startReceive method. When the packet length is not known in advance, getPacketLength method must be called BEFORE calling readData!
int16_t finishReceive () override
 Clean up after reception is done.
int16_t startChannelScan () override
 Interrupt-driven channel activity detection method. IRQ1 will be activated when LoRa preamble is detected, or upon timeout. Defaults to CAD parameter values recommended by AN1200.48.
int16_t startChannelScan (const ChannelScanConfig_t &cfg) override
 Interrupt-driven channel activity detection method. IRQ pin will be activated when LoRa preamble is detected, or upon timeout.
int16_t getChannelScanResult () override
 Read the channel scan result.
uint32_t getIrqFlags () override
 Read currently active IRQ flags.
int16_t setIrqFlags (uint32_t irq) override
 Set interrupt on DIO1 to be sent on a specific IRQ bit (e.g. RxTimeout, CadDone).
int16_t clearIrqFlags (uint32_t irq) override
 Clear interrupt on a specific IRQ bit (e.g. RxTimeout, CadDone).
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 parameters.
int16_t setFrequency (uint32_t freq) override
 Sets carrier frequency. Allowed values are in range from 150 to 1090 MHz, 1900 - 2200 MHz and 2400 - 2500 MHz. Will automatically perform image calibration if the frequency changes by more than RADIOLIB_LR2021_CAL_IMG_FREQ_TRIG MHz. NOTE: When switching between sub-GHz and high-frequency bands, after changing the frequency, setOutputPower() must be called in order to set the correct power amplifier!
int16_t setFrequency (uint32_t freq, bool skipCalibration)
 Sets carrier frequency. Allowed values are in range from 150 to 1090 MHz, 1900 - 2200 MHz and 2400 - 2500 MHz. Will automatically perform image calibration if the frequency changes by more than RADIOLIB_LR2021_CAL_IMG_FREQ_TRIG Hz.
int16_t setOutputPower (int8_t power) override
 Sets output power. Allowed values are in range from -9 to 22 dBm (sub-GHz PA) or -19 to 12 dBm (high-frequency PA).
int16_t setOutputPower (int8_t power, uint32_t rampTimeUs)
 Sets output power. Allowed values are in range from -9 to 22 dBm (sub-GHz PA) or -19 to 12 dBm (high-frequency PA). When using an external PA, the output power offset may be handled by the library using PhysicalLayer::setOutputPowerOffset. See https://github.com/jgromes/RadioLib/wiki/High-power-Radio-Modules-Guide for details on its usage.
void setPaTable (LR2021PaTableEntry_t *table, bool highFreq)
 Sets custom PA configuration table.
int16_t setStandbyXOSC (bool enable)
 Set standby mode to be used. XOSC standby uses more power, but allows faster switching between Rx and Tx modes.
void setRfSwitchTable (const uint32_t(&pins)[Module::RFSWITCH_MAX_PINS], const Module::RfSwitchMode_t table[])
 Some modules contain external RF switch controlled by pins. This function gives RadioLib control over those pins to automatically switch between various modes.
int16_t forceLDRO (bool enable)
 Forces LoRa low data rate optimization. Only available in LoRa mode. After calling this method, LDRO will always be set to the provided value, regardless of symbol length. To re-enable automatic LDRO configuration, call LR2021::autoLDRO().
int16_t autoLDRO ()
 Re-enables automatic LDRO configuration. Only available in LoRa mode. After calling this method, LDRO will be enabled automatically when symbol length exceeds 16 ms, or in cases when SX128x LoRa bandwidths are used with SF > 10.
int16_t setBandwidth (uint32_t bw) override
 Sets LoRa bandwidth. Allowed values are 7.8, 10.4, 15.6, 20.8, 31.25, 41.67, 62.5, 83.34, 125.0, 101.56, 203.13, 250.0, 406.25, 500.0 kHz, 812.5 kHz and 1000.0 kHz.
int16_t setSpreadingFactor (uint8_t sf) override
 Sets LoRa spreading factor. Allowed values range from 5 to 12.
int16_t setSpreadingFactor (uint8_t sf, bool legacy)
 Sets LoRa spreading factor. Allowed values range from 5 to 12.
int16_t setCodingRate (uint8_t cr, bool longInterleave=false) override
 Sets LoRa coding rate denominator. Allowed values range from 4 to 8. Note that a value of 4 means no coding, is undocumented and not recommended without your own FEC.
int16_t setSyncWord (uint8_t syncWord)
 Sets LoRa sync word.
int16_t setPreambleLength (size_t len, size_t detLen=0xFFFFFFFF) override
 Sets preamble length for LoRa or GFSK modem. Allowed values range from 1 to 65535.
int16_t setTCXO (RadioLibTCXOVoltage_t voltage, uint32_t delay=1000000)
 Sets TCXO (Temperature Compensated Crystal Oscillator) configuration.
int16_t setCRC (uint8_t len, uint32_t initial=0x00001D0FUL, uint32_t polynomial=0x00001021UL, bool inverted=true)
 Sets CRC configuration.
int16_t invertIQ (bool enable) override
 Enable/disable inversion of the I and Q signals.
int16_t setBitRate (uint32_t br) override
 Sets GFSK bit rate. Allowed values range from 500 bps to 2 Mbps.
int16_t setFrequencyDeviation (uint32_t freqDev) override
 Sets GFSK frequency deviation. Allowed values range from 600 Hz to 500 kHz.
int16_t setRxBandwidth (uint32_t rxBw)
 Sets GFSK receiver bandwidth. Allowed values are 4.8, 5.8, 7.3, 9.7, 11.7, 14.6, 19.5, 23.4, 29.3, 39.0, 46.9, 58.6, 78.2, 93.8, 117.3, 156.2, 187.2, 234.3, 312.0, 373.6 and 467.0 kHz.
int16_t setSyncWord (uint8_t *syncWord, size_t len) override
 Sets GFSK sync word in the form of array of up to 8 bytes.
int16_t setNodeAddress (uint8_t nodeAddr)
 Sets node address. Calling this method will also enable address filtering for node address only.
int16_t setBroadcastAddress (uint8_t broadAddr)
 Sets broadcast address. Calling this method will also enable address filtering for node and broadcast address.
int16_t disableAddressFiltering ()
 Disables address filtering. Calling this method will also erase previously set addresses.
int16_t setDataShaping (uint8_t sh) override
 Sets time-bandwidth product of Gaussian filter applied for shaping. Allowed values are RADIOLIB_SHAPING_0_3, RADIOLIB_SHAPING_0_5, RADIOLIB_SHAPING_0_7 or RADIOLIB_SHAPING_1_0. Set to RADIOLIB_SHAPING_NONE to disable data shaping.
int16_t setEncoding (uint8_t encoding) override
 Sets transmission encoding. Available in GFSK mode only. Serves only as alias for PhysicalLayer compatibility.
int16_t fixedPacketLengthMode (uint8_t len=RADIOLIB_LR2021_MAX_PACKET_LENGTH)
 Set modem in fixed packet length mode. Available in GFSK mode only.
int16_t variablePacketLengthMode (uint8_t maxLen=RADIOLIB_LR2021_MAX_PACKET_LENGTH)
 Set modem in variable packet length mode. Available in GFSK mode only.
int16_t setWhitening (bool enabled, uint16_t initial=0x01FF)
 Sets GFSK whitening parameters.
int16_t checkDataRate (DataRate_t dr, ModemType_t modem=RADIOLIB_MODEM_NONE) override
 Check the data rate can be configured by this module.
int16_t setLrFhssConfig (uint8_t bw, uint8_t cr, bool narrowGrid, uint8_t hdrCount=3, uint16_t hopSeed=0x13A) override
 Sets LR-FHSS configuration.
int16_t setRxBoostedGainMode (uint8_t level)
 Enables or disables Rx Boosted Gain mode (additional Rx gain for increased power consumption).
RadioLibTime_t getTimeOnAir (size_t len) override
 Get expected time-on-air for a given size of payload.
int16_t getModem (ModemType_t *modem) override
 Get modem currently in use by the radio.
int16_t getMode (RadioModeType_t *mode) override
 Read the operating mode the radio is in, as the chip reports it. Unlike PhysicalLayer::stagedMode, which is what was last asked of the radio, this reads the hardware, so a caller can tell a radio that has left a mode on its own - a receive that did not survive a frame, or a chip that lost its state - from one that is still in it.
int16_t stageMode (RadioModeType_t mode, RadioModeConfig_t *cfg) override
 Stage mode of the radio to be launched later using launchMode.
int16_t launchMode () override
 Launch previously staged mode.
int16_t writeTxBuffer (const uint8_t *data, size_t len) override
 Write a payload into the transmit buffer without staging or starting a transmission. This allows the payload write, which is the slowest part of starting a transmission, to be done while the radio is busy with something else - during a channel scan, for example. The transmission is staged afterwards by calling stageMode with RADIOLIB_RADIO_MODE_TX and RadioModeConfig_t::transmit.data set to NULL, which sets the packet parameters and the IRQ mapping for the payload already in the buffer; transmit.len must still be set to its length. The buffer holds exactly this payload after the call, whether or not one was written before.
int16_t clearTxBuffer () override
 Discard a payload previously written by writeTxBuffer. On radios whose transmit buffer is simply overwritten by the next write there is nothing to discard, and this reports success without touching the radio.
float getVoltage (uint8_t bits=13)
 Read the supply voltage on the Vbat pin.
float getTemperature (uint8_t source, uint8_t bits=13)
 Read the temperature.
float getRSSI () override
 Gets received signal strength indicator. Overload with packet mode enabled for PhysicalLayer compatibility.
float getRSSI (bool packet, bool skipReceive=false)
 Gets RSSI (Received Signal Strength Indicator).
float getSNR () override
 Gets SNR (Signal to Noise Ratio) of the last received packet. Only available for LoRa modem.
int32_t getFrequencyError ()
 Gets frequency error of the latest received packet.
uint8_t randomByte () override
 Get one truly random byte from RSSI noise.
int16_t implicitHeader (size_t len)
 Set implicit header mode for future reception/transmission.
int16_t explicitHeader ()
 Set explicit header mode for future reception/transmission.
int16_t ookDetector (uint16_t pattern=0x0285, uint8_t len=16, uint8_t repeats=0, bool syncRaw=false, bool rising=false, uint8_t sofLen=0)
 Set OOK detector properties. The default values are set to allow ADS-B reception.
int16_t setOokDetectionThreshold (int16_t level)
 Set OOK detection threshold.
int16_t setSideDetector (const LR2021LoRaSideDetector_t *cfg, size_t numDetectors)
 Configure LoRa side detector, which enables to detect mutiple spreading factors and receive one of them. The following limitations apply: In Rx mode, all side-detector spreading factors must be higher than the primary one (configured via begin or setSpreadingFactor) For CAD mode, the above condition is inverted - all side-detector spreading factors must be smaller All packets to be detected must have the same header type (implicit or explicit) If bandwidth is higher than 500 kHz, at most 2 side detectors are allowed. If the primary spreading factor is 10, 11 or 12, at most 2 side detectors are allowed. All spreading factors must be different. The difference between maximum and minimum spreading factor used must be less than or equal to 4.
int16_t setGain (uint8_t gain)
 Sets gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 13, where 13 is the highest gain. Set to 0 to enable automatic gain control (recommended).
int16_t setTempCompensationInternal (uint8_t mode)
 Enable compensation of crystal self-heating drift during transmission, using the internal temperature sensor only. Crystal (non-TCXO) only, must be called after begin().
int16_t setTempCompensationNTC (uint8_t mode, uint16_t rRatio, uint16_t betaK, uint8_t delay)
 Enable compensation of crystal self-heating drift during transmission, using an external NTC thermistor at the crystal in addition to the internal sensor. Crystal (non-TCXO) only, must be called after begin(). The NTC parameters depend on the board, so there are no defaults: the chip accepts any value, and a wrong one makes it compensate for the wrong temperature. NOTE: This method should be considered experimental as testing has shown it can actually lead to worse results than just using setTempCompensationInternal. See https://github.com/jgromes/RadioLib/pull/1907 for details.
int16_t getLoRaPacketStatus (uint8_t *cr, bool *crc, uint8_t *packetLen=NULL, float *snrPacket=NULL, float *rssiPacket=NULL, float *rssiSignalPacket=NULL, uint8_t *detector=NULL, int32_t *freqError=NULL)
 Read status of the last received packet. Each parameter can be set to NULL if the caller is not intending to process it.
int16_t getLoRaRxHeaderInfo (uint8_t *cr, bool *hasCRC)
 Get LoRa header information from last received packet. Implementation based on getLoRaPacketStatus.
int16_t getErrors (uint16_t *err)
 Get internal error bits.
int16_t getLoRaRxStats (uint16_t *pktRxTotal, uint16_t *pktCrcError, uint16_t *headerCrcError, uint16_t *falseSynch)
 Get LoRa Rx statistics.
int16_t getRangingStats (uint16_t *exchangeValid, uint16_t *requestValid, uint16_t *responseDone, uint16_t *timeout, uint16_t *requestDiscarded)
 Get ranging Rx statistics.
int16_t getGfskRxStats (uint16_t *packetRx, uint16_t *packetCrcError, uint16_t *lenError, uint16_t *preambleDet, uint16_t *syncOk, uint16_t *syncFail, uint16_t *timeout)
 Get GFSK Rx statistics.
int16_t getOqpskRxStats (uint16_t *packetRx, uint16_t *crcError, uint16_t *lenError)
 Get OQPSK Rx statistics.
int16_t getFlrcRxStats (uint16_t *packetRx, uint16_t *packetCrcError, uint16_t *lenError)
 Get FLRC Rx statistics.
int16_t getOokRxStats (uint16_t *packetRx, uint16_t *crcError, uint16_t *lenError)
 Get OOK Rx statistics.
int16_t setRegulatorLDO ()
 Set regulator mode to LDO.
int16_t setRegulatorDCDC ()
 Set regulator mode to DC-DC.
int16_t setFifoSize (bool rx, size_t size)
 Set the size of Rx/Tx FIFO.
int16_t setIQStream (uint32_t rate, bool fifo)
 Enable streaming of raw I/Q samples. After calling, the radio has to be reset in order to return to normal configuration. NOTE: This functionality is undocumented and experimental! Credit to https://github.com/SAMS0N1TE/lr2021-sdr.
int16_t getFifoIrqFlags (uint8_t *rxFifoFlags, uint8_t *txFifoFlags)
 Read tx FIFO level.
int16_t clearFifoIrqFlags (uint8_t rxFifoFlags, uint8_t txFifoFlags)
 Clear FIFO IRQ flags.
int16_t getRxFifoLevel (uint16_t *level)
 Read Rx FIFO level.
int16_t getTxFifoLevel (uint16_t *level)
 Read Tx FIFO level.
int16_t readRadioRxFifo (uint8_t *data, size_t len)
 Directly read contents of the Rx FIFO. WARNING: This method accesses the FIFO directly and is meant for advanced use cases only! For common packet processing, use the readData method.
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method.
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.
virtual int16_t startTransmit (const uint8_t *data, size_t len, uint8_t addr=0)
 Interrupt-driven binary transmit method.
virtual int16_t startReceive (uint32_t timeout, RadioLibIrqFlags_t irqFlags=RADIOLIB_IRQ_RX_DEFAULT_FLAGS, RadioLibIrqFlags_t irqMask=RADIOLIB_IRQ_RX_DEFAULT_MASK, size_t len=0)
 Interrupt-driven receive method. A DIO pin will be activated when full packet is received. Must be implemented in module class.
Public Member Functions inherited from LRxxxx
 LRxxxx (Module *mod)
int16_t reset ()
 Reset method. Will reset the chip to the default state using RST pin.
uint32_t getIrqStatus ()
 Reads the current IRQ status.
RadioLibTime_t calculateRxTimeout (RadioLibTime_t timeoutUs) override
 Calculate the timeout value for this specific module / series (in number of symbols or units of time).
Public Member Functions inherited from PhysicalLayer
 PhysicalLayer ()
 Default constructor.
virtual ~PhysicalLayer ()=default
 Default destructor.
int16_t transmit (const char *str, uint8_t addr=0)
 C-string transmit method.
int16_t startTransmit (const char *str, uint8_t addr=0)
 Interrupt-driven Arduino String transmit method. Unlike the standard transmit method, this one is non-blocking. Interrupt pin will be activated when transmission finishes.
virtual int16_t finishTransmit ()
 Clean up after transmission is done.
int16_t setOutputPowerOffset (int8_t offset)
 Sets offset of the output power. Useful for devices where the radio has an external power amplifier, or of the RF system has a known loss between the radio and the antenna. NOTE: This method must be called BEFORE any calls to radio.begin() or radio.setOutputPower() for the offset to be applied!
int16_t setOutputPowerOffset (const int8_t *lut, size_t steps)
 Sets offset of the output power. Useful for devices where the radio has an external power amplifier, or of the RF system has a known loss between the radio and the antenna. This overload allows to compensate a non-linear PA gain, dependant on the radio power output via a lookup table. NOTE: This method must be called BEFORE any calls to radio.begin() or radio.setOutputPower() for the offset to be applied!
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.
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 size.
uint32_t getIrqMapped (RadioLibIrqFlags_t irq)
 Convert from radio-agnostic IRQ flags to radio-specific flags.
int16_t checkIrq (RadioLibIrqType_t irq)
 Check whether a specific IRQ bit is set (e.g. RxTimeout, CadDone).
int16_t setIrq (RadioLibIrqFlags_t irq)
 Set interrupt on specific IRQ bit(s) (e.g. RxTimeout, CadDone). Keep in mind that not all radio modules support all RADIOLIB_IRQ_ flags!
int16_t clearIrq (RadioLibIrqFlags_t irq)
 Clear interrupt on a specific IRQ bit (e.g. RxTimeout, CadDone). Keep in mind that not all radio modules support all RADIOLIB_IRQ_ flags!
int32_t random (int32_t max)
 Get truly random number in range 0 - max.
int32_t random (int32_t min, int32_t max)
 Get truly random number in range min - max.
int16_t startDirect ()
 Configure module parameters for direct modes. Must be called prior to "ham" modes like RTTY or AX.25. Only available in FSK mode.
int16_t setDirectSyncWord (uint32_t syncWord, uint8_t len)
 Set sync word to be used to determine start of packet in direct reception mode.
virtual void setDirectAction (void(*func)(void))
 Set interrupt service routine function to call when data bit is received in direct mode. Must be implemented in module class.
virtual void readBit (uint32_t pin)
 Function to read and process data bit in direct reception mode. Must be implemented in module class.
int16_t available ()
 Get the number of direct mode bytes currently available in buffer.
void dropSync ()
 Forcefully drop synchronization.
uint8_t read (bool drop=true)
 Get data from direct mode buffer.
virtual void setIrqAction (void(*func)(void), bool rising=true)
 Sets interrupt service routine to call when IRQ is activated.
virtual void clearIrqAction ()
 Clears interrupt service routine to call when IRQ is activated.
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 miss any messages. Useful only for LoRa modems.
int8_t getOutputPowerMin () const
 Get the minimum output power supported by the radio. This includes any previously configured PA offset.
int8_t getOutputPowerMax () const
 Get the maximum output power supported by the radio. This includes any previously configured PA offset.

Additional Inherited Members

Public Types inherited from LR2021
enum  OpMode_t {
  MODE_END_OF_TABLE = Module::MODE_END_OF_TABLE , MODE_STBY = Module::MODE_IDLE , MODE_RX = Module::MODE_RX , MODE_TX = Module::MODE_TX ,
  MODE_RX_HF , MODE_TX_HF
}
 Custom operation modes for LR2021. Needed because LR2021 has several modems (sub-GHz, 2.4 GHz etc.) in one package. More...
Static Public Member Functions inherited from PhysicalLayer
static float getNumSymbols (DataRate_t dr, PacketConfig_t pc, size_t len)
 Convert from bytes to LoRa symbols.
Public Attributes inherited from LR2021
uint32_t irqDioNum = 5
 Which DIO pin is to be used as the interrupt pin.
bool fastCad = false
 Determines the type of Lora CAD to perform, either "standard" CAD (same as is implemented LR11x0, SX126x and others), or a "fast" CAD if set to true. If there is no signal to be detected, fast CAD should return faster than standard CAD.
RadioLibTCXOVoltage_t tcxoVoltage = Voltage1V6
 TCXO reference voltage to be set on DIO3. Defaults to 1.6 V. If you are seeing -706/-707 error codes, it likely means you are using non-0 value for module with XTAL. To use XTAL, set this value to RadioLibTCXOVoltage_t::VoltageNone.
Public Attributes inherited from PhysicalLayer
float freqStep
 Frequency step of the synthesizer in Hz.
size_t maxPacketLength
 Maximum length of packet that can be received by the module.
bool resetOnStartup = true
 Whether to reset the module on startup. Setting to false allows to restore radio operation by calling begin after deep sleep mode on some platforms (like ESP32).

Detailed Description

Derived class for LR2012 modules. The LR2012 is the sub-GHz member of the LR20xx family: it shares the LR2021 command set, but has no high-frequency front end and no FLRC, O-QPSK, Bluetooth LE or Z-Wave support.

Constructor & Destructor Documentation

◆ LR2012()

LR2012::LR2012 ( Module * mod)

Default constructor.

Parameters
modInstance of Module that will be used to communicate with the radio.

The documentation for this class was generated from the following files:
  • src/modules/LR2021/LR2012.h
  • src/modules/LR2021/LR2012.cpp