AyeTea

...IT in Tea Break Sized Bytes

  • Increase font size
  • Default font size
  • Decrease font size
Technorati Profile
Home A Room Without Windows Updating the RT8260 802.11N Wireless Network Driver from Source

Updating the RT8260 802.11N Wireless Network Driver from Source

E-mail Print PDF
User Rating: / 6
PoorBest 

In my last post I was moaning that

Linux and in particular Eeebuntu was lacking when it came to connecting my EeePC901 to a wireless N network. IN an attempt to resolve this issue I have been scouting around the Internet for a solution. It's fair to say that either my pretty terrible google skills have let me down or that the issue has not been resolved.
What I did find looking around is that the drivers included with EeeBuntu for the Ralink RT2860STA based network cards are several versions behind the drivers supplied on the Ralink website. Eeebuntu is supplied with version 1.8.1, available for download is 2.1.2.0 at the time of writing this piece.

In Windows replacing a driver is a pretty easy affair, even for a casual user. Typically companies supply drivers for download and within the zipped file there is a driver complete with executable file that will do the rest of the work for you. A restart and all going well you have updated on the driver.

Linux should on the other hand be easier for upgrades. The linux method involves having a central repositories. Updates to the system, including drivers are done through an update manager. Providing the new drivers have been included in the central location, this is handled for you automatically. However, and it is in this case a big however, If the drivers are not included as updates, then they wont download

Windows drivers are usually created by the companies that sell the hardware. Obviously if they want users to buy their product they need to provide software that allows the user to well.... use it. As windows is by far the most widely used operating system, you can guess that hardware manufacturers have Windows drivers pretty much at the top of their "Things to Do" list. After that they may supply drivers for other Operating Sytems such as MAC or Linux.

With Linux, with it's more limited number of users, companies may even decide not to spend money developing drivers for Linux or give Linux drivers less development. In this case either the hardware wont work or in some cases Linux enthuisiasts have written their own software to control the devices.

In the case of Ralink, manufacturer of wireless card controllers they are apparently very supportive of non-Windows Operating systems and in fact have been developing updates to improve their drivers. It is this updated software that I hope will ease my wireless N connection problems.

Ralink however have not packaged these drivers with a neat little installation program that Windows drivers normally are supplied with, they are supplied as source code. Think of source code as a bit like a ready mixed cake recipe. All the stuff you need to bake a driver is included in the bag, but you still need to do a bit of the work for yourself. There is an advantage to this, it does mean that before you bake it you can change the cake slightly.

This also allows the manufacturer to supply a set of files that once compiled (the software equivelant of baking) will work on many different variants of Linux (think different shapes of cake tin).

Updating the Ralink driver was successful in enabling wireless N on my EeePC, not only that but it also works with WPA protection, an issue that I have read affects a number of EeePC users.  Double bonus!

The first thing that I had to do was to download the latest Ralink drivers from this location. It did not work perfectly for me, but was only one step away from success.

I downloaded them to my desktop, and unpacked the tar file that Ralink supplied. I did this using file browser, as Eebuntu has a file extractor pre-loaded. I extracted the file to the desktop (I only need it temporarily)

Now is the clever bit. Some command line instructions were required. I didn't have to, since it was already installed, but it would be worth checking if build-essential has been installed. It is required to do the compiling.

Credit for this goes to this post at ubuntuforums


If you have that installed, open up a terminal and get ready to do some typing...

Ok before we can compile the driver we have to tailor the source code a little.

First thing to do is to navigate to the root of the source code file you have just extracted to. Mine was accessed with

cd /home/blair/Desktop/2009_0521_RT2860_Linux_STA_V2.1.2.0/os/linux/

The config.mk file needs a little editing, open it with

gedit config.mk

Once open look for these lines and change the parameters to what is shown. (change =n to =y)

#ifdef WPA_SUPPLICANT_SUPPORT
# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y
#endif // WPA_SUPPLICANT_SUPPORT //

#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
# Support Native WpaSupplicant for Network Maganger
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //


Save the file and exit.

Next go back to the root of your source folder
cd /home/blair/Desktop/2009_0521_RT2860_Linux_STA_V2.1.2.0
And then run the make command to compile the driver.
sudo make && sudo make install
This will take a few minutes to work. Looking at the instructions to build the driver that came packaged with it they suggested some other changes to the makefile but it turned out that these were not necessary for me. Once built and installed there are a couple of more things to do.

