How to best configure multiple STA mode WiFi networks

Hi

I am using an 8devices Jalapeno WiFi Module for a robotics project, running OpenWRT-8devices 3.1. It has 2 radios. The module connects to upstream internet through WiFi on radio0, and runs an internal network (to connect laptops etc) on radio1.

The upstream WiFi credentials and SSID sometimes change as the setup is moved around, or you want it to connect to a different local network. Currently, I just have a list of wifi-ifaces. But it does not seem possible to make OpenWRT connect to one of those, without removing/disabling the others. Basically, I'd want a functionality similar to NetworkManager on Ubuntu or the WiFi config on Windows, where I can set a WiFi to connect to, but if that disappears, it automatically connects to another known one, etc.

My current configuration does not seem to work nicely. Sometimes it does not connect at all, to force connecting to a specific WiFi I have to disable all the others and then run wifi, etc.

Is something like this possible? The docs seems to be light on this topic. Also I am wondering if I need to create a new network.interface block every time I create a new wifi-iface block.

I am aware of https://github.com/jordi-pujol/wwanHotspot, but if possible I'd prefer a pure OpenWRT/UCI solution.

Thank you!

BTW, if a mod is reading this, the Wiki links in the pinned post are broken.

Have you looked at the travelmate package???
It is originally meant for travel routers for connecting to wifi hotspots, but might answer your needs. Multiple defined upstream wifi connections, with preference order.

Oh wow, that looks very useful. Will give it a spin.

Thanks a lot!!