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 :)

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

  1. By the way, Realtek updated their drivers yesterday and says it supports “Linux Kernel 2.6.18~2.6.38 and Kernel 3.0.2”.

    In this case what should we do? And in Kubuntu as I prefer KDE, is the procedure same? 

  2. I just went through this and found that I no longer had to change “smp_lock.h” to “smp.h” for the drivers to compile.

  3. Thank you for this guide. I was hoping that this would solve my problem with this adapter. Unfortunately, it doesn’t want to work for me. I can get the drivers to install via the script, the light comes on, I can see wifi networks, but not connect.

    I posted a help thread about this here: http://ubuntuforums.org/showthread.php?t=1892621

    I also found this thread: http://ubuntuforums.org/showthread.php?t=1883600&highlight=EW-7811Un&page=2

    On that thread, post 18 suggests compiling using DKMS. Do you have any thoughts on this?

    I appreciate it!

    – Phil

    1. Hi Phil,
      I am sorry this didn’t work for you.

      Did you follow all of the steps?

      I do not have experience with recompiling the DKMS, sorry 🙁

      Please let me know if you get this solved.

      Good luck,
      Tal

      1. Hello Tal,

        Yes, I did follow the guide’s steps several times. For whatever reason, it does not want to work on my current setup. For now at least, installing Lucid was my solution. That’s disappointing, and I intend to keep fighting this as I need the 3.0+ kernel to properly use my 3TB hard drive, but at least I have internet for now. I appreciate your response!

        Thank you again,
        Phil

  4. Thanks very much for this. I had been trying to get the adapter to work for some time found that it worked after I followed the instructions exactly and restarted.

  5. This article was a great help (espcially the link to the drivers since drivers from edimax site did not compile). Latest drivers from realtek (3.3.xx) have the include smp_lock.h commented out so step 3 should be obsolete. I had to reboot to get the stick work.

    Thx
    Chilli71

  6. Many thanks, it works like a charm now! With current drivers (3.3.1_3083) there is no need to edit the sources.

  7. Sorry, didn’t fix it at all.  In fact, while I was able to see the wireless networks with the old driver (even though I couldn’t connect to them), I don’t see *any* networks now.

    Next thing to try is to enable the backports repo, since the Realtek site says “Linux Kernel 2.6.18~2.6.38 and Kernel 3.0.2”, and the kernel version (even with updates) in Onieric is 3.0.0-14

  8. I was intalling edimax EW-7711USn on 2012-01-14 Realtek driver had version “RTL8188C_8192C_8192D_USB_linux_v3.3.2_3192.20120103” lines in
    Change osdep_service.h (line XX) linux/smp_lock.h to linux/smp.hand uncomment the line eg. delete “//”Change file rtw_io.h (line XX) linux/smp_lock.h to linux/smp.hand uncomment the line eg. delete “//”

  9. Thanks finally got it to work though the zip files you refer to do not exist on the linked site. REALECH for whatever reason have renamed the files. Anyway unplugging and repluging didn’t work for me so rebooted and it worked.

  10. Thanks such a lot for that. 
    The current new drivers (Jan 2012) seem to work fine without needing to edit them. The last step (blacklisting the old driver) was something I would not have thought of.

  11. installed ubuntu 11.10 fresh from cd. downloaded the ew-7811un (jan 2012) drivers. went straight to step 4 and got wireless working. did a system update, rebooted and wireless is no longer show in the network manager… 🙁

      1. If system updates are listed as “new install”, that effectively overwrites your existing drivers so afterwards you’ll have to go through the same process, each time there’s a major update. A bit of an overhead, but hey ho!

  12. Thanks!  Blacklisting was key.  I did actually edit script files although not needed by latest driver.  Got put on to this site by Launchpad question, (my feet have wondered, I do not know where.)

  13. Followed your steps but it didn’t work. running 11.10 on a dv2120us. Let me know if there is any other pertinent information to include.

  14. Worked great! Only thing that i would add is to reboot after step 1 for the open in terminal command to appear. Thanks for posting!

    1.  Same problem with BT 5 R2. I manage to see the networks in Wicd, I try and connect but doesn’t get past auth. After that it doesn’t see any networks unless I take USB out of port and put back in again.

  15. Spot on walk-through, thanks for posting it up! Using 12.04 Beta and it worked fine with that to.
    As mentioned, it might help to add a line saying you need to reboot. Fortunately I remembered the IT Crowd tech support advice 😀

  16. Please help!

    I need this exact fix but it appears Realtek have taken the file I am looking for down! (3.3.1_3083)

    Where can I get this file now? I am seriously desperate

  17. I followed you post – thanks for the step-by-step instructions 🙂 – but it still doesn’t work for me. It keeps timing out during authentication. It connects fine if I remove the key but that’s obviously not ideal.

  18. This worked great for me!  The Realtek drivers seem to be problematic, but thanks to the community for getting a working driver up for 11.10 and a process that a newbie can follow!

    1. can you give a direct link to them? because i don’t know which ones are the right one; the one i downloaded(RTL8188C_8192C_..) while installing gives me the choice between the RTL8192cu/-du which aren’t right for this aadapter.
      thanks

  19. Hi

    Thnx for the great tutorial! One problem … i can’t change my mac address if I use the new drivers …I tried it with macchanger and with hw ether … but no luck…

    For example:
    Current MAC: 00:e0:4c:81:92:00 (Realtek Semiconductor Corp.)
    Faked MAC:   e4:ce:8f:36:5c:de (unknown)

    But my mac isn’t changed…

    Can you please help me ?

    Greetings!
     

    1.  To change MAC you need to put interface down
      ifconfig wlan0 down
      macchanger –mac e4:ce:8f:36:5c:de wlan0
      ifconfig wlan0 up

      It should be changed

  20. I am getting kernel panic and BSOD after following installing this driver… 

    my kernel is 3.2.0-23-generic (x86_64) which I now see is supposed to support the Realtek 8188CUS chip out of the box.  Silly me for assuming I had to install the driver myself as I did in previous 2.x kernel versions.

    So how can reverse the procedure and uninstall the driver?

  21. Gotta say, thanks so much for posting this small tutorial. Worked a treat after the restart and can finally update my system and get on web now. Much appreciated.

  22. Cant get this work! When you say sudo bash install.sh

    It just keeps coming up with this:

    bash: install.sh: No such file or directory

    Ive got Version v3.4.4_4749
    Tried everything to get it work!!

    Please help

    1. Chris,

      You need to unpack/unzip the downloaded file into a folder, then go to the folder and start a terminal (type “ls”to show it content in terminal and see if install.sh is there). From the terminal you can then start the install.

      1. And it doesn’t matter where the folder is.

        I just extracted the archive to my desktop. So for me the commands were:

        cd Desktop
        ls
        cd RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105
        sudo bash install.sh

        The first line puts you on the desktop. The second line lists the name of the directory so you know where to go next (and you can also copy and paste the directory name so you don’t have to type in all those numbers). The third line puts you in the right directory, and the fourth line installs the driver.

        The writer of the original post suggested installing nautilus-open-terminal to make things easier, but that didn’t work for me for some reason.

  23. Thank you very much! That worked perfectly for me using Ubuntu 12.04 and driver version 3.4.4_4749.20121105. I did get an error message somewhere in the install process, but apparently it was benign. I appreciate your posting this.

    1. I just did a kernel update to 3.2.0-36-generic-pae, and the driver was no longer installed. I tried removing the blacklist line and rebooting to see if the new kernel might support the wireless adapter out of the box, but no such luck.

      I don’t know if that will happen with every kernel update, but in any case reinstallation was no problem.

      By the way, I’m not using the Edimax, but a no-name adapter I bought for cheap that uses the same chipset.

  24. Thanks! It works like a charm. But maybe it is better to notice that before running install.sh, Linux headers package has to be installed. Otherwise there will be a error 2 message and it fails to install the driver.

      1. It’s me again. I got a nearly fresh ubuntu system. At first there’s no linux header package. When I install the driver, it showed the error message what O mentioned. After some google searching, it seems before compiling the third party driver, the current kernel’s header package has to be installed. I just did that step, then the error disappeared. Compiling is successful!

  25. 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 🙂

  26. 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.

  27. 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!

  28. 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.

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

    RTL8192SU needs smp_lock.h to compile.

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

  30. 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?

  31. 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 to confused@_@Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.