First to set up the driver to autostart with your PC open this file
sudo gedit /etc/init.d/rt2860up
And paste this into the empty file
#!/bin/sh
sudo ifconfig ra0 up

Save this and next navigate to the /etc/init.d directory and change rt2860up into an executable.
cd /etc/init.d
sudo chmod +x rt2860up

Next create a link like so
sudo ln -s /etc/init.d/rt2860up /etc/rcS.d/S33rt2860up
Now I am going to tell you what I did next, but I am not 100% sure if this necessary. I ended up doing this partly because I was following instructions that probably related to an older driver. The instructions said that a file RT2860STA.dat should be removed from the folder /etc/Wireless/TR2860STA folder. However after I did this and restarted the wireless on my machine was unavailable. I replaced the file with one that I found in the driver package and all was well... The instructions
sudo rm /etc/Wireless/RT2860STA/RT2860STA.dat
And then
sudo mv home/blair/Desktop/2009_0521_RT2860_Linux_STA_V2.1.2.0/RT2860STA.dat /etc/Wireless/RT2860STA/RT2860STA.dat

Finally edit the /etc/network/interfaces file so that it reads...

auto lo
iface lo inet loopback

Restarting my machine, the wireless detected in network manager and all is well. Best of all, my EeePC901 will now connect to my wireless N connection correctly.

The wireless card is getting a very health 121Mb/s - 135Mb/s depending where I am in the house. This is comparable to my girlfriends PC which is running windows Operation is a success.

I am feeling a bit better about Linux personally, even a bit chuffed with myself.

However to put myself in the shoes of an average windows user. This level of configuration is just beyond most people used to plug in and play type systems. I really think that Linux has to move beyond this need to compile if it is going to be accessible to entry level users.

I had an email suggesting that I should not blame Linux for this (and thanks for mailing me) and that the last line of my previous post should read:

"Today, I am feeling fed up with hardware companies NOT providing drivers for Linux."
But putting myself in the position of the hardware companies, there are many different variations to be catered for used by a demographic that whilst is a large group of people, is still a small proportion of the overall market. I can see why they don't rush to create compiled drivers.

That leaves the task up to those compiling distributions to sort out. I can see what a task this must be to keep things up to date.

Hopefully this guide will be of use to those who have hit the same issues that I have.
Share Link:
Google Yahoo MyWeb Del.icio.us Digg Facebook Myspace Reddit Ma.gnolia Technorati Stumble Upon
Last Updated on Friday, 26 June 2009 19:05  
Discuss (3 posts)
Re:Updating the RT8260 802.11N Wireless Network Driver from Source
Jul 04 2009 00:16:34
Compiling stuff on your own system has advantages too - you can distribute code to platforms you don't even know, and the person wanting to run your code on this platform just needs to compile it with an appropriate compiler and presto a working version specific to his platform. Without any need to worry about compatibility issues and stuff.
#130
Re:Updating the RT8260 802.11N Wireless Network Driver from Source
Jul 04 2009 06:11:35
Also, for compatibility reasons, the "stock" binary is optimized for the i586 (Pentium I) architecture, or sometimes even the i386 architecture. By compiling and having it optimize for the i686 (Pentium Pro or later) architecture, as well as enabling things like SSE and 3DNow, you get a binary which might not work on someone else's computer, but it will run a lot faster.

That's the theory, anyway. In practice, the performance boost is relatively minor, and it's only worth the trouble when the code has to be very, very fast (i.e. games and the kernel itself.)
#131
Re:Updating the RT8260 802.11N Wireless Network Driver from Source
Jul 06 2009 21:10:24
I just wanted to thank you for the post! I've been struggling with this issue and patiently waiting for a resolution since I first purchased my Asus Eee PC 1000 several months ago.

I converted to Eeebuntu NBR 2.0 and WICD and have never had a problem using WPA2-PSK on my home net. However I've never been able to get a 802.11n connection either. I really felt, based on everything I'd read, that the issue was driver related and that I just needed to wait for a good solution to surface. It did.

After backing everything up I followed the instructions on your link this morning and I had a fast and rock solid 802.11n connection with WPA2-PSK.

It looks as though Ralink has, with v2.1.2.0, corrected the 802.11n issue and if the proper WPA_SUPPLICANT mods are made to the config.mk file then both the issues are resolved.

Cheers! And many thanks!
#132

Discuss this item on the forums. (3 posts)

JoomlaWatch Stats 1.2.8b_10-dev by Matej Koval Technorati Profile