Edimax EW-7811Un USB wireless – connecting to a network (on ubuntu 11.10)

I recently decided to make the plunge and install ubuntu 11.10 (32 bit) on my desktop. All went smoothly except for one bug: I couldn’t get Internet.

I use a wireless USB stick by edimax (it is called IEEE802.11b/g/n nano USB adapter or also EW-7811Un). The problem was that Ubuntu seems to be able to use the USB to see the networks around me, but when I tried to connect to my network (either when the router had the password on or off) – it just kept trying and failing to connect.

This is apparently a known bug which can be resolved after following some good leads from ubuntuforums (thanks the user “praseodym” for your help) and askubuntu (thank you user Engels Peralta for your help).

Bellow are the steps I needed to take in order to solve the problem in the smoothest fashion – I hope others might benefit from it in the future.

Step 0: get a network cable

In order to solve this issue you will need Internet.  Get a network cable which you can physically connect to your router.  Once you have Internet access the following steps are much easier to follow.

Step 1: make it easy to open terminal window in a specific folder location

This step is important since it makes several other steps easier to manage.

The instructions on how to do it are given here.  You simply need to open a terminal window (press CTRL+ALT+T), and type:
sudo apt-get install nautilus-open-terminal

From now on, whenever you want to open a new terminal window in a specific folder – you simply right-click that folder (from the folder which is a level above it) and choose “Open in Terminal”

Step 2: Download the latest edimx drivers

Go here, and download the driver.

Step 3 is not needed

Update: The current new drivers (Jan 2012 – version 3.3.2_3192) seem to work fine without needing to edit them. You will likely need a system restart later…

Step 3: Edit the driver files

The drivers as of today (that is, the driver which is in the file “RTL8188CU_linux_v3.1.2590.20110922.zip”) will not work “out of the box” for ubuntu 11.10 and will need to be (slightly) modified.

Unzip the driver folder, and then go to the archive driver/rtl8192_8188CU_linux_v3.1.2590.20110922.tar.gz inside the driver folder (which is likely to be called “RTL8192CU_8188CUS_8188CE-VAU_linux_v3.1.2590.20110922″ inside your download folder) There you will need to edit two files (simply browse there and double click the files to have them open in gedit for editing):

file 1: include/rtw_io.h

Change osdep_service.h (line 36) linux/smp_lock.h to linux/smp.h

file 2: include/osdep_service.h

Change file rtw_io.h (line 49) linux/smp_lock.h to linux/smp.h


Step 4: Install the new driver

Go to the download folder and open (using right click, if you followed step 0) the terminal for the folder “RTL8192CU_8188CUS_8188CE-VAU_linux_v3.1.2590.20110922″.  Then run:

sudo bash install.sh

(note 1: it will ask for your user’s password – as will any command which is using the sudo = super user do prefix)

(note 2: in order to paste in the terminal, use ctrl+shift+v instead of just ctrl+v as is in the GUI and other editors)

Step 5: blacklist the old driver

Next, we want to edit /etc/modprobe.d/blacklist.conf Getting there using the GUI wouldn’t work, because ubuntu wouldn’t let us save the changes we will make. Instead, just open the terminal and type:
sudo gedit /etc/modprobe.d/blacklist.conf

Go to the end of the file and add the line:

blacklist rtl8192cu

(thanks goes to icracked for the advise)

Step 6: remove and re-insert the network USB (and reboot)

Once done – I was finally able to see and connect to my home Internet network.

At this point, some people also said reboot helped, so if you got this far, why not do that too…


Last thanks also goes to Ethan Shalev, Eran Vered, Gadi Esterin, and Gil Bahat – for caring and trying to help through facebook. And also to Tomer Cohen, for spending some good quantities of time trying to help me (and also showing me some cool things on the way).


If you get to know of any better solutions, or if the problem is already fixed (or simply if this post helped you) – feel welcome to leave a comment :)

104 thoughts on “Edimax EW-7811Un USB wireless – connecting to a network (on ubuntu 11.10)”

  1. Thanks for an excellent post.

    I’ve used the v3.4.4 (2012/11/12) driver to install a no-name adapter on Mint 14.

    I got one error during installation:
    ERROR: Module 8192cu does not exist in /proc/modules

    and changed Step 5 to use pluma instead of gedit

    sudo pluma /etc/modprobe.d/blacklist.conf

    Other than that it worked perfectly, first time :)

  2. Thank you, Tal, this solved it for me. We do have to install gedit first, however:

    sudo apt-get install gedit

    Otherwise things look fine after your fix.

  3. Now that did the trick. I’ve just installed Linux Mint 12 on an ancient ThinkPad 600X, and although the basic installation saw the Edimax dongle and spotted my network, it couldn’t connect. I followed the instructions above and now it works. Yay!

  4. Thanks a trillion Mr.Galili! It works like a charm on Linux Mint 13 64 bits.

    I was desperate because my TP Link WN725N wifi dongle was being recongized by the system but it always kept connecting to the router despite the passphrase was ok.

    Thank you very very much.

  5. I’m in Puppy slacko 5.5 3.2.33-4g kernel

    RTL8192SU needs smp_lock.h to compile.

    Can I ignore it [comment it out], and if not, is snmp.h a replacement?

  6. Thanks for this, works fine on Ubuntu 12.10 except if I turn off my PC. It seems I’m having to do this every time I turn on my PC. I’ve followed all the steps but am I missing something?

  7. I did everything it says but when I run sudo bash install.sh it says “compile make driver error 2 please check error message plz help

    1. I’m in the same boat with that error. I just installed Linux 12.04 and am learning as I go. However, I suspect it has something to do with the Kernel version. My kernel is 3.8.0-31-generic but the driver I am pretty sure I need (RTL8188CUS) is compatible with Kernel 3.0.8. I updated the kernel header package as discussed in comments below, but that did not make a difference.

      I am also using a TP-Link TL-WN725N but another thread that directed me to this one said that the driver is the same (http://linuxforums.org.uk/index.php?topic=10658.0).

      Any help would be much appreciated. Life without wifi is terrible…

Leave a Reply