Sunday, 15 September 2013

Raspberry Pi and Nano USB WiFi (EDIMAX EW-7811Un) on Kali Linux

Hey there,

yesterday my order arrived. An Wireless USB Adapter for my Raspberry Pi. Right after plugging it into the Pi and booting it up, it was found:
root@kali:~# dmesg
usb 1-1.2: new high-speed USB device number 4 using dwc_otg
usb 1-1.2: New USB device found, idVendor=7392, idProduct=7811
usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.2: Product: 802.11n WLAN Adapter
usb 1-1.2: Manufacturer: Realtek
usb 1-1.2: SerialNumber: 00e04c000001
You can also list the usb devices via lsusb, to make sure the device is recognized:
root@kali:~# lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
I'm using Kali 1.0.5 with the original kernel which is 3.6.11-cutdown:
root@kali:~# uname -r
I've read that the since kernel 3.0 and higher a driver called rtl8192cu should be available that is supporting the chipset RTL8188CUS. After searching for "*8192*" I've found the module in kali:
root@kali:~# find / -name "*8192*" -print
As no driver was loaded automatically, I've tried to load the module manually:
root@kali:~# modprobe 8192cu 
root@kali:~# lsmod
Module                  Size  Used by
ipv6                  207600  12
8192cu                411588  0
leds_gpio               1668  0
led_class               1788  1 leds_gpio
So the driver is loaded and now we can bring up the interface:
root@kali:~# ifconfig wlan0 up
root@kali:~# ifconfig wlan0
wlan0     Link encap:Ethernet  Hardware Adresse 80:1f:02:b3:50:8b
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
You can make a quick scan of available wifi networks via:
root@kali:~# iwlist wlan0 scan
Now you can either use the graphical WiFi manager or you can configure your WiFi via terminal, which is what I did. Just add the following lines to your /etc/network/interfaces:
auto wlan0
iface wlan0 inet dhcp
wpa-ssid <your SSID here>
wpa-psk <your wlan-key here>
After restarting the network you should have a working wifi connection.
root@kali:~# service networking restart

If you're using a hidden SSID you should read the following thread.


  1. This is a really good how-to. Did you manage to set the wlan0 to monitor mode ?

  2. Thx. I didn't try, but AFAIK I've read somewhere that this is not possible.

  3. Did you try it, Doute Cartesien? If so, how did you manage it?

  4. Did you try it, Doute Cartesien? If so, how did you manage it?