Getting wifi to work with a hidden network


6 posts
by ryanmanwiller » Sun Dec 09, 2012 6:27 am
I literally spent 10 hours trying to get the Edimax EW-7811UN wifi adapter to work with my model B pi. My searching for answers wasn’t very fruitful, until I realized the problem was related to the fact that my wireless network SSID is hidden. So, I wanted to share my experience here in case it helps someone.

I’m using the 2012-10-28 wheezy distribution. By all accounts, the wifi was supposed to work out of the box with the Edimax wifi. It did not work for me.

Specifically, it would not associate with my wireless network that I configured in the wpa_gui (this is the tool that runs when you open “Wifi Config” from the desktop. After adding my network in the wpa_gui, the /etc/wpa_supplicant/wpa_supplicant.conf file looked like:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid="bigboss"
psk="mypassword"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}

No amount of hacking the config, rebooting, etc. would make it associate. So I started removing the password protection on my network, etc.. It turns out that the default setup doesn’t work with a hidden network, which mine was.

You have to add the scan_ssid=1 to the /etc/wpa_supplicant/wpa_supplicant.conf file so it looks like:

network={
ssid="bigboss"
scan_ssid=1
psk="mypassword"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}

Once I did that, and rebooted, it associated just fine.

Hope this helps someone,
Ryan
Posts: 1
Joined: Sun Dec 09, 2012 6:21 am
by tew » Tue Dec 11, 2012 5:57 am
That was exactly my problem. Thanks for posting your find.
Posts: 1
Joined: Tue Dec 11, 2012 5:53 am
by obcd » Tue Dec 11, 2012 8:12 am
Interesting post.
We had a cheap tablet with an older android that refused to connect as well when the ssid wasn't broadcasted.
Posts: 890
Joined: Sun Jul 29, 2012 9:06 pm
by prehensile » Thu Dec 13, 2012 5:23 pm
Ryan, I owe you a manly handshake. This saved me from wifi configuration purgatory connecting to our hidden network :D
Posts: 16
Joined: Thu Oct 06, 2011 7:33 pm
by abiheiri » Sat Dec 22, 2012 4:44 am
Thank you!

This is how my config looks... minimal

Code: Select all
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev #auto-generated
update_config=1  #auto-generated

#i used wpa_passphrase myessid mypassword >> /etc/wpa_supplicant/wpasupplicant.conf
network={
        ssid="myessid"
        scan_ssid=1
        psk=XXXX
}

thats it :mrgreen:
User avatar
Posts: 2
Joined: Sat Dec 22, 2012 4:37 am
by pjc123 » Sat Dec 22, 2012 1:03 pm
A couple of notes about scan_ssid=1:

1) It adds latency to scanning, so only use it when needed. So if you never have to access hidden SSID's, use scan_ssid=0 (the default).

2) Also, a little gotcha when using scan_ssid=1 that I found out a while ago. If you have multiple networks in the wpa_supplicant file like I do, to access multiple access points, the "priority" command does not work as expected (it is ignored); instead networks are scanned in the order they are in the file. When using scan_ssid=0, the "priority" command works normally, setting the priority order that you want to search for networks. If I RTFM, I would have known that.
Posts: 911
Joined: Thu Mar 29, 2012 3:37 pm