Comment 0 for bug 1245986

Revision history for this message
Chad Miller (cmiller) wrote :

I'm at a hotel. There's a strong network AP in this room that my org owns, and a weaker hotel wifi AP elsewhere.

Before my org convened, I connected to the hotel wifi, so it's in the list of SSIDs that I automatically connect to. I would rather connect to my org's wifi in almost all cases. But, that doesn't happen, and it connects to the unwanted hotel Wifi AP. I should be able to order the SSIDs that I will automatically connect to my dragging them in the list and a lower network should never be used if a higher is available.

So, in picking a network to connect to, we should try each in order of user-defined preference and abandon any that are below some threshold of usefulness.

Additionally, if nothing more-preferred is available, pick among crypto'd networks, abandoning too weak.

Then pick according to strength if everything else is equal.

I describe best in code...

order_of_preference = sorted(((net.user_defined_order if net.strength > epsilon else INFINITY), (0 if net.has_crypto else 1), net.strength, net) for net in network_list)

net_to_use = order_of_preference[0][3]

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: network-manager 0.9.8.0-0ubuntu22
ProcVersionSignature: Ubuntu 3.11.0-9.16-generic 3.11.2
Uname: Linux 3.11.0-9-generic i686
ApportVersion: 2.12.5-0ubuntu2.1
Architecture: i386
Date: Tue Oct 29 13:29:36 2013
IpRoute:
 default via 10.155.32.1 dev wlan0 proto static
 10.155.32.0/19 dev wlan0 proto kernel scope link src 10.155.51.98 metric 9
MarkForUpload: True
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
SourcePackage: network-manager
UpgradeStatus: Upgraded to saucy on 2009-03-27 (1677 days ago)
WpaSupplicantLog:

nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH
 wlan0 802-11-wireless connected /org/freedesktop/NetworkManager/Devices/1
 eth0 802-3-ethernet unavailable /org/freedesktop/NetworkManager/Devices/0
nmcli-nm:
 RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
 running 0.9.8.0 connected enabled enabled enabled enabled disabled