Hardcoding BLE TX Power

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
Posts: 4
Joined: Thu Jan 30, 2020 11:14 pm

Hardcoding BLE TX Power

Post by forum_user » Mon Feb 10, 2020 6:43 pm

I'm interested in hardcoding the maximum supported TX power value for BLE scans for hardware testing. According to a recent post, +9db is the max supported value via the esp-idf API:

https://github.com/espressif/esp-idf/is ... -493992705

It seems this has been briefly discussed previously and is a planned feature:

https://github.com/micropython/micropyt ... -503046267
https://github.com/micropython/micropyt ... -540526800

I don't need to modify it on the fly, so hardcoding this prior to firmware compilation is fine. Could anyone give me some basic guidance on how to achieve this?

User avatar
Posts: 2015
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: Hardcoding BLE TX Power

Post by jimmo » Sat Feb 15, 2020 5:11 am

I think you should be able to add the call to esp_ble_tx_power_set in ports/esp32/nimble.c / mp_bluetooth_nimble_port_preinit()

Post Reply