ryanmanwiller
Posts: 1
Joined: Sun Dec 09, 2012 6:21 am

Getting wifi to work with a hidden network

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

tew
Posts: 1
Joined: Tue Dec 11, 2012 5:53 am

Re: Getting wifi to work with a hidden network

Tue Dec 11, 2012 5:57 am

That was exactly my problem. Thanks for posting your find.

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: Getting wifi to work with a hidden network

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.

prehensile
Posts: 16
Joined: Thu Oct 06, 2011 7:33 pm

Re: Getting wifi to work with a hidden network

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

User avatar
abiheiri
Posts: 2
Joined: Sat Dec 22, 2012 4:37 am
Contact: Website AOL

Re: Getting wifi to work with a hidden network

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:

pjc123
Posts: 922
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: Getting wifi to work with a hidden network

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.
My Raspberry Pi Project Page:

https://www.flaminghellmet.com/launch/

ok200
Posts: 3
Joined: Sun Oct 09, 2016 2:58 pm

Re: Getting wifi to work with a hidden network

Sun Oct 09, 2016 2:59 pm

Thank you! This is incredibly valuable. I feel like a lot of Raspberry users in urban areas are going to have their SSID turned off.

barsznica
Posts: 20
Joined: Thu Apr 14, 2016 12:38 pm

Re: Getting wifi to work with a hidden network

Mon Apr 06, 2020 5:19 am

I used the minimal config, but had to add wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf to /etc/network/interfaces (https://www.raspberrypi.org/forums/view ... 09#p613709) for it to work.

Return to “Troubleshooting”