WiFi bandwith in AP
Posted: 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.
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.