Configure Wifi (hidden SSID) on Raspbian (EDIMAX Wifi Adapter)

Freddi picture Freddi · Jan 19, 2015 · Viewed 24.3k times · Source

I have trouble connecting to the wifi network with my Raspberry Pi (Raspbian Wheezy) in combination with EDIMAX EW-7811UN Wireless USB Adapter.

I already used this combination to connect to my parents wifi (WPA with a non-hidden wifi) successfully.

/etc/network/interfaces

auto lo

iface lo inet loopback

iface eth0 inet static
address 192.168.2.128
netmask 255.255.255.0
gateway 192.168.2.1

auto wlan0
allow-hotplug wlan0

iface wlan0 inet static
address 192.168.2.128
netmask 255.255.255.0
gateway 192.168.2.1

wpa-ap-scan 1
wpa-ap-ssid 1
wpa-ssid "<SSID>"
wpa-psk "<PASS>"

My own wifi has the following configuration:

  • hidden SSID
  • TKIP+AES (WPA/WPA2) with PSK authentication

So I generated a PSK version of my wifi password:

$ wpa_passphrase "<SSID>" "<PASS>"

And configured these two files:

/etc/network/interfaces

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp

wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp

and /etc/wpa_supplicant/wpa_supplicant.conf

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

network={
   ssid="<SSID"
   psk=<PSK>
   proto=WPA2
   key_mgmt=WPA_PSK
   pairwise=CCMP
   group=CCMP
   auth_alg=OPEN
}

The USB Adapter and its module are working fine (lsusb, lsmod). And as I said, I already used the Raspberry Pi to connect to a network. But it does not seem work with the configuration I use at my own home. I get an "Network unreachable" error if I try to ping my router.

Resetting the Raspberry Pi is not an option, because I already put a lot of effort in its configuration.

Does anybody have a simular configuration with his own Raspberry Pi or knows how to solve this (I already googled and tried different "solutions" for hours without any success).

Thank you, Freddi

Answer

Freddi picture Freddi · Jan 19, 2015

I finally found my answer here (sorry, it is german): Raspberry Pi, Edimax EW-7811Un and a hidden wifi

# /etc/network/interfaces
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-ap-scan 1
wpa-scan-ssid 1
wpa-ssid "SSID"
wpa-proto RSN
wpa-pairwise CCMP
wpa-key-mgmt WPA-PSK
wpa-psk "PASS"