Hi, there!

I'm developing a mobile device, that should be able to store a number of wifi client connections, and connect to the best available AP. The requirement a subset of that what connection managers like network-manager,
connman or wcid do.

Currently I store each wifi client 'connection' within a 'wifi-iface' config section in /etc/config/wireless. If a specific connection requires manual configuration (proto=static), also a associated network is created.

This approach is a bit cumbersome, because of a number of reasons:

*) For each stored 'connection' a new 'wlanN' Interface, is brought up. Usually also an associated instance of wpa_supplicant is launched, consuming startup time, memory, and cpu resources.

*) Logically there is exactly one 'wifi client connection'. To determine it's state, one has to check each of those
interfaces.

*) Manual network configurations for a wifi client connection, add new network interfaces, that have to be taken
into account with the firewall.


I hacked the mac80211.sh script to put each 'wifi-iface' that discribes a client connection into a 'network' definition of a single wpa_supplicant instance. This way I get one client interface, that associates to the
best known AP. This works reasonably well, but also has a drawback:

When some specific client connection needs manual configuration (ip, netmask, dns, gateway,...), and doesn't rely on dhcp, I have to let a daemon/script listen to wpa_supplicant's control interface until wpa_supplicant
connects successfully, and apply those settings using some daemon/script,


What would be a sane way to handle changing Wifi client connections with different associated network settings
using the existing openwrt infrastructure?

cheers,
Christian
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to