Page 1 of 1

esp_ble_tx_power_set not setting the power level of a PAwR response.

Posted: Sun Nov 02, 2025 12:53 pm
by kamo104
I'm trying to set the PAwR response power level on an ESP32C6 in this example https://github.com/espressif/esp-idf/tr ... r_adv_conn to ESP_PWR_LVL_P20 (20dBm).

But it doesn't seem to work despite doing that with:

Code: Select all

esp_err_t err = esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_DEFAULT, ESP_PWR_LVL_P20);
if (err == ESP_OK) {
    ESP_LOGI(TAG, "TX power set to +20 dBm for default");
} else {
    ESP_LOGE(TAG, "Failed to set TX power, err=%d", err);
}
I also tried checking whether it maybe wasn't set on only the pawr connection but reading it with:

Code: Select all

esp_ble_tx_power_get_enhanced(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, event->periodic_report.sync_handle)
also returned ESP_PWR_LVL_P20. Later in the same function the response data is being set on the same sync_handle.
ble_gap_periodic_adv_set_response_data(event->periodic_report.sync_handle, &param, data);

I'm suspecting that the ESP32C6 isn't using the 20dBm power for the responses because the RSSI I'm getting is:

Code: Select all

I (184003) NimBLE_BLE_PAwR_CONN: [Request] data: 39, subevt start:3, subevt count:2
I (186503) NimBLE_BLE_PAwR_CONN: [Response] subevent:0, response_slot:2, data_length:10, rssi:-69, tx_pwr:127
I (186503) NimBLE_BLE_PAwR_CONN: data: 0x00, 0x02, 0x3a, 0xda, 0x1a, 0xdb, 0x51, 0x10, 0x00, 0x00
while the RSSI of the periodic advertisement is:

Code: Select all

I (873) NimBLE_BLE_PAwR_CONN: [Disc advertiser] addr 10:51:db:1a:d8:da, props: 0x0, rssi:-36
I know PAwR is a VERY recent feature but I guess I would like to know if there is any way of setting the response power. Any help would be much appreciated!