0

I have some Laptops with the Broadcom BCM43225 802.11b/g/n WiFi card. I installed the driver wl0 version 6.30.223.141 (r415941).

I make connection with a hidden wifi ssid. When I walk around with the laptop, no problem, it will make connection with other access points (AP). But when I shut down the laptop and switch it on in the area of another AP, it will not automatically reconnect. Only seems to connect automatically to AP's it has been connected to before.

Replacing the drivers only made the improvement that it does not require a password anymore to reconnect.

Any a suggestion how to let Ubuntu 14.04 automatically reconnect to hidden wifi ssid when starting the laptop in the area of another access point?

This is about 80 laptops and a few dozen access points and students using the Guest session.

$ sudo lshw -C network
*-network               
       description: Wireless interface
       product: BCM43225 802.11b/g/n
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: wlan0
       version: 01
       serial: 5c:ac:4c:04:dd:d7
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=wl0 driverversion=6.30.223.141 (r415941) ip=172.17.23.137 latency=0 multicast=yes wireless=IEEE 802.11abg
       resources: irq:16 memory:95400000-95403fff

New test with log info:

  • Started laptop: gets wifi connection MRTG_WIFI3 to an access point where it had been connected to before

  • Shut down the laptop

  • Moved to another access point

  • Started the laptop: no automatic connection to MRTG_WIFI3

  • Moved (roamed) to another "known" access point: it immediately makes connection to MRTG_WIFI3

Network related syslogs:

