I'm working on refactoring of an old firmware that connect two device
First connected to WIFI and communicate via ESP-Now with second remote device.
The main problem is that the AP can change the wifi channel dinamically and consequently the esp-now channel.
The remote device cannot have access to wifi.
The old firmware use a trik to solve this problem
- The remote listens on the channel 1
- The master set the wifi channel to 1 with
Code: Select all
esp_wifi_set_channel(0x01, WIFI_SECOND_CHAN_NONE);
- The remote send the response on the real wifi channel
I know that it's a little devilish, but works on the old IDF (I don't know the exact version)
but on the new version (actual release 5.0) i have the message
wifi:STA is scanning or connecting, or AP has connected with external STAs, cannot set channel
I read a lot of post, but I did not find it clearly written if there is a workaround to solve this issue.
Thanks a lot
Davide