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

From SingletonMillerWiki
Jump to: navigation, search
m
 
(7 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
[[Category: RaspianRPi]]
 
[[Category: RaspianRPi]]
  
== Install Dongle ==
+
As of Feb '13 the EW-7811Un WifI Dongle is supported out of the box in Raspian and the installation process is obsolete.  
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.
+
== Installation Script ==
  
Check the device has been detected.
+
[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'''.
<code> dmesg | tail</code>
+
  
 +
== 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
 
<pre>
 
<pre>
[  76.830012] usb 1-1.2: new high speed USB device number 4 using dwc_otg
+
wget http://dl.dropbox.com/u/80256631/install-rtl8188cus-latest.sh
[  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>
 
</pre>
  
== Replace the Driver ===
+
*Execute the Script with superuser privileges
=== New Driver Location ===
+
<pre>
Download the driver from http://www.electrictea.co.uk/rpi/8192cu.tar.gz
+
sudo bash install-rtl8188cus-latest.sh
 +
</pre>
  
<pre>wget http://www.electrictea.co.uk/rpi/8192cu.tar.gz</pre>
+
you should be presented with the following:
  
 
<pre>
 
<pre>
--2012-07-20 19:08:39--  http://www.electrictea.co.uk/rpi/8192cu.tar.gz
+
This script will install the driver for Realtek RTL8188CUS based wifi adapters
Resolving www.electrictea.co.uk (www.electrictea.co.uk)... 184.173.73.187
+
and update the software to the latest version using apt-get and rpi-update.
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    
+
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.
  
2012-07-20 19:08:40 (229 KB/s) - `8192cu.tar.gz' saved [213532/213532]
+
If you are installing your first wifi adapter or adding a new one do not plug it
</pre>
+
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.
  
Unzip the driver
+
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>tar -zxvf 8192cu.tar.gz</pre>
+
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.
  
which should do something like this.  
+
Press any key to continue...  
<pre>
+
jake@raspberrypi ~ $ tar -zxvf 8192cu.tar.gz
+
8192cu.ko
+
 
</pre>
 
</pre>
  
Move the kernel module to the correct location using
+
With access to the internet the script will attempt to download the required files and install the drivers and device firmware automatically.
  
<pre> sudo mv 8192cu.ko /lib/modules/3.1.9+/kernel/net/wireless/</pre>
+
Allow the script to proceed and enter your wifi 'SSID' and 'passphrase' and when prompted plug in your wifi dongle.
  
=== Disable the current driver ===
+
If the script errors out, read the notification and fix the problems before retrying. If the problems are unable to download the files, try getting the files manually (see below).
  
This requires <code>blacklisting</code> the current modules, edit the blacklist configuration file
+
Once you Wifi is working and connected the script will offer you the possibility of updating the RPi software and Firmware. This is ''optional'' but you are encouraged to do so.
  
<pre>sudo nano /etc/modprobe.d/raspi-blacklist.conf</pre>
+
=== Update Issues ===
 +
During update of the RPi the script notified
  
add the line <code>blacklist rtl8192cu</code>, exit and save the file.
+
<pre>
 +
Unpacking replacement bash ...
 +
Processing triggers for man-db ...
 +
Setting up bash (4.2-4) ...
 +
Installing new version of config file /etc/bash.bashrc ...
  
=== 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>
+
Configuration file `/etc/skel/.bashrc'
 
+
==> Modified (by you or by a script) since installation.
add a line <code>8192cu</code>
+
==> Package distributor has shipped an updated version.
 
+
  What would you like to do about it ?  Your options are:
=== depmod ===
+
    Y or I  : install the package maintainer's version
create the required dependency links for the kernel using
+
    N or O  : keep your currently-installed version
<pre>
+
      D    : show the differences between the versions
sudo depmod -a
+
      Z    : start a shell to examine the situation
 +
The default action is to keep your current version.
 +
*** .bashrc (Y/I/N/O/D/Z) [default=N] ? y
 
</pre>
 
</pre>
  
== Wifi Configuration ==
+
I selected '''Y''' and the script carried on without further issue.
=== Edit Network Settings ===
+
Edit <code>/etc/network/interfaces</code> and add a wifi section for <code>wlan0</code>
+
  
<pre>sudo nano /etc/network/interfaces</pre>
+
== What to do if your RPi doesn't have Internet ==
 +
Requires a PC with SD card reader and access to the internet.
  
add the wlan0 settings to the end of the file as follows.
+
=== Under Linux ===
 +
Mount your RPi SD card in your existing system and download the following files to <code>/boot</code> on the SD card.
  
 +
Replace <code>/media/sdcard</code> with the appropriate mount point of your SD card.
 
<pre>
 
<pre>
auto wlan0
+
cd /media/sdcard0/boot
iface wlan0 inet dhcp
+
sudo wget http://dl.dropbox.com/u/80256631/install-rtl8188cus-latest.sh
pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant.conf -B
+
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>
  
=== Create WPA conf ===
+
Unmount the SD card, install it in your RPi and boot.
create and edit the file <code>/etc/wpa_supplicant.conf</code>
+
Navigate to the <code>/boot</code> directory and run the script as per [[Installing_EW-7811Un_WifiDongle#Ethernet / Internet Enabled]].
  
<pre>sudo nano /etc/wpa_supplicant.conf</pre>
+
=== 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 line breaks) and will throw errors such as <code>file not found</code>.
  
populate the file with the following information
+
Converting to DOS format seems to happen most often when moving files around from one device to another or when emailing files.
  
<pre>
+
If you encounter problems try minimising the number of file copies by directly downloading to your SD boot folder.
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>
+
+
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
+
Download the following files
<pre>wpa_passphrase <YOUR WIFI SSID HERE></pre>
+
  
Enter the correct pass phrase to get the required hash:
+
<code>
<pre>
+
*http://dl.dropbox.com/u/80256631/install-rtl8188cus-latest.sh
network={
+
*http://dl.dropbox.com/u/80256631/8192cu-20120701.tar.gz
ssid="<YOUR WIFI SSID HERE>"
+
*ftp://ftp.dlink.com/Wireless/dwa130_revC/Drivers/dwa130_revC_drivers_linux_006.zip
#psk="<YOUR WPA/WPA2 PASS PHRASE HERE>"
+
</code>
psk=2419cc182b52c63dcbfa18af4ed56262c4dca24c2a772216cff9e84b0ea77949
+
}
+
</pre>
+
  
Copy the last line to the wifi conf file instead of entering your pass phrase.
+
Once you've got the files in the <code>/boot</code> directory of your SD card, proceed with the installation as per [[Installing_EW-7811Un_WifiDongle#Ethernet / Internet Enabled]].
  
== ISSUES ==
+
== Security ==
After completing this, the boot screen reports the driver
+
By default the installation script creates the correct entry in the <code>/etc/network/interface</code> file. If you look at the contents of the file you'll see that you secret wifi passphrase is included in plan text.
<pre> disagrees about symbol module layout</pre>.
+
<pre>cat /etc/network/interfaces</pre>
  
<pre>Could not read interface wlan0: no such device</pre>
+
shows (something like)
 
+
Basically this means the downloaded version doesn't match the kernel and it isn't installed.
+
 
+
get kernel version
+
 
<pre>
 
<pre>
uname -r
+
auto lo
</pre>
+
  
 +
iface lo inet loopback
 +
iface eth0 inet dhcp
  
install -p -m 644 8192cu.ko /lib/modules/3.1.9+/kernel/drivers/net/wireless/
+
allow-hotplug wlan0
  
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=31&t=7471
+
auto wlan0
  
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=6256
+
iface wlan0 inet dhcp
 +
wpa-ssid "<YOUR SSID>"
 +
wpa-psk "<YOUR PASSPHRASE>"
 +
</pre>
  
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=6256&start=450
+
If multiple uses can access your RPi, you not wish to share your secret pass phrase, fortunately the tool <code>wpa_passphrase</code> is there to help, code:
 +
<pre>
 +
wpa_passphase <YOUR SSID> <YOUR PASSPHRASE>
 +
</pre>
  
=== Forum ===
+
and it will return
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=6256&start=450
+
<pre>
 
+
network={
http://dl.dropbox.com/u/80256631/install-rtl8188cus-latest.sh
+
ssid="<YOUR SSID>"
http://dl.dropbox.com/u/80256631/8192cu-20120701.tar.gz
+
#psk="<YOUR PASSPHRASE>"
 +
psk=761f48b534c79fe2c7dv3c2305e25b9d4bdfd51166e73c95dd78e44fa742a2e4
 +
}
 +
</pre>
  
wget ftp://ftp.dlink.com/Wireless/dwa130_revC/Drivers/dwa130_revC_drivers_linux_006.zip
+
replace the line <code>wpa-psk "<YOUR PASSPHRASE>"</code> with <code>wpa-psk 761f48b534c79fe2c7dv3c2305e25b9d4bdfd51166e73c95dd78e44fa742a2e4 </code>, to mask your passphrase from anyone who gains access to the network config file.
  
== Tested Using ==
+
== Confirmed working with ==
Raspian
+
*2012-07-15-wheezy-raspbian [http://downloads.raspberrypi.org/images/raspbian/2012-07-15-wheezy-raspbian/2012-07-15-wheezy-raspbian.zip]
  
 
== References ==
 
== References ==
#[http://www.edimax.co.uk/en/produce_detail.php?pd_id=328&pl1_id=1&pl2_id=44]
+
#[http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=6256 Automatic setup for RTL8188CUS based wifi adapters]
#[http://elinux.org/RPi_edimax_EW-7811Un]
+
#[http://downloads.raspberrypi.org/images/raspbian/2012-07-15-wheezy-raspbian/2012-07-15-wheezy-raspbian.zip 2012-07-15-wheezy-raspbian.zip]
#[http://elinux.org/RPi_VerifiedPeripherals#Working_USB_Wifi_Adapters]
+
#[http://www.edimax.co.uk/en/produce_detail.php?pd_id=328&pl1_id=1&pl2_id=44 EW-7811Un WifiDongle]
#[http://www.ctrl-alt-del.cc/2012/05/raspberry-pi-meets-edimax-ew-7811un-wireless-ada.html]
+
#[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 raspberry-pi-meets-edimax-ew-7811un-wireless-ada.html]

Latest revision as of 07:30, 2 June 2013


As of Feb '13 the EW-7811Un WifI Dongle is supported out of the box in Raspian and the installation process is obsolete.

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 the script errors out, read the notification and fix the problems before retrying. If the problems are unable to download the files, try getting the files manually (see below).

Once you Wifi is working and connected the script will offer you the possibility of updating the RPi software and Firmware. This is optional but you are encouraged to do so.

Update Issues

During update of the RPi the script notified

Unpacking replacement bash ...
Processing triggers for man-db ...
Setting up bash (4.2-4) ...
Installing new version of config file /etc/bash.bashrc ...


Configuration file `/etc/skel/.bashrc'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** .bashrc (Y/I/N/O/D/Z) [default=N] ? y

I selected Y and the script carried on without further issue.

What to do if your RPi doesn't have Internet

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 as per Installing_EW-7811Un_WifiDongle#Ethernet / Internet Enabled.

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 line breaks) 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.

Download the following files

Once you've got the files in the /boot directory of your SD card, proceed with the installation as per Installing_EW-7811Un_WifiDongle#Ethernet / Internet Enabled.

Security

By default the installation script creates the correct entry in the /etc/network/interface file. If you look at the contents of the file you'll see that you secret wifi passphrase is included in plan text.

cat /etc/network/interfaces

shows (something like)

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0

auto wlan0

iface wlan0 inet dhcp
wpa-ssid "<YOUR SSID>"
wpa-psk "<YOUR PASSPHRASE>"

If multiple uses can access your RPi, you not wish to share your secret pass phrase, fortunately the tool wpa_passphrase is there to help, code:

wpa_passphase <YOUR SSID> <YOUR PASSPHRASE>

and it will return

network={
	ssid="<YOUR SSID>"
	#psk="<YOUR PASSPHRASE>"
	psk=761f48b534c79fe2c7dv3c2305e25b9d4bdfd51166e73c95dd78e44fa742a2e4
}

replace the line wpa-psk "<YOUR PASSPHRASE>" with wpa-psk 761f48b534c79fe2c7dv3c2305e25b9d4bdfd51166e73c95dd78e44fa742a2e4 , to mask your passphrase from anyone who gains access to the network config file.

Confirmed working with

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

References

  1. Automatic setup for RTL8188CUS based wifi adapters
  2. 2012-07-15-wheezy-raspbian.zip
  3. EW-7811Un WifiDongle
  4. http://elinux.org/RPi_edimax_EW-7811Un
  5. http://elinux.org/RPi_VerifiedPeripherals#Working_USB_Wifi_Adapters
  6. raspberry-pi-meets-edimax-ew-7811un-wireless-ada.html