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,




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

Maybe calling 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: 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,



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


Thanks! I will try it.