Range/roaming explicit AP selection?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Jibun no kage
Posts: 144
Joined: Mon Jul 25, 2022 9:45 pm

Range/roaming explicit AP selection?

Post by Jibun no kage » Sat Jul 30, 2022 4:09 pm

Range/roaming explicit AP selection? I was looking at mqtt_as module and examples, and range_ex.py script, that looks for the strongest RSSI signal, but as far as I can tell, no explicit binding is done, the typical connect is (trusted) to find the strongest WiFI signal.

But I also noticed that network.WLAN (at least some implementations, has parameter to bind to a specific BSSID? If I am already connected to the strongest AP, I don't want to disconnect for no reason, otherwise take the hit and reconnect to the 'better' AP. How can I do this? Can I even do this? A selective reconnect that is.

Connecting seems straight forward... given WLAN.connect(ssid=None, key=None, *, bssid=None). Scan to find the strongest seems straight forward the range_ex.py script already illustrates this via RSSI result.

So the hang up is <interface>.confg('bssid') does not seem to be an option? Can I query network.WLAN for the current BSSID? I don't think so? Did I miss it?

>>> theInterface.config('bssid')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: unknown config param

At least on my Pico W no joy.

This would really be a great benefit for say publishing under MQTT, where is the publish fails, then checking for a better AP and selective reconnect, then republish would be a nice approach, no? Oh and given mqtt_as has a publish timeout example that might be part of the scenario as well of course.

Jibun no kage
Posts: 144
Joined: Mon Jul 25, 2022 9:45 pm

Re: Range/roaming explicit AP selection?

Post by Jibun no kage » Sun Aug 14, 2022 3:36 am

Bump! No one?

Post Reply