MySensors Library & Examples  2.3.2-62-ge298769
Macros
+ Collaboration diagram for SX126x:

Detailed Description

These options are specific to the SX126x family of wireless transport modules.

The following chips are supported by this driver:

Macros

#define MY_RADIO_SX126x
 Define this to use SX126x based radios for sensor network communication.
 
#define MY_SX126x_CS_PIN   DEFAULT_SX126x_CS_PIN
 sx126x SPI chip select pin.
 
#define MY_SX126x_IRQ_PIN   DEFAULT_SX126x_IRQ_PIN
 xs126x IRQ pin (DIO1)
 
#define MY_SX126x_FREQUENCY   (SX126x_868MHZ)
 The frequency to use. More...
 
#define MY_SX126x_LORA_SF   LORA_SF7
 The LoRa spreading factor to use. More...
 
#define MY_SX126x_LORA_BW   LORA_BW_125
 The LoRa bandwidth to use. More...
 
#define MY_SX126x_LORA_CR   LORA_CR_4_5
 The LoRa coding rate to use. More...
 
#define MY_SX126x_TCXO_VOLTAGE
 TCXO output voltage for internal TCXO control. More...
 
#define MY_SX126c_TCXO_STARTUP_DELAY
 Time in ms it takes the TXCO to start up and stabilize. More...
 
#define MY_SX126x_USE_TCXO
 The board has a TCXO for SX126x frequency generation. More...
 
#define MY_SX126x_USE_DIO2_ANT_SWITCH
 Use DIO2 as antenna switch output.
 
#define MY_SX126x_ANT_SWITCH_PIN
 Pin to switch antenna circuit between RX and TX mode. More...
 
#define MY_SX126x_VARIANT   (1)
 details if it's a sx1261 or sx1262 More...
 
#define MY_SX126x_POWER_PIN
 Define this to use the SX126x power pin (optional).
 
#define MY_SX126x_RESET_PIN
 Define this to use the SX126x reset pin (optional).
 
#define MY_SX126x_BUSY_PIN
 Defines this to use the SX126x busy pin (optional).
 
#define MY_SX126x_DISABLE_ATC
 If defined, ATC will be disabled.
 
#define MY_SX126x_ATC_TARGET_DBM   (-70)
 Sets the target RSSI level for the ATC. Defaults to -70dBm.
 
#define MY_SX126x_MAX_POWER_LEVEL_DBM   (20)
 Sets the maximum allowable output power level. Default: 13dBm (20mW) More...
 
#define MY_SX126x_MAX_POWER_LEVEL_DBM
 Sets the maximum allowable output power level. Default: 13dBm (20mW) More...
 
#define MY_SX126x_MIN_POWER_LEVEL_DBM   (-3)
 Sets the minimum output power level. Used in ATC. Default: 0dBm (0.5mW)
 
#define MY_SX126x_MIN_POWER_LEVEL_DBM
 Sets the minimum output power level. Used in ATC. Default: 0dBm (0.5mW)
 

Macro Definition Documentation

◆ MY_SX126c_TCXO_STARTUP_DELAY

#define MY_SX126c_TCXO_STARTUP_DELAY

Time in ms it takes the TXCO to start up and stabilize.

Will be set to 10ms if MY_SX126x_TCXO_VOLTAGE is set but MY_SX126c_TCXO_STARTUP_DELAY is not set.

Definition at line 2775 of file MyConfig.h.

◆ MY_SX126x_ANT_SWITCH_PIN

#define MY_SX126x_ANT_SWITCH_PIN

Pin to switch antenna circuit between RX and TX mode.

Not needed if DIO2 is connected to the antenna switch circuit. Then you have to set MY_SX126x_USE_DIO2_ANT_SWITCH

Definition at line 2778 of file MyConfig.h.

◆ MY_SX126x_FREQUENCY

#define MY_SX126x_FREQUENCY   (SX126x_868MHZ)

