Hi
Is it possible to change the Tx power of an ESP32 (wroom) using some C-code? I see some examples of setting BT power but nothing for WiFi. From the AT commands I can see how it could be done but just wondering if there was a simpler way to do it from within a chart, possibly after being intialised. This is the first time I've actually done something with one and still very much getting to grips with it.
Regards
Can ESP Tx Power be set?
-
- Valued Contributor
- Posts: 1528
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
-
- Valued Contributor
- Posts: 1002
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 191 times
- Been thanked: 217 times
Re: Can ESP Tx Power be set?
Hi Lain
Yes set the BT tx power.
https://flowcode.co.uk/forums/viewtopic ... 6&start=10
I made some test and
Default powersetting is:
ESP_PWR_LVL_N0 = 4, !< Corresponding to 0dbm
ESP_PWR_LVL_P3 = 5, !< Corresponding to +3dbm
I have now set to the minimum
ESP_PWR_LVL_N12 = 0, !< Corresponding to -12dbm
ESP_PWR_LVL_N9 = 1, !< Corresponding to -9dbm
CODE: SELECT ALL
esp_bredr_tx_power_set(ESP_PWR_LVL_N12,ESP_PWR_LVL_N9);
regards
Stefan
Yes set the BT tx power.
https://flowcode.co.uk/forums/viewtopic ... 6&start=10
I made some test and
Default powersetting is:
ESP_PWR_LVL_N0 = 4, !< Corresponding to 0dbm
ESP_PWR_LVL_P3 = 5, !< Corresponding to +3dbm
I have now set to the minimum
ESP_PWR_LVL_N12 = 0, !< Corresponding to -12dbm
ESP_PWR_LVL_N9 = 1, !< Corresponding to -9dbm
CODE: SELECT ALL
esp_bredr_tx_power_set(ESP_PWR_LVL_N12,ESP_PWR_LVL_N9);
regards
Stefan
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Can ESP Tx Power be set?
Hi Stefan
Thanks for the reply.
I did look at that and mistakenly thought it was sending via USB to the ESP, not from it. I should invest in glasses
So if I include your two C-blocks with appropriate numbers (P6/P9) that would set it to the maximum?
Regards
Thanks for the reply.
I did look at that and mistakenly thought it was sending via USB to the ESP, not from it. I should invest in glasses

So if I include your two C-blocks with appropriate numbers (P6/P9) that would set it to the maximum?
Regards
-
- Valued Contributor
- Posts: 1002
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 191 times
- Been thanked: 217 times
Re: Can ESP Tx Power be set?
Hi Lain
Yes with this two commands you can set the maximal power for Bluetooth sending.
Note I used exactly for the other direction, Bluetooth set to minimum power.
It's in the program demodata includet.
There is also an idea for the BT interrupt in ESP32, to make the inerrupt routine very short and also for the USB Interrupt.
regards
Stefan
Yes with this two commands you can set the maximal power for Bluetooth sending.
Note I used exactly for the other direction, Bluetooth set to minimum power.
It's in the program demodata includet.
There is also an idea for the BT interrupt in ESP32, to make the inerrupt routine very short and also for the USB Interrupt.
regards
Stefan
- Attachments
-
- Demodata_ESP32_v2.fcfx
- (112.13 KiB) Downloaded 76 times
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Can ESP Tx Power be set?
Hi
Thanks for this, appreciated.
I'll give it a go later and let you know how I get on.
Regards
Thanks for this, appreciated.
I'll give it a go later and let you know how I get on.
Regards
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Can ESP Tx Power be set?
Hi
I discovered it is a dodgy board.
Set it to be an AP then "looked" for a near impossible to find signal. It could be the PCB antenna track or the chip itself, but unless it's a few feet from anything it's as good as invisible.
Thanks again for your replies.
Regards
I discovered it is a dodgy board.
Set it to be an AP then "looked" for a near impossible to find signal. It could be the PCB antenna track or the chip itself, but unless it's a few feet from anything it's as good as invisible.
Thanks again for your replies.
Regards
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Can ESP Tx Power be set?
Hi
I obtained another board (same one, same source). Still pretty much useless though. Any further than a few metres from the router and it won't register on the WiFi network. If not direct LoS then around two metres (wooden floor or single sheet of Gyproc).
What sort of ranges are others getting? Is this normal for one of these units?
Regards
I obtained another board (same one, same source). Still pretty much useless though. Any further than a few metres from the router and it won't register on the WiFi network. If not direct LoS then around two metres (wooden floor or single sheet of Gyproc).
What sort of ranges are others getting? Is this normal for one of these units?
Regards