Installing EW-7811Un WifiDongle

From SingletonMillerWiki
Revision as of 13:30, 20 July 2012 by Martin (Talk | contribs) (Created page with "Category: RaspberryPi Category: RaspianRPi == Install Dongle == With your raspberry pi '''already running''' plug in the Dongle. The reason for doing this is that from ...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Install Dongle

With your raspberry pi already running plug in the Dongle.

The reason for doing this is that from a cold boot the default driver [rtl8192cu] causes a problem with udev and a number of errors were thrown that prevented the Rpi from booting properly.

Check the device has been detected. dmesg | tail

[   76.830012] usb 1-1.2: new high speed USB device number 4 using dwc_otg
[   76.932126] usb 1-1.2: New USB device found, idVendor=7392, idProduct=7811
[   76.932172] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   76.932194] usb 1-1.2: Product: 802.11n WLAN Adapter
[   76.932210] usb 1-1.2: Manufacturer: Realtek
[   76.932226] usb 1-1.2: SerialNumber: 00e04c000001
[   77.032579] cfg80211: Calling CRDA to update world regulatory domain

Replace the Driver =

New Driver Location

Download the driver from http://www.electrictea.co.uk/rpi/8192cu.tar.gz

wget http://www.electrictea.co.uk/rpi/8192cu.tar.gz
--2012-07-20 19:08:39--  http://www.electrictea.co.uk/rpi/8192cu.tar.gz
Resolving www.electrictea.co.uk (www.electrictea.co.uk)... 184.173.73.187
Connecting to www.electrictea.co.uk (www.electrictea.co.uk)|184.173.73.187|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 213532 (209K) [application/x-gzip]
Saving to: `8192cu.tar.gz'

100%[=====================>] 213,532      229K/s   in 0.9s    

2012-07-20 19:08:40 (229 KB/s) - `8192cu.tar.gz' saved [213532/213532]

Unzip the driver

tar -zxvf 8192cu.tar.gz

which should do something like this.

jake@raspberrypi ~ $ tar -zxvf 8192cu.tar.gz
8192cu.ko

Move the kernel module to the correct location using

 sudo mv 8192cu.ko /lib/modules/3.1.9+/kernel/net/wireless/

Disable the current driver

This requires blacklisting the current modules, edit the blacklist configuration file

sudo nano /etc/modprobe.d/raspi-blacklist.conf

add the line blacklist rtl8192cu, exit and save the file.

Enable the new driver at runtime

Append the new kernel module name to the modules file using the following short cut

 sudo nano /etc/modules 

add a line 8192cu

depmod

create the required dependency links for the kernel using

sudo depmod -a

Wifi Configuration

Edit Network Settings

Edit /etc/network/interfaces and add a wifi section for wlan0

sudo nano /etc/network/interfaces

add the wlan0 settings to the end of the file as follows.

auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant.conf -B

Create WPA conf

create and edit the file /etc/wpa_supplicant.conf

sudo nano /etc/wpa_supplicant.conf

populate the file with the following information

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=2
network={
  ssid="<YOUR WIFI SSID HERE>"
  scan_ssid=1
  proto=RSN
  key_mgmt=WPA-PSK
  pairwise=CCMP
  group=CCMP
# choose one of the following
  psk=”<YOUR WPA/WPA2 PASS PHRASE HERE>”
  psk=<YOUR HASH CODE HERE>
}

Note if you don't wish to expose your wifi pass phrase in this file, use the following process to create a hashed replacement of the form

 psk=58cfe1c8a36ce8a1f3cd938e281ca1222707df58e27df4745148bfebca7c4197

To get your hash code use the following

wpa_passphrase <YOUR WIFI SSID HERE>

Enter the correct pass phrase to get the required hash:

network={
	ssid="<YOUR WIFI SSID HERE>"
	#psk="<YOUR WPA/WPA2 PASS PHRASE HERE>"
	psk=2419cc182b52c63dcbfa18af4ed56262c4dca24c2a772216cff9e84b0ea77949
}

Copy the last line to the wifi conf file instead of entering your pass phrase.

ISSUES

After completing this, the boot screen reports the driver

 disagrees about symbol module layout
.
Could not read interface wlan0: no such device

Basically this means the downloaded version doesn't match the kernel and it isn't installed.

get kernel version

uname -r



Tested Using

Raspian

References

  1. [1]
  2. [2]
  3. [3]
  4. [4]