← index #8104Issue #5489
Off-topic · high · value 1.158
QUERY · ISSUE

ESP32: Setting Bluetooth TX power when initalizing BLE

openby ctschachopened 2021-12-20updated 2026-01-13
port-esp32

I had trouble connecting to a Bluetooth master running on an ESP32. After about 4m I couldn't get a reliable connection anymore.

After trying out different ESP32's and external antennas, I run across the following forum post:

https://forum.micropython.org/viewtopic.php?t=7733#p62651

He is increasing the Bluetooth power directly in the init function with the following two commands:

    esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_DEFAULT, ESP_PWR_LVL_P9);
    esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_ADV, ESP_PWR_LVL_P9);

And that actually solved the problem. Not sure what the default Bluetooth TX power is, but would there be a chance that you can set the TX power from the bluetooth init-function inside of MicroPython?

CANDIDATE · ISSUE

BLE on ESP32 inconsistent init time (sometimes > 10s)

closedby Zukialopened 2020-01-03updated 2020-09-08
port-esp32

Initiating and activating bluetooth with

import bluetooth
ble = bluetooth.BLE()
ble.active(True)

normally take around 200ms to execute. But sometimes it takes over 10 seconds.

occurs with esp32-idf4-20191220-v1.12.bin

Further Details at this forum post.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied