GNOME Bugzilla – Bug 672501
Make available a lock to BSSID, by identifying already used BSSIDs
Last modified: 2012-10-16 13:57:01 UTC
I think it is self explainatory, to be able to select from a list in the BSSID field which is the AP you want to get connected to, as we don't usually know which is the MAC address of the AP. https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/711989
I don't think you can get a list of previous BSSIDs but locking to the current one would be a nice feature.
Actually, we do have a list of seen BBSIDs for particular connections, NetworkManager daemon handles that. We just have to return the list in GetSecrets() so that it is available in 802-11-wireless' seen-bssids property.
Good to know it, so when can be this achieved?
Created attachment 222923 [details] [review] Add drop-down list with previously seen APs to 'BSSID' entry The patch changes 'BSSID' entry in Wi-Fi page into a combobox with an entry. The combobox is pre-populated with previously seen BSSIDs for the connection so that the user can simply select the AP he wants. If an AP is missing, it is still possible to write a BSSID down in the entry box.
Created attachment 222924 [details] [review] settings: fill seen-bssids for GetSettings() In order we can reach BSSID list from clients, we need to return that in GetSettings() (seen-bssids is not populated automatically in order not to force changes in /etc)
Created attachment 222925 [details] [review] libnm-util: change seen-bssids property description Change 'seen-bssids' description removing note that it is not much useful, and adding a note that it is read-only.
Created attachment 226267 [details] [review] settings: fill seen-bssids for GetSettings() In order we can reach BSSID list from clients, we need to return that in GetSettings() (seen-bssids is not populated automatically in order not to force changes in /etc) Updated to apply cleanly to master.
Created attachment 226268 [details] [review] Add drop-down list with previously seen APs to 'BSSID' entry The patch changes 'BSSID' entry in Wi-Fi page into a combobox with an entry. The combobox is pre-populated with previously seen BSSIDs for the connection so that the user can simply select the AP he wants. If an AP is missing, it is still possible to write a BSSID down in the entry box. Updated to apply cleanly to master and simplified (the same way MAC is handled).
Comment on attachment 226267 [details] [review] settings: fill seen-bssids for GetSettings() looks good. The only thing I'd say is: >+ while (g_hash_table_iter_next (&iter, NULL, (gpointer) &bssid_str)) >+ bssid_list = g_slist_append (bssid_list, g_strdup (bssid_str)); When the order doesn't matter, we generally use g_slist_prepend(), so the operation as a whole is O(n) rather than O(n^2).
Comment on attachment 226268 [details] [review] Add drop-down list with previously seen APs to 'BSSID' entry looks good. mostly cut+paste+search+replace anyway
Comment on attachment 222925 [details] [review] libnm-util: change seen-bssids property description >+ * NetworkManager internally tracks previously seen BSSIDs. This property >+ * is read-only and reflects the list of NetworkManager. >+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE)); So, it's not really read-only, and there's still nm_setting_wireless_add_seen_bssid() too. I guess it would be more correct to say "changes you make to this property will not be preserved", and put a similar note on nm_setting_wireless_add_seen_bssid().
Thanks for reviewing, patches changed accordingly and committed, NM: 65029e0f894e8f56d420b1b0c816c94ddcef5671 347e149e398278b1f7c416d6a5998861667ce22b applet: bc0f95bad6d6e0faabf3efa0e3eb841547033bae (In reply to comment #9) > (From update of attachment 226267 [details] [review]) > looks good. The only thing I'd say is: > > >+ while (g_hash_table_iter_next (&iter, NULL, (gpointer) &bssid_str)) > >+ bssid_list = g_slist_append (bssid_list, g_strdup (bssid_str)); > > When the order doesn't matter, we generally use g_slist_prepend(), so the > operation as a whole is O(n) rather than O(n^2). Yeah, we probably doesn't care about the order much, so changing to reverse() to save some watts :-) (In reply to comment #11) > (From update of attachment 222925 [details] [review]) > >+ * NetworkManager internally tracks previously seen BSSIDs. This property > >+ * is read-only and reflects the list of NetworkManager. > > >+ G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE)); > > So, it's not really read-only, and there's still > nm_setting_wireless_add_seen_bssid() too. I guess it would be more correct to > say "changes you make to this property will not be preserved", and put a > similar note on nm_setting_wireless_add_seen_bssid(). Description adjusted.