Max TX power Classic bluetooth for ESP32

5.4k views Asked by At

I have been using esp32 for some projects.

Now i want to include classic bluetooth with a serial profile for one of our old projects.

In theory ESP32 is class 1,2,3 Bluetooth and in theory it supports 100meters.

I have been trying to raise the TX power for bluetooth playing with function esp_bredr_tx_power_set.

I have been able to raise it a bit passing params:

esp_bredr_tx_power_set(ESP_PWR_LVL_P9,ESP_PWR_LVL_P9);

But it is not enough. I have another bluetooth class 1 device with serial profile with more power (one from bluegiga).

Power consumption is not a problem in this project but distance is critical.

Is it possible to raise the power of classic bluetooth more on ESP32?

To check that power is assigned right, i used the get fuction

  esp_power_level_t min,max;
  esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_ADV,ESP_PWR_LVL_P9 );
  esp_bredr_tx_power_set(ESP_PWR_LVL_P9,ESP_PWR_LVL_P9  );
  delay(1000);
  esp_bredr_tx_power_get(&min,&max);
  Serial.printf("min %d max %d",min,max);

The pause is used to be sure that power is changed (if you do it without delay, you see the old value). Probably 1s is too much, but this is just a test.

Thanks.

1

There are 1 answers

0
claes On BEST ANSWER

The highest TX output for an ESP32 is +9dbm, which falls in-between BT class 1 (+12dbm) and class 2 (+4dbm). So you have what it seems already set your TX power output to the maximum. It's not clear if you are using an PCB antenna or an external antenna, the latter will of course increase the range.

For the different BT power classes see this link

See Espressive document (scroll down to section with ESP_PWR_LVL_P9)