I have an OpenWrt 22.03.4 device, let's name it "StationDevice" with a conf like this one:
config wifi-device 'radio1' option type 'mac80211' option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0+1' option band '5g' option disabled '0' option channel 'auto' option country 'IT' option htmode 'HE20' option cell_density '1' config wifi-iface 'wifi_wsta1' option device 'radio1' option disabled '0' option encryption 'psk2' option ieee80211w '0' option ifname 'wsta1' option key 'KEYHERE12345' option mode 'sta' option ssid '5G-ACCESS' option wds '0'
There multiple access points around StationDevice, all having the same SSID (
5G-ACCESS) and WPA PSK2 password.
When StationDevice boots it will automatically select one of the available access points around.
Imagine a certain situation which causes StationDevice to select an AP which is not the best one, for example the nearest APs are momentarily turned off, suppose the best APs then come back online, what commands can I use to tell StationDevice to connect to the best AP programmatically, without changing the configuration?