RAK3112 and RadioLib

Hi,

We try to port our software on the RAK3112. Our software use RadioLib (RadioLib: RadioLib Documentation).
We notice that on the RAK3112, the GIO04 is used for “SX1262 RF switch power”.

Is there anyone who know how to set it with RadioLib ?
Is there a specific configuration for

  • radio.setRfSwitchTable(rfswitch_pins, rfswitch_table);
  • radio.setTCXO( ?? );

Many thanks for your help

Greg

Welcome to RAK forum @meg068

The RF switch on RAK3112 is not controlled by the MCU (ESP32) unlike other boards. It is connected to DIO2 so no need to have the RfSwitchTable.

You can try this configuration.

// ============================================================
// RAK3112 / SX1262 PIN MAP
// ============================================================
#define LORA_NSS    7
#define LORA_SCK    5
#define LORA_MOSI   6
#define LORA_MISO   3
#define LORA_RESET  8
#define LORA_BUSY   48
#define LORA_DIO1   47

SX1262 radio = new Module(LORA_NSS, LORA_DIO1, LORA_RESET, LORA_BUSY);

//inside void setup
radio.setDio2AsRfSwitch(true); // RF switching via DIO2
radio.setTCXO(1.6); // TCXO powered via DIO3
SPI.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_NSS);

Hi,

Many thanks… it works :slight_smile: