|
|
|
@ -686,6 +686,13 @@ void setup() { |
|
|
|
spi.begin(P_LORA_SCLK, P_LORA_MISO, P_LORA_MOSI); |
|
|
|
#endif |
|
|
|
int status = radio.begin(LORA_FREQ, LORA_BW, LORA_SF, LORA_CR, RADIOLIB_SX126X_SYNC_WORD_PRIVATE, LORA_TX_POWER, 8, tcxo); |
|
|
|
#if defined(FAKETEC) |
|
|
|
if (status == RADIOLIB_ERR_SPI_CMD_FAILED || status == RADIOLIB_ERR_SPI_CMD_INVALID) { |
|
|
|
#define SX126X_DIO3_TCXO_VOLTAGE (0.0f); |
|
|
|
tcxo = SX126X_DIO3_TCXO_VOLTAGE; |
|
|
|
status = radio.begin(LORA_FREQ, LORA_BW, LORA_SF, LORA_CR, RADIOLIB_SX126X_SYNC_WORD_PRIVATE, LORA_TX_POWER, 8, tcxo); |
|
|
|
} |
|
|
|
#endif |
|
|
|
if (status != RADIOLIB_ERR_NONE) { |
|
|
|
delay(5000); |
|
|
|
Serial.print("ERROR: radio init failed: "); |
|
|
|
|