Hello,
I get some issue to select the channel for WIFI STA.
Using esp_wifi_set_config with a channel different from 0 does not have any effect on the wifi driver.
It always start using the last channel used during the last successful selection.
Is it a known issue ?
For best understanding of my needs, in my environment I have two wifi AP with same credentials but on different channels. Both are DHCP server. When a router is not able to provide an IP, I need to address the second one.
Is there a specific settings to set to force the wifi driver to use a specific channel ?
Thanks,
Channel selection for WIFI STA
Re: Channel selection for WIFI STA
Suggest that you use bssid
Re: Channel selection for WIFI STA
Thanks for your reply.
Finally my code works. I was mislead by the log messages showing the device connected to channel 1 when trying another (wrong) channel
But when trying with an existing one I get the right message.
Finally my code works. I was mislead by the log messages showing the device connected to channel 1 when trying another (wrong) channel
Code: Select all
I (11215) DEBUG: (HEAP:146668) (0:0) [halwifi.cpp:64] Retry with channel 3
I (13275) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
I (13275) wifi:state: init -> auth (b0)
I (13275) wifi:state: auth -> assoc (0)
I (13285) wifi:state: assoc -> run (10)
I (13315) wifi:connected with myssid, aid = 6, channel 1, BW20, bssid = xx:xx:xx:xx:xx:xx
Code: Select all
I (26245) DEBUG: (HEAP:146668) (0:0) [halwifi.cpp:64] Retry with channel 6
I (28305) wifi:new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1
I (28305) wifi:state: init -> auth (b0)
I (28315) wifi:state: auth -> assoc (0)
I (28325) wifi:state: assoc -> run (10)
I (28385) wifi:connected with myssid, aid = 1, channel 6, BW20, bssid = yy:yy:yy:yy:yy:yy
Who is online
Users browsing this forum: No registered users and 108 guests