Setting channel (1-14) and mode (b/g/n)
Posted: Sat Jan 21, 2017 4:45 am
Hi all!
I'm having a bit of trouble specifying the channel and mode to use. Basically I need to do some testing over the full range of channels (e.g. 1-14) and modes (e.g. b/g/n). I am using Arduino IDE. The test involves repeatedly sending a string over MQTT and observing any corruption due to interference. Ideally I would want to use the WifiManager config portal to connect the ESP to a Wifi network with internet connection, then have the software set specific channel and mode.
I have managed to use wifi_set_channel(###) whilst using the WifiManager library, but the best I seem to be able to do is temporarily switch the channel before it reverts as if being automatically set. I'm using a Wifi Analyser app on my phone to watch what is happening. Similarly I have used wifi_set_phy_mode((phy_mode_t)###) to change modes, but I'm not sure how to get any feedback on whether this has worked.
Has anyone got any pointers on how to achieve something like the above? I'm a bit out of my depth here.
I'm having a bit of trouble specifying the channel and mode to use. Basically I need to do some testing over the full range of channels (e.g. 1-14) and modes (e.g. b/g/n). I am using Arduino IDE. The test involves repeatedly sending a string over MQTT and observing any corruption due to interference. Ideally I would want to use the WifiManager config portal to connect the ESP to a Wifi network with internet connection, then have the software set specific channel and mode.
I have managed to use wifi_set_channel(###) whilst using the WifiManager library, but the best I seem to be able to do is temporarily switch the channel before it reverts as if being automatically set. I'm using a Wifi Analyser app on my phone to watch what is happening. Similarly I have used wifi_set_phy_mode((phy_mode_t)###) to change modes, but I'm not sure how to get any feedback on whether this has worked.
Has anyone got any pointers on how to achieve something like the above? I'm a bit out of my depth here.