Page 1 of 1

AP automatically set to open channel?

Posted: Tue Jul 12, 2022 9:40 pm
by kbaud1
IDF

I have been looking through the documentation and I haven't found this answer yet. Also googled and searched this forum. Seems like an obvious question.

When initializing the esp32 in AP mode, you can specify the channel to use. But how do you know that channel is currently available? It seems it would make sense to set to STATION mode, do an active scan, get the list of APs and then select a channel that is open. Then create your AP with that open channel. I haven't found examples of this which seems to suggest the drivers already do this "behind the scenes"? Or, do we in actual practice just pick a random channel and any AP that is currently there we occasionally collide with? I assume this is the norm since in crowded areas no channel is completely unused.