- Thu Mar 10, 2022 10:15 am
#93876
ian wrote:As an aside, it seems that the channel is arbitrarily assigned when using the 8266 in AP mode. I once looked at optimising the channel selection but it's something I never finished. You could usefully add this feature to your project??
I had it exposed as another parameter (
on the constructor or begin method - forgot which one) but it tended to cause more confusion for students than being helpful to expose. However, in cases (like you are using) where you only want the SoftAP connection, it would be a good idea. I'll have to think of how to re-incorporate it.
I even had it on my TODO list to do scanning and find the best channel "hole". However, it's way down on the list because...
- I have to weigh the library size increase versus benefit and
- As soon as you connect to any StationAP the ESP8266 switches over to whatever channel the StationAP router uses. I also, internally save that channel change, so when the ESP8266 reboots, I start up the SoftAP (always first) with the changed channel so it saves a little time when it connects to the configured Station AP. That way, it doesn't require the radio to switch. It was a small thing, but it was a noticeable amount of time.
And even though I explained it in documentation... who reads documentation?
... unfortunately, the confusion/frustration factor, "Why is it not on the blankety-blank channel I put in your blank library?"