Difference between revisions of "Installing EW-7811Un WifiDongle"

From SingletonMillerWiki
Jump to: navigation, search
(Major rewrite covering the use of MrEngMan's install script)
Line 2: Line 2:
 
[[Category: RaspianRPi]]
 
[[Category: RaspianRPi]]
  
== Install Dongle ==
+
== Installation Script ==
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.
+
[http://www.raspberrypi.org/phpBB3/memberlist.php?mode=viewprofile&u=10221&sid=17a584bd7c4dae1a40fc6e0713ab41dc MrEngMan] over at RaspberryPi Forums has developed a script to support the installation of all '''rtl8188''' based Wifi devices. [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=6256], this includes the '''EW-7811Un'''.
  
Check the device has been detected.
+
== Ethernet / Internet Enabled ==
<code> dmesg | tail</code>
+
Requires an RPi with an existing wired LAN with internet available.
  
<pre>
+
'''Do not plug in your dongle until instructed to do so by the script'''.
[  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
+
</pre>
+
  
== Replace the Driver ===
+
Access a command line window and run the following commands:
=== New Driver Location ===
+
Download the driver from http://www.electrictea.co.uk/rpi/8192cu.tar.gz
+
 
+
<pre>wget http://www.electrictea.co.uk/rpi/8192cu.tar.gz</pre>
+
  
 +
*Download the install script
 
<pre>
 
<pre>
--2012-07-20 19:08:39--  http://www.electrictea.co.uk/rpi/8192cu.tar.gz
+
wget http://dl.dropbox.com/u/80256631/install-rtl8188cus-latest.sh
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]
+
 
</pre>
 
</pre>
  
Unzip the driver
+
*Execute the Script with superuser privileges
 
+
<pre>tar -zxvf 8192cu.tar.gz</pre>
+
 
+
which should do something like this.
+
 
<pre>
 
<pre>
jake@raspberrypi ~ $ tar -zxvf 8192cu.tar.gz
+
sudo bash install-rtl8188cus-latest.sh
8192cu.ko
+
 
</pre>
 
</pre>
  
Move the kernel module to the correct location using
+
you should be presented with the following:
  
<pre> sudo mv 8192cu.ko /lib/modules/3.1.9+/kernel/net/wireless/</pre>
 
 
=== Disable the current driver ===
 
 
This requires <code>blacklisting</code> the current modules, edit the blacklist configuration file
 
 
<pre>sudo nano /etc/modprobe.d/raspi-blacklist.conf</pre>
 
 
add the line <code>blacklist rtl8192cu</code>, 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
 
 
<pre> sudo nano /etc/modules </pre>
 
 
add a line <code>8192cu</code>
 
 
=== depmod ===
 
create the required dependency links for the kernel using
 
 
<pre>
 
<pre>
sudo depmod -a
+
This script will install the driver for Realtek RTL8188CUS based wifi adapters
</pre>
+
and update the software to the latest version using apt-get and rpi-update.
  
== Wifi Configuration ==
+
1. It can install a new driver if you do not already have the rtl8188cus driver
=== Edit Network Settings ===
+
  installed and have no other wifi adapter installed.
Edit <code>/etc/network/interfaces</code> and add a wifi section for <code>wlan0</code>
+
2. It can install a wifi adapter using the rtl8188cus driver if you have a wifi
 +
  adapter using a different driver already installed.
 +
3. If the driver is already installed it will update the driver and software, or
 +
  allow you to add an different wifi adapter using the rtl8188cus driver so you
 +
  can switch between them if you want to, e.g. unplug one and plug in another,
 +
  or even connect two wifi adapters at the same time.
 +
4. It can repair a broken driver. e.g. if you have updated the software and the
 +
  wifi has stopped working it will update the driver to a working version if
 +
  one is available.
  
<pre>sudo nano /etc/network/interfaces</pre>
+
If you are installing your first wifi adapter or adding a new one do not plug it
 +
in until told to do so. If you have a wifi adapter already installed and now it
 +
is not working due to a recent software update unplug it now and plug it back in
 +
when the script tells you to.
  
add the wlan0 settings to the end of the file as follows.
+
If you don't have a working wifi adapter but do have a wired network with access
 +
to the internet connect the internet cable. Files needed for the installation
 +
will be downloaded from the internet.
  
<pre>
+
If you have a working wifi adapter and it is plugged in do not unplug it. It
auto wlan0
+
will be used to download files needed for the installation from the internet.
iface wlan0 inet dhcp
+
pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant.conf -B
+
</pre>
+
  
=== Create WPA conf ===
+
Press any key to continue...  
create and edit the file <code>/etc/wpa_supplicant.conf</code>
+
 
+
<pre>sudo nano /etc/wpa_supplicant.conf</pre>
+
 
+
populate the file with the following information
+
 
+
<pre>
+
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>
+
}
+
 
</pre>
 
</pre>
 
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
+
With access to the internet the script will attempt to download the required files and install the drivers and device firmware automatically.
<pre>wpa_passphrase <YOUR WIFI SSID HERE></pre>
+
  
Enter the correct pass phrase to get the required hash:
+
Allow the script to proceed and enter your wifi 'SSID' and 'passphrase' and when prompted plug in your wifi dongle.
<pre>
+
network={
+
ssid="<YOUR WIFI SSID HERE>"
+
#psk="<YOUR WPA/WPA2 PASS PHRASE HERE>"
+
psk=2419cc182b52c63dcbfa18af4ed56262c4dca24c2a772216cff9e84b0ea77949
+
}
+
</pre>
+
 
+
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
+
<pre> disagrees about symbol module layout</pre>.
+
  
<pre>Could not read interface wlan0: no such device</pre>
+
== If you don't have Internet on your RPi ==
 +
Requires a PC with SD card reader and access to the internet.
  
Basically this means the downloaded version doesn't match the kernel and it isn't installed.
+
=== Under Linux ===.
 +
Mount your RPi SD card in your existing system and download the following files to <code>/boot</code> on the SD card.
  
get kernel version
+
Replace <code>/media/sdcard</code> with the appropriate mount point of your SD card.
 
<pre>
 
<pre>
uname -r
+
cd /media/sdcard0/boot
 +
sudo wget http://dl.dropbox.com/u/80256631/install-rtl8188cus-latest.sh
 +
sudo wget http://dl.dropbox.com/u/80256631/8192cu-20120701.tar.gz
 +
sudo wget ftp://ftp.dlink.com/Wireless/dwa130_revC/Drivers/dwa130_revC_drivers_linux_006.zip
 
</pre>
 
</pre>
  
 +
Unmount the SD card, install it in your RPi and boot.
 +
Navigate to the <code>/boot</code> directory and run the script [].
  
install -p -m 644 8192cu.ko /lib/modules/3.1.9+/kernel/drivers/net/wireless/
+
=== Windows Users ===
 +
Windows occasionally has a few problems with text files and converts them to DOS format. Your Rpi linux system won't understand the DOS file format (mostly linebreaks) and will throw errors such as <code>file not found</code>.
  
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=31&t=7471
+
Converting to DOS format seems to happen most often when moving files around from one device to another or when emailing files.
  
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=6256
+
If you encounter problems try minimising the number of file copies by directly downloading to your SD boot folder.
  
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=6256&start=450
+
Once you've got the files on to your SD card process with the installation as defined above.
  
=== Forum ===
 
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=6256&start=450
 
  
http://dl.dropbox.com/u/80256631/install-rtl8188cus-latest.sh
+
== Confirmed Work ==
http://dl.dropbox.com/u/80256631/8192cu-20120701.tar.gz
+
*2012-07-15-wheezy-raspbian [http://downloads.raspberrypi.org/images/raspbian/2012-07-15-wheezy-raspbian/2012-07-15-wheezy-raspbian.zip]
  
wget ftp://ftp.dlink.com/Wireless/dwa130_revC/Drivers/dwa130_revC_drivers_linux_006.zip
 
 
== Tested Using ==
 
Raspian
 
  
 
== References ==
 
== References ==
 +
#[http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=6256 Automatic setup for RTL8188CUS based wifi adapters]
 +
#[http://downloads.raspberrypi.org/images/raspbian/2012-07-15-wheezy-raspbian/2012-07-15-wheezy-raspbian.zip 2012-07-15-wheezy-raspbian.zip]
 +
 
#[http://www.edimax.co.uk/en/produce_detail.php?pd_id=328&pl1_id=1&pl2_id=44]
 
#[http://www.edimax.co.uk/en/produce_detail.php?pd_id=328&pl1_id=1&pl2_id=44]
 +
 
#[http://elinux.org/RPi_edimax_EW-7811Un]
 
#[http://elinux.org/RPi_edimax_EW-7811Un]
 
#[http://elinux.org/RPi_VerifiedPeripherals#Working_USB_Wifi_Adapters]
 
#[http://elinux.org/RPi_VerifiedPeripherals#Working_USB_Wifi_Adapters]
 
#[http://www.ctrl-alt-del.cc/2012/05/raspberry-pi-meets-edimax-ew-7811un-wireless-ada.html]
 
#[http://www.ctrl-alt-del.cc/2012/05/raspberry-pi-meets-edimax-ew-7811un-wireless-ada.html]

Revision as of 14:32, 23 July 2012


Installation Script

MrEngMan over at RaspberryPi Forums has developed a script to support the installation of all rtl8188 based Wifi devices. [1], this includes the EW-7811Un.

Ethernet / Internet Enabled

Requires an RPi with an existing wired LAN with internet available.

Do not plug in your dongle until instructed to do so by the script.

Access a command line window and run the following commands:

  • Download the install script
wget http://dl.dropbox.com/u/80256631/install-rtl8188cus-latest.sh
  • Execute the Script with superuser privileges
sudo bash install-rtl8188cus-latest.sh

you should be presented with the following:

This script will install the driver for Realtek RTL8188CUS based wifi adapters
and update the software to the latest version using apt-get and rpi-update.

1. It can install a new driver if you do not already have the rtl8188cus driver
   installed and have no other wifi adapter installed.
2. It can install a wifi adapter using the rtl8188cus driver if you have a wifi
   adapter using a different driver already installed.
3. If the driver is already installed it will update the driver and software, or
   allow you to add an different wifi adapter using the rtl8188cus driver so you
   can switch between them if you want to, e.g. unplug one and plug in another,
   or even connect two wifi adapters at the same time.
4. It can repair a broken driver. e.g. if you have updated the software and the
   wifi has stopped working it will update the driver to a working version if
   one is available.

If you are installing your first wifi adapter or adding a new one do not plug it
in until told to do so. If you have a wifi adapter already installed and now it
is not working due to a recent software update unplug it now and plug it back in
when the script tells you to.

If you don't have a working wifi adapter but do have a wired network with access
to the internet connect the internet cable. Files needed for the installation
will be downloaded from the internet.

If you have a working wifi adapter and it is plugged in do not unplug it. It
will be used to download files needed for the installation from the internet.

Press any key to continue... 

With access to the internet the script will attempt to download the required files and install the drivers and device firmware automatically.

Allow the script to proceed and enter your wifi 'SSID' and 'passphrase' and when prompted plug in your wifi dongle.

If you don't have Internet on your RPi

Requires a PC with SD card reader and access to the internet.

=== Under Linux ===. Mount your RPi SD card in your existing system and download the following files to /boot on the SD card.

Replace /media/sdcard with the appropriate mount point of your SD card.

cd /media/sdcard0/boot
sudo wget http://dl.dropbox.com/u/80256631/install-rtl8188cus-latest.sh
sudo wget http://dl.dropbox.com/u/80256631/8192cu-20120701.tar.gz
sudo wget ftp://ftp.dlink.com/Wireless/dwa130_revC/Drivers/dwa130_revC_drivers_linux_006.zip

Unmount the SD card, install it in your RPi and boot. Navigate to the /boot directory and run the script [].

Windows Users

Windows occasionally has a few problems with text files and converts them to DOS format. Your Rpi linux system won't understand the DOS file format (mostly linebreaks) and will throw errors such as file not found.

Converting to DOS format seems to happen most often when moving files around from one device to another or when emailing files.

If you encounter problems try minimising the number of file copies by directly downloading to your SD boot folder.

Once you've got the files on to your SD card process with the installation as defined above.


Confirmed Work

  • 2012-07-15-wheezy-raspbian [2]


References

  1. Automatic setup for RTL8188CUS based wifi adapters
  2. 2012-07-15-wheezy-raspbian.zip
  1. [3]
  1. [4]
  2. [5]
  3. [6]