$ sudo grep -i networkmanager /var/log/syslog :
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> Loaded plugin (null): (null)
    Oct  7 11:12:26 kw1-03 NetworkManager[940]:    Ifupdown: get unmanaged devices count: 0
    Oct  7 11:12:26 kw1-03 NetworkManager[940]:    SCPlugin-Ifupdown: (17629936) ... get_connections.
    Oct  7 11:12:26 kw1-03 NetworkManager[940]:    SCPlugin-Ifupdown: (17629936) ... get_connections (managed=false): return empty list.
    Oct  7 11:12:26 kw1-03 NetworkManager[940]:    keyfile: parsing MRTG_WIFI3 ... 
    Oct  7 11:12:26 kw1-03 NetworkManager[940]:    keyfile:     read connection 'MRTG_WIFI3'
    Oct  7 11:12:26 kw1-03 NetworkManager[940]:    keyfile: parsing mrtg_guest ... 
    Oct  7 11:12:26 kw1-03 NetworkManager[940]:    keyfile:     read connection 'mrtg_guest'
    Oct  7 11:12:26 kw1-03 NetworkManager[940]:    keyfile: parsing MRTG_WIFI3 ... 
    Oct  7 11:12:26 kw1-03 NetworkManager[940]:    keyfile:     read connection 'MRTG_WIFI3'
    Oct  7 11:12:26 kw1-03 NetworkManager[940]:    SCPlugin-Ofono: (17414592) ... get_connections.
    Oct  7 11:12:26 kw1-03 NetworkManager[940]:    SCPlugin-Ofono: (17414592) connections count: 0
    Oct  7 11:12:26 kw1-03 NetworkManager[940]:    Ifupdown: get unmanaged devices count: 0
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> monitoring kernel firmware directory '/lib/firmware'.
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> rfkill1: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/ieee80211/phy0/rfkill1) (driver wl)
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> rfkill2: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/net/wlan0/rfkill2) (driver wl)
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> rfkill0: found WiFi radio killswitch (at /sys/devices/platform/acer-wmi/rfkill/rfkill0) (platform driver acer-wmi)
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> WiFi enabled by radio killswitch; enabled by state file
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> WWAN enabled by radio killswitch; enabled by state file
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> WiMAX enabled by radio killswitch; enabled by state file
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> Networking is enabled by state file
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> (wlan0): using nl80211 for WiFi device control
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> (wlan0): new 802.11 WiFi device (driver: 'wl' ifindex: 3)
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> (wlan0): exported as /org/freedesktop/NetworkManager/Devices/0
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> (wlan0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> (wlan0): bringing up device.
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> (wlan0): preparing device.
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> (wlan0): deactivating device (reason 'managed') [2]
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <warn> failed to allocate link cache: (-12) Object not found
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> (eth0): carrier is OFF
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> (eth0): new Ethernet device (driver: 'tg3' ifindex: 2)
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> (eth0): exported as /org/freedesktop/NetworkManager/Devices/1
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> (eth0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
    Oct  7 11:12:26 kw1-03 NetworkManager[940]: <info> (eth0): bringing up device.
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <info> (eth0): preparing device.
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <info> (eth0): deactivating device (reason 'managed') [2]
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <info> Added default wired connection 'Wired connection 1' for /sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/net/eth0
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <warn> /sys/devices/virtual/net/lo: couldn't determine device driver; ignoring...
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <warn> /sys/devices/virtual/net/lo: couldn't determine device driver; ignoring...
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <info> urfkill disappeared from the bus
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <info> wpa_supplicant started
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <info> ModemManager available in the bus
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <info> (wlan0) supports 1 scan SSIDs
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <warn> Trying to remove a non-existant call id.
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <info> (wlan0): supplicant interface state: starting -> ready
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <info> (wlan0): device state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <info> (wlan0): supplicant interface state: ready -> disconnected
    Oct  7 11:12:27 kw1-03 NetworkManager[940]: <info> (wlan0) supports 1 scan SSIDs
    Oct  7 11:12:28 kw1-03 NetworkManager[940]: <info> (wlan0): supplicant interface state: disconnected -> inactive
    Oct  7 11:12:37 kw1-03 NetworkManager[940]: <info> WiFi hardware radio set enabled
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Auto-activating connection 'MRTG_WIFI3'.
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Activation (wlan0) starting connection 'MRTG_WIFI3'
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> (wlan0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> NetworkManager state is now CONNECTING
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started...
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting...
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> (wlan0): device state change: prepare -> config (reason 'none') [40 50 0]
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Activation (wlan0/wireless): connection 'MRTG_WIFI3' has security, and secrets exist.  No new secrets needed.
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Config: added 'ssid' value 'MRTG_WIFI3'
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Config: added 'scan_ssid' value '1'
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Config: added 'key_mgmt' value 'WPA-PSK'
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Config: added 'psk' value '<omitted>'
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> Config: set interface ap_scan to 1
    Oct  7 11:28:39 kw1-03 NetworkManager[940]: <info> (wlan0): supplicant interface state: inactive -> scanning
    Oct  7 11:28:45 kw1-03 NetworkManager[940]: <info> (wlan0): supplicant interface state: scanning -> associating
    Oct  7 11:28:45 kw1-03 NetworkManager[940]: <info> (wlan0): supplicant interface state: associating -> group handshake
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> (wlan0): supplicant interface state: group handshake -> completed
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> Activation (wlan0/wireless) Stage 2 of 5 (Device Configure) successful.  Connected to wireless network 'MRTG_WIFI3'.
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) scheduled.
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) started...
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> (wlan0): device state change: config -> ip-config (reason 'none') [50 70 0]
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Beginning DHCPv4 transaction (timeout in 45 seconds)
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> dhclient started with pid 3218
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Beginning IP6 addrconf.
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) complete.
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> (wlan0): DHCPv4 state changed nbi -> preinit
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> (wlan0): DHCPv4 state changed preinit -> reboot
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info>   address 172.17.23.123
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info>   prefix 24 (255.255.255.0)
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info>   gateway 172.17.23.254
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info>   nameserver '172.16.2.30'
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info>   nameserver '172.16.2.33'
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info>   domain name 'ourdomainMRTG.nl'
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info>   wins '172.16.2.30'
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
    Oct  7 11:28:48 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 5 of 5 (IPv4 Commit) started...
    Oct  7 11:28:49 kw1-03 NetworkManager[940]: <info> (wlan0): device state change: ip-config -> secondaries (reason 'none') [70 90 0]
    Oct  7 11:28:49 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 5 of 5 (IPv4 Commit) complete.
    Oct  7 11:28:49 kw1-03 NetworkManager[940]: <info> (wlan0): device state change: secondaries -> activated (reason 'none') [90 100 0]
    Oct  7 11:28:49 kw1-03 NetworkManager[940]: <info> NetworkManager state is now CONNECTED_GLOBAL
    Oct  7 11:28:49 kw1-03 NetworkManager[940]: <info> Policy set 'MRTG_WIFI3' (wlan0) as default for IPv4 routing and DNS.
    Oct  7 11:28:49 kw1-03 NetworkManager[940]: <info> DNS: starting dnsmasq...
    Oct  7 11:28:49 kw1-03 NetworkManager[940]: <warn> dnsmasq not available on the bus, can't update servers.
    Oct  7 11:28:49 kw1-03 NetworkManager[940]: <error> [1412674129.764669] [nm-dns-dnsmasq.c:396] update(): dnsmasq owner not found on bus: Could not get owner of name 'org.freedesktop.NetworkManager.dnsmasq': no such name
    Oct  7 11:28:49 kw1-03 NetworkManager[940]: <warn> DNS: plugin dnsmasq update failed
    Oct  7 11:28:49 kw1-03 NetworkManager[940]: <info> Writing DNS information to /sbin/resolvconf
    Oct  7 11:28:49 kw1-03 NetworkManager[940]: <info> (wlan0): roamed from BSSID C8:CB:B8:FB:AA:51 (MRTG_WIFI3) to C8:CB:B8:EC:54:B1 (MRTG_WIFI3)
    Oct  7 11:28:50 kw1-03 NetworkManager[940]: <info> Activation (wlan0) successful, device activated.
    Oct  7 11:28:50 kw1-03 NetworkManager[940]: <warn> dnsmasq appeared on DBus: :1.118
    Oct  7 11:28:50 kw1-03 NetworkManager[940]: <info> Writing DNS information to /sbin/resolvconf
    Oct  7 11:29:03 kw1-03 NetworkManager[940]: <info> (wlan0): supplicant interface state: completed -> group handshake
    Oct  7 11:29:03 kw1-03 NetworkManager[940]: <info> (wlan0): supplicant interface state: group handshake -> completed
    Oct  7 11:29:03 kw1-03 NetworkManager[940]: <info> (wlan0): roamed from BSSID C8:CB:B8:EC:54:B1 (MRTG_WIFI3) to (none) ((none))
    Oct  7 11:29:09 kw1-03 NetworkManager[940]: <info> (wlan0): IP6 addrconf timed out or failed.
    Oct  7 11:29:09 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 4 of 5 (IPv6 Configure Timeout) scheduled...
    Oct  7 11:29:09 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 4 of 5 (IPv6 Configure Timeout) started...
    Oct  7 11:29:09 kw1-03 NetworkManager[940]: <info> Activation (wlan0) Stage 4 of 5 (IPv6 Configure Timeout) complete.
    Oct  7 11:29:21 kw1-03 NetworkManager[940]: <warn> nl_recvmsgs() error: (-33) Dump inconsistency detected, interrupted
    Oct  7 11:29:42 kw1-0 roamed 3 NetworkManager[940]: <info> (wlan0): roamed from BSSID (none) ((none)) to C8:CB:B8:FB:BE:D1 (MRTG_WIFI3)
  • It is neither working with an Intell WiFi card. And no change of behaviour in Ubuntu 14.10 beta. – Manuzziman Oct 21 '14 at 9:23
  • You can edit your question to improve it with things you forgot to mention. Other than that I think this is intended behaviour and works the same way in Windows and Mac OS: if your computer associated with random wireless networks, it would create a big security risk, as an attacker may offer wireless network service and capture and/or manipulate the clients' network traffic. – David Foerster Oct 21 '14 at 9:37
  • no, not the same in Windows7; same laptops with Windows are connecting to the hidden ssid whatever access point it is connected to. – Manuzziman Oct 22 '14 at 11:04
  • That's not what you described in your question. Please edit it to clarify, that you want to reconnect to a hidden network automatically. I recommend that you assign names or numbers to the different networks in your text to avoid confusion when you refer to them later. – David Foerster Oct 22 '14 at 11:12
0

The script I found as answer on this link works: Auto-connect to hidden wireless without elevating privilege

#!/bin/sh
#
# Automatically try to connect to 'MRTG_WIFI3' when WiFi is enabled
#

# the output of nmcli should be in English
LC_ALL=C

# loop for a while until NetworkManager is accepting commands
while [ "$(nmcli -t -f WIFI,STATE nm)" = 'enabled:disconnected' ]
do
 nmcli con up id MRTG_WIFI3
 sleep 5
done

exit 0

Run the script at boot in the way written at an answer on: How to run a script during boot as root to get it working for all users (including guest-session)

Not the answer you're looking for? Browse other questions tagged or ask your own question.