Bug 186951 - Can't connect to hidden networks
Summary: Can't connect to hidden networks
Status: RESOLVED FIXED
Alias: None
Product: Network Management
Classification: Miscellaneous
Component: Plasma Widget (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: Will Stephenson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-12 12:13 UTC by Will Stephenson
Modified: 2009-05-20 14:09 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Will Stephenson 2009-03-12 12:13:26 UTC
Version:            (using Devel)
Installed from:    Compiled sources

The connection list logic does not work when wireless networks are hidden - I thought that NM assigns SSIDs to AccessPoints on the bus which are really hiding their SSID when a connection using them exists.

This may be broken because we are not storing/announcing SeenBSSIDs on the connection objects yet.
Comment 1 David Engraf 2009-04-07 21:17:09 UTC
I have the same problem under kubuntu 9.04 beta. The network manager widget doesn't connect to my hidden wpa ap (https://bugs.launchpad.net/ubuntu/+source/plasma-widget-network-manager/+bug/330811).
Comment 2 Craig Magina 2009-04-08 14:06:02 UTC
I am also experiencing this issue on Kubuntu 9.04.  The version Kubuntu lists for plasma-widget-network-manager is 0.0+svn930811-0ubuntu2.  Any chance this has been fixed in an upstream commit already?
Comment 3 David Engraf 2009-04-13 23:26:06 UTC
This is the output of /var/log/daemon.log after booting:
Apr 13 23:06:44 NetworkManager: <info>  (wlan0): device state change: 1 -> 2 
Apr 13 23:06:44 NetworkManager: <info>  (wlan0): bringing up device. 
Apr 13 23:06:44 NetworkManager: <info>  (wlan0): preparing device. 
Apr 13 23:06:44 NetworkManager: <info>  (wlan0): deactivating device (reason: 2). 
Apr 13 23:06:44 NetworkManager: <info>  (wlan0): device state change: 2 -> 3 
Apr 13 23:06:44 NetworkManager: <info>  (wlan0): supplicant interface state:  starting -> ready 
Apr 13 23:06:56 NetworkManager: <WARN>  list_connections_cb(): Couldn't retrieve connections: No such method 'ListConnections' in interface 'org.freedesktop.NetworkManagerSettings' at object path '/org/freedesktop/NetworkManagerSettings' (signature ''). 

No connection to my ap until I enter:
sudo iwlist wlan0 scanning essid "hiddenAP"

After I have entered the iwlist command I get the following output from NetworkManager:
Apr 13 23:10:37 NetworkManager: <info>  Activation (wlan0) starting connection 'Zuhause' 
Apr 13 23:10:37 NetworkManager: <info>  (wlan0): device state change: 3 -> 4 
Apr 13 23:10:37 NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled... 
Apr 13 23:10:37 NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) started... 
Apr 13 23:10:37 NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled... 
Apr 13 23:10:37 NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) complete. 
Apr 13 23:10:37 NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) starting... 
Apr 13 23:10:37 NetworkManager: <info>  (wlan0): device state change: 4 -> 5 
Apr 13 23:10:37 NetworkManager: <info>  Activation (wlan0/wireless): access point 'Zuhause' has security, but secrets are required. 
Apr 13 23:10:37 NetworkManager: <info>  (wlan0): device state change: 5 -> 6 
Apr 13 23:10:37 NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) complete. 
Apr 13 23:10:45 NetworkManager: <WARN>  update_one_setting(): Failed to update connection secrets: 1 802-1x 
Apr 13 23:10:45 NetworkManager: <WARN>  real_connection_secrets_updated(): Ignoring updated secrets for setting 'ipv4'. 
Apr 13 23:10:45 NetworkManager: <WARN>  real_connection_secrets_updated(): Ignoring updated secrets for setting '802-11-wireless'. 
Apr 13 23:10:45 NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled... 
Apr 13 23:10:45 NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) started... 
Apr 13 23:10:45 NetworkManager: <info>  (wlan0): device state change: 6 -> 4 
Apr 13 23:10:45 NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled... 
Apr 13 23:10:45 NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) complete. 
Apr 13 23:10:45 NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) starting... 
Apr 13 23:10:45 NetworkManager: <info>  (wlan0): device state change: 4 -> 5 
Apr 13 23:10:45 NetworkManager: <info>  Activation (wlan0/wireless): connection 'Zuhause' has security, and secrets exist.  No new secrets needed. 
Apr 13 23:10:45 NetworkManager: <info>  Config: added 'ssid' value 'hiddenAP' 
Apr 13 23:10:45 NetworkManager: <info>  Config: added 'scan_ssid' value '1' 
Apr 13 23:10:45 NetworkManager: <info>  Config: added 'key_mgmt' value 'WPA-PSK' 
Apr 13 23:10:45 NetworkManager: <info>  Config: added 'auth_alg' value 'OPEN' 
Apr 13 23:10:45 NetworkManager: <info>  Config: added 'psk' value '<omitted>' 
Apr 13 23:10:45 NetworkManager: nm_setting_802_1x_get_pkcs11_engine_path: assertion `NM_IS_SETTING_802_1X (setting)' failed
Apr 13 23:10:45 NetworkManager: nm_setting_802_1x_get_pkcs11_module_path: assertion `NM_IS_SETTING_802_1X (setting)' failed
Apr 13 23:10:45 NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) complete. 
...
Apr 13 23:10:48 NetworkManager: <info>  Activation (wlan0) successful, device activated. 
Apr 13 23:10:48 NetworkManager: <info>  Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete. 

and the connection is established. I think the widget only tries to connect when the ap is listed. When the ap is hidden and I call iwlist with the correct essid, my ap is listed and the widget connects to it.
Comment 4 Will Stephenson 2009-04-30 09:49:09 UTC
David, re #3: The ListConnections bug was fixed a few weeks ago, r947xxx in svn.
Comment 5 Will Stephenson 2009-04-30 14:21:58 UTC
The underlying cause is fixed by the persistence of seen BSSIDs to connection settings.  These are provided to NM in the connection settings and used by it to match hidden APs to the ssid in the connection.  

However the applet still needs a way to start a connection attempt to hidden networks since after configuring a connection, its seen BSSIDs list is empty, so NM does not detect its AP and the logic in the applet only shows connections where the AP is present.

One way to do this would be to add a 'Connect to Hidden Network' button to the applet that directly creates a connection and then immediately starts a connection attempt.  

Another way would be to allow adding arbitrary connections' ESSIDs via the Manage Connections dialog as usual, but ask whether to 'Connect Immediately' after Oking the new connection. 

What do you think?  I like the first variant better, if it is possible to only show the Connect to Hidden Network button when there are hidden APs.
Comment 6 David Engraf 2009-05-03 13:02:20 UTC
Another way would be to show a list with the configured WLANs like knetworkmanager does. When you now click on an entry, NM will try to connect to the specified entry even if it is not listed at the moment.
The best way would be if there is an automatically way to determine the hidden networks. When I call iwlist with the SSID I can see my hidden network, so maybe NM should call periodically iwlist with the configured SSID so that the WLAN may be listed.
Comment 7 Sebastian Kügler 2009-05-20 14:09:37 UTC
Connecting to hidden wireless networks has been fixed recently.