WiFi bandwith in AP

gribouille
Posts: 3
Joined: Tue Mar 29, 2022 5:44 pm

WiFi bandwith in AP

Postby gribouille » Tue May 03, 2022 4:20 pm

Hello,
I start with the esp32 with the Arduino framework.
I try station mode with no problem and access point mode, both modes taking examples.
I have a problem with AP mode: I'm testing transmission with a smartphone application: Wifi Analyzer.
While all the Wifi broadcasts around me are 22MHz bandwidth, the ESP32 has 40MHz.

I search in the jungle of Espressif documentation and I find:
esp_wifi.h
esp_err_t esp_wifi_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap);

After wasting time searching in the documentation for possible values ​​for ifx, I find:
esp_wifi_set_protocol(WIFI_IF_AP, WIFI_PROTOCOL_11B);

It's Ok, the bandwidth is now 22 MHz.
But to be sure what does (I'm a retired hardware engineer, I know how to work) I'm looking for how to get back to the initial state of BW = 40 MHz.
IMPOSSIBLE TO FIND!

Other issues:
setPower and getPower.
setPower seems to work correctly (difficult to say without suitable measurement equipment) but when I ask for the lowest level: WIFI_POWER_MINUS_1dBm = -4// -1dBm, which should be the lowest in reality it is the highest level.
getPower return 80, confirmed by WiFi Analyzer app.

getPower returns an unstable number.
Would that mean that getPower returns the result of a measurement made inside the chip?

Information about hardware:
Test board is a Lolin32.
The chip reference is: ESP32-D0WDQ6 Rev 1
Chip ID: 4163544

Another try with an ESP32-CAM board
ESP32-D0WDQ6 Rev 1
Chip ID: 3027024
Never powered on before also gives 40MHz bandwidth
It is therefore a default value.

My questions:
1) does getPower return the result of a measurement?
2) how to put the chip back with the original bandwidth configuration and what is this mode called. Example please.
3) Where a complete documentation could be found?

I read this on this site:
Functions are defined into ESP32 WiFi Library whose source can't be seen by SDK Developer. So, You can not get function definition of each declared function of this header files.
Hope this will answer your questions in basic overview.
Regards,
Ritesh Prajapati


And that didn't reassure me.

gribouille
Posts: 3
Joined: Tue Mar 29, 2022 5:44 pm

Re: WiFi bandwith in AP

Postby gribouille » Wed May 18, 2022 8:33 pm

No one is able to answer me !
Does anyone know the default broadcast format?

It's worrying.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: WiFi bandwith in AP

Postby ESP_Sprite » Fri May 20, 2022 8:12 am

For reference, this is the wifi driver docs. It doesn't mention the default protocols supported, but logically it would be 802.11bgn as those are all the WiFi-standard protocols the chip supports.

I'm not sure what exactly what you mean with the chip 'being' 40MHz; we support that bandwidth to connect to APs/STAs and as such we broadcast it; there's nothing special about that. If you want to disable 40MHz mode, rather than changing to the ancient 802.11B protocol, you'd be better off using the proper API call for that.


I can't comment on getPower/setPower as those seem to be Arduino-specific things and unfortunately I lack knowledge there.

Joshua2024
Posts: 1
Joined: Wed Apr 10, 2024 12:32 pm

Re: WiFi bandwith in AP

Postby Joshua2024 » Wed Apr 10, 2024 12:40 pm

Please provide the code,i am in trouble with change the wifi speed of ESP32 (802.11B/802.11G/802.11N) modes

Who is online

Users browsing this forum: Bing [Bot] and 160 guests