Configure Wifi (hidden SSID) on Raspbian (EDIMAX Wifi Adapter)
Asked Answered
S

2

6

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

Sprig answered 19/1, 2015 at 18:29 Comment(0)
S
9

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"
Sprig answered 19/1, 2015 at 20:15 Comment(0)
A
1

I think you forgot in the first aproach adding

scan_ssid=1

to the network block in wpa_supplicant.conf to make the network work with hidden ssid.

From the docs:

scan_ssid
     SSID scan technique; 0 (default) or 1. Technique 0 scans for the
     SSID using a broadcast Probe Request frame while 1 uses a
     directed Probe Request frame. Access points that cloak them-
     selves by not broadcasting their SSID require technique 1, but
     beware that this scheme can cause scanning to take longer to com-
     plete.
Africa answered 19/5, 2015 at 11:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.