XIAO ESP32C6 - Expected RSSI with internal antenna

I have 2 XIAO ESP32C6 4" apart.

I am sending a broadcast using esp-now.
When receiving I am looping over the peers_table to display rssi.
In this example I am getting -67.


At this distance I expected better signal.
At 2’ it drops to -80
At 4’ it drops to -90
At 14’ it stops receiving data.

Do I just have to purchase external antennas to make this work more reliably at greater distances ?

The antennas must be properly facing each other.
To explicitly use the on-board antenna, try this

#define RF_SW_PWR    3  // RF switch power pin
#define RF_PORT     14  // RF port select pin

  // RF switch select default setting LOW:power on, LOW:built-in antenna
  pinMode(RF_SW_PWR, OUTPUT);
  digitalWrite(RF_SW_PWR, LOW);   // LOW:power on
  pinMode(RF_PORT, OUTPUT);
  digitalWrite(RF_PORT, HIGH);    // HIGH:external antenna

The following can be used to change the output.

  // N15, N12, N9, N6, N3, N0, P3, P6, P9, P12, P15, P18, P20
  esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_DEFAULT, ESP_PWR_LVL_N0);

The following links may also be helpful.

1 Like