How to control Advanced WiFi features on ESP-32

We would like to change the beacon interval on an ESP-32. Is this possible? If so, how?

Thanks for your help,

S

Hi.

It is easy to check source of wifi code and you will find it there hardcoded.

Maybe calling https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/network/esp_wifi.html#_CPPv419esp_wifi_set_config16wifi_interface_tP13wifi_config_t with adjusted settings would work. Or just detach mos wifi module from git and modify that hardcoded value.

1 Like

Hi Martin,

Thank you for your quick answer.

I think that the hardcoded way would probably be sufficient for our needs. In order to do this, I think that I would detach the esp32_wifi.c file, place it in my src folder, add #include “esp32_wifi.c” to my main.c file, and remove origin: https://github.com/mongoose-os-libs/wifi from mos.yml. Am I correct in this procedure?

Also, if we were to use the idf method suggested, I assume that if I would have to include esp_wifi.h in my code to adjust the settings. Is this correct?

Thanks for your help,

JSW

I would just remove deps/wifi/.git and modify deps/wifi/src/esp32/esp32_wifi.c.

Thanks! I will try it.