title: Configure Wifi (hidden SSID) on Raspbian (EDIMAX Wifi Adapter)
body: <p>I have trouble connecting to the wifi network with my Raspberry Pi (Raspbian Wheezy) in combination with EDIMAX EW-7811UN Wireless USB Adapter. </p>
  
  <p>I already used this combination to connect to my parents wifi (WPA with a non-hidden wifi) successfully.</p>
  
  <p>/etc/network/interfaces</p>
  
  <pre><code>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 "&lt;SSID&gt;"
  wpa-psk "&lt;PASS&gt;"
  </code></pre>
  
  <p>My own wifi has the following configuration:</p>
  
  <ul>
  <li>hidden SSID</li>
  <li>TKIP+AES (WPA/WPA2) with PSK authentication</li>
  </ul>
  
  <p>So I generated a PSK version of my wifi password:</p>
  
  <pre><code>$ wpa_passphrase "&lt;SSID&gt;" "&lt;PASS&gt;"
  </code></pre>
  
  <p>And configured these two files:</p>
  
  <p>/etc/network/interfaces</p>
  
  <pre><code>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
  </code></pre>
  
  <p>and /etc/wpa_supplicant/wpa_supplicant.conf</p>
  
  <pre><code>ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
  update_config=1
  
  network={
     ssid="&lt;SSID"
     psk=&lt;PSK&gt;
     proto=WPA2
     key_mgmt=WPA_PSK
     pairwise=CCMP
     group=CCMP
     auth_alg=OPEN
  }
  </code></pre>
  
  <p>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.</p>
  
  <p>Resetting the Raspberry Pi is not an option, because I already put a lot of effort in its configuration.</p>
  
  <p>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).</p>
  
  <p>Thank you,
  Freddi</p>