The frequency to use.

  • SX126x_169MHZ
  • SX126x_315MHZ
  • SX126x_434MHZ
  • SX126x_868MHZ
  • SX126x_915MHZ
  • Custom frequency in Hz

This must match the hardware version of the SX126x radio. Additional information: https://en.wikipedia.org/wiki/Short_Range_Devices

Definition at line 1069 of file MyConfig.h.

◆ MY_SX126x_LORA_BW

#define MY_SX126x_LORA_BW   LORA_BW_125

The LoRa bandwidth to use.

possible values

value Bandwith
LORA_BW_500 500 kHz
LORA_BW_250 250 kHz
LORA_BW_125 125 kHz
LORA_BW_062 62.5 kHz
LORA_BW_041 41.67 kHz
LORA_BW_031 31.25 kHz
LORA_BW_020 20.83 kHz
LORA_BW_015 15.63 kHz
LORA_BW_010 10.45 kHz
LORA_BW_007 7.81 kHz

default is LORA_BW_125

Definition at line 1106 of file MyConfig.h.

◆ MY_SX126x_LORA_CR

#define MY_SX126x_LORA_CR   LORA_CR_4_5

The LoRa coding rate to use.

Possible values are

value Coding rate
LORA_CR_4_5 4/5
LORA_CR_4_6 4/6
LORA_CR_4_7 4/7
LORA_CR_4_8 4/8

Default is LORA_CR_4_5

Definition at line 1124 of file MyConfig.h.

◆ MY_SX126x_LORA_SF

#define MY_SX126x_LORA_SF   LORA_SF7

The LoRa spreading factor to use.

can be LORA_SF5, LORA_SF6, LORA_SF7, LORA_SF8, LORA_SF9, LORA_SF10, LORA_SF11 or LORA_SF12

default is LORA_SF7

Definition at line 1082 of file MyConfig.h.

◆ MY_SX126x_MAX_POWER_LEVEL_DBM [1/2]

#define MY_SX126x_MAX_POWER_LEVEL_DBM   (20)

Sets the maximum allowable output power level. Default: 13dBm (20mW)

Please check local regulations!

Definition at line 2784 of file MyConfig.h.

◆ MY_SX126x_MAX_POWER_LEVEL_DBM [2/2]

#define MY_SX126x_MAX_POWER_LEVEL_DBM

Sets the maximum allowable output power level. Default: 13dBm (20mW)

Please check local regulations!

Definition at line 2784 of file MyConfig.h.

◆ MY_SX126x_TCXO_VOLTAGE

#define MY_SX126x_TCXO_VOLTAGE

TCXO output voltage for internal TCXO control.

If set, DIO3 will be used to provide power to the TCXO when needed

SX126x_TCXO_1V6 1.6V TCXO voltage SX126x_TCXO_1V7 1.7V TCXO voltage SX126x_TCXO_1V8 1.8V TCXO voltage SX126x_TCXO_2V2 2.2V TCXO voltage SX126x_TCXO_2V4 2.4V TCXO voltage SX126x_TCXO_2V7 2.7V TCXO voltage SX126x_TCXO_3V0 3.0V TCXO voltage SX126x_TCXO_3V3 3.3V TCXO voltage

However, the TCXO output voltage is at most 200mV below the supply voltage.

Definition at line 2774 of file MyConfig.h.

◆ MY_SX126x_USE_TCXO

#define MY_SX126x_USE_TCXO

The board has a TCXO for SX126x frequency generation.

This will be forced if MY_SX126x_TCXO_VOLTAGE or MY_SX126c_TCXO_STARTUP_DELAY are set

Definition at line 2776 of file MyConfig.h.

◆ MY_SX126x_VARIANT

#define MY_SX126x_VARIANT   (1)

details if it's a sx1261 or sx1262

  • 1: sx1261
  • 2: sx1262 If not set, sx1262 is selected

Definition at line 1192 of file MyConfig.h.