B4R Question BLUETOOTH transmission power in ESP32

Gerardo Tenreiro

Active Member
Licensed User
Hello
Does anyone know if the BLUETOOTH output power can be modified on the ESP32?
I have an application that I want to limit the scope and thus the consumption of the module.
I can't find the way.
Thank you so much
 

peacemaker

Expert
Licensed User
Longtime User
Google for something like:
B4X:
Sub Set_BTmaxPower
    RunNative("SetBTpower", Null)
End Sub

#if C
#include <esp_bt.h>

    void SetBTpower (B4R::Object* o) {
           //esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_ADV,ESP_PWR_LVL_P9);
          //Serial.println(esp_bredr_tx_power_set(ESP_PWR_LVL_P3, ESP_PWR_LVL_P3));
        esp_bredr_tx_power_set(ESP_PWR_LVL_P9, ESP_PWR_LVL_P9);
    }
#end if
 
Upvote 0

Gerardo Tenreiro

Active Member
Licensed User
Thank you
I would like to be able to pass a parameter that allows the power to be adjusted, according to the documentation I found the minimum and maximum power is adjusted, but I do not understand this type of adjustment. What I need is to adjust the BlueTooth transmission power to limit the range.
I would also like to be able to pass a parameter that adjusts the power.
Thank you so much
 
Upvote 0
Top