From 5632e2771e00ab9f98160376e761ad105a89f6cf Mon Sep 17 00:00:00 2001 From: taco Date: Fri, 14 Mar 2025 15:22:42 +1100 Subject: [PATCH] added conditional to room server radio bringup for supporting RA01sh radio on faketec --- examples/simple_room_server/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/simple_room_server/main.cpp b/examples/simple_room_server/main.cpp index bd4564ee..e2572613 100644 --- a/examples/simple_room_server/main.cpp +++ b/examples/simple_room_server/main.cpp @@ -751,6 +751,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: ");