Sunday 12 January 2014

EDIMax ew-7811un driver Linux Mint/Ubuntu Wireless LAN 8192 Realtek

Well I just had one heck of a learning experience just now!

You recall that the latest Linux Mint wouldn't work with my wireless USB dongle, nor with my mobile broadband dongle. So I went back to the latest LTS release (Maya) which works with my mobile broadband fine.

However, my wireless STILL did not work. I got it working once for a handful of minutes before it stopped. But mostly it would just keep trying to connect with no success.

Anyway, I got round to googling this and apparently this is a known issue. Normally, the native wireless drivers with Linux are supposed to be pretty good but in this case not so!

The native driver is a "module" called rtl8192cu. It must be removed and replaced, in this case with one called 8192cu.

I found a lot of sources of info on this, links will follow but here is my simplified explanation.

~~~~~~~
First, you can see the wrong driver in action if you use command lsmod which shows all currently loaded modules.

Pull the USB thing out and manually unload the module too using terminal window command:

sudo modprobe -r rtl8192cu

Also, blacklist this module so it never gets loaded again. You need to edit the file:

/etc/modprobe.d/blacklist.conf

Add the lines:

# Blacklist native RealTek 8188CUs drivers
blacklist rtl8192cu
blacklist rtl8192c_common
blacklist rtlwifi

By the way, it's the first time I edited a file, it wouldn't let me! gedit is like the "Notepad" of Linux. You need to launch it with admin rights by typing into a Terminal window:

sudo grep

Then go and open that file and edit as mentioned.

OK that's the dodgy driver taken care of. Now to download the new one.

Forget the EDIMAX site, the driver there is old. You can go to the Realtek site instead. The link to the driver is here.

I found it and it was called "RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip"

However, all the links are to FTP sites and my ISP blocks them! I found them at two other places:
http://blog.danielscrivano.com/replacing-the-old-edimax-ew-7811un-moduledriver/
and
http://www.touslesdrivers.com/index.php?v_page=23&v_code=39144&v_langue=en

the first one incidentally has a good explanation of what we are doing right now, too!

You can unzip them by opening a Terminal window and typing:

unzip RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip

I was worried that these files might not be legit but the first link is to a guy who works at a university in the public sphere, I figure that this file must be legit. In any case, the MD5 checksum for both is:

5f15575ba6ae58cae485e8060bc771ed

meaning these files are identical from both sources so most likely the real deal.

Incidentally, in Linux you don't need to download a program to run a checksum, simply go to a folder and type:

md5 *

and it shows all the checksums for you. Pretty neat, eh?

The idea then goes to find a file inside the extracted folder called install.sh.

As typically for many Linux installations, you have to run this with some kind of admin rights, so the right command is:

sudo bash install.sh

I was about to do this but read that when the Linux kernel is updated (think of it as like going from Windows XP SP2 to SP3) that you have to run this again. I then read some more and apparently you need a patch when you hit Linux kernel version 3.11.

So I checked my kernel version using a cool command:

uname -a

I had kernel 3.2. So I am well away from having to do patching and all that business. What's more, I found a package that will automatically stop me having to reload this driver with each kernel update, all the way up to 3.11. So I installed this instead.

Check it out, it's a cool installer package (.deb): Wireless Drivers package by Tim.

Then I plugged the USB dongle back in and it worked a treat! The wireless connected quickly. Incidentally, before I had some strange signal strengths showing such as a far away router being full strength and a nearby one having nothing. But with the new driver, the signal strengths are accurate!

If I run lsmod, I can now see the new 8192cu module listed. It loads automatically when I insert the USB device. I read somewhere you can also load it manually with command:

sudo modprobe 8192cu

However, it's not necessary. I also read somewhere you need to add to a file called "/etc/modules" the word "8192cu" so that it loads after a reboot. However, I found that this simply isn't necessary. But if you get problems, feel free to do that.

Summary


  1. take out the dongle and check for the old module, disable it if it's still running
  2. run the installer package
  3. put the dongle back in, check the new module is running then run your new wireless driver!
These links were REALLY useful to me:


No comments:

Post a Comment

Popular Posts