ESP32 increase TX power

For general Flowcode discussion that does not belong in the other sections.
Post Reply
MJU20
Posts: 246
http://meble-kuchenne.info.pl
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 75 times
Been thanked: 50 times

ESP32 increase TX power

Post by MJU20 »

I'm using a ESP Wrover with Flowcode 9.

Some features I set an disable via the ESP-IDF 4.1.CMD tool:
IDF.jpg
IDF.jpg (86.48 KiB) Viewed 797 times
But I can't find a way to increase TX power (or set the RX to more sensitive value).
Here => https://docs.espressif.com/projects/esp ... _wifi.html I found a way to set a different value for TX but don't know how to get this working in my FC project.

The

Code: Select all

esp_err_t esp_wifi_set_max_tx_power(int8_t power)
would do the trick:
esp_err_t esp_wifi_set_max_tx_power(int8_t power)

Set maximum transmitting power after WiFi start.

Attention

1. Maximum power before wifi startup is limited by PHY init data bin.
Attention

2. The value set by this API will be mapped to the max_tx_power of the structure wifi_country_t variable.
Attention

3. Mapping Table {Power, max_tx_power} = {{8, 2}, {20, 5}, {28, 7}, {34, 8}, {44, 11}, {52, 13}, {56, 14}, {60, 15}, {66, 16}, {72, 18}, {80, 20}}.
Attention

4. Param power unit is 0.25dBm, range is [8, 84] corresponding to 2dBm - 20dBm.
Attention

5. Relationship between set value and actual value. As follows: {set value range, actual value} = {{[8, 19],8}, {[20, 27],20}, {[28, 33],28}, {[34, 43],34}, {[44, 51],44}, {[52, 55],52}, {[56, 59],56}, {[60, 65],60}, {[66, 71],66}, {[72, 79],72}, {[80, 84],80}}.

Parameters

power – Maximum WiFi transmitting power.
Returns

ESP_OK: succeed

ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init

ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start

ESP_ERR_WIFI_ARG: invalid argument, e.g. parameter is out of range
Any help on this one?
Thanks already!

BenR
Matrix Staff
Posts: 1747
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: ESP32 increase TX power

Post by BenR »

Hello,

If you go to your start menu and type ESP then you should get the ESP-IDF command prompt pop up, open this.

Next browse to the folder containing your flowcode compilation files. for example.

C:
cd c:\users\ben\desktop\esp_test

Next run the following command

idf.py menuconfig

That should allow you to configure the options for your specific project and should allow you to save for next time you compile to chip using Flowcode.

MJU20
Posts: 246
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 75 times
Been thanked: 50 times

Re: ESP32 increase TX power

Post by MJU20 »

Hey thank you Ben, but I've posted the screenshot just to let you know that I already use the ESP-IDF tool..

But I can't find a setting for the TX power for the Wifi..
That's the thing I want to change.

MJU20
Posts: 246
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 75 times
Been thanked: 50 times

Re: ESP32 increase TX power

Post by MJU20 »

In the SDKCONFIG there are settings:

Code: Select all

CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
CONFIG_ESP32_PHY_MAX_TX_POWER=20
But somebody warned me to not mess with setting directly in the SDKCONFIG.

By changing the value, my guess is that the power is increased?

MJU20
Posts: 246
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 75 times
Been thanked: 50 times

Re: ESP32 increase TX power

Post by MJU20 »

At last, I found it's setting in the PHY settings..

Component config -> PHY -> MAX TX Power...

Found it by reading where the TX power is in the SDKCONFIG file..

I wanted to share this for others to find rare settings..

Post Reply