Ralink RT2860 Linux driver

Hello everyone!

Originally I had a problem with using ndiswrapper to install Windows driver on Netgear WN511TA wireless adapter card. Problem solved by replacing Netgear WN511TA with Airlink101 AWLC6080 PCMCIA wireless adapter to work in my triple-boot XP Pro/Ubuntu Karmic/openSUSE 11.2 Toshiba laptop and using the latest Linux driver version 2.3.0.0 dated January 29, 2010 from Ralinktech site. I followed driver instruction in a Ubuntuforums tutorial (Howto: Ralink RT2860(m) PCI(e) RT2860…on Intrepid).

I am wondering if I can use the same Linux driver (RT2860sta) for openSUSE 11.2 on my triple-boot XP Pro/Karmic/openSUSE laptop, ie. copying over instead of building and compiling driver from source again, because I don’t quite understand the build instruction given in the README file of Ralink’s Linux driver file. Specifically, I don’t know how to “define the GCC and LD (?) of the target machine, and define the compiler flags CFLAGS(?), modify your need (?)”, etc. I already have gcc, cpp and make installed on the Ubuntu and openSUSE parts of my machine.

I did try ndiswrapper in openSUSE but it doesn’t work for the Windows version of the latest Ralink driver (error: invalid driver rt2860.inf).

Look forward to your help and suggestions, and thanks in advance.

Hello again everyone,
First, a correction:

Actually ndiswrapper did not work with Windows version of the latest Airlink101 AWLC6080 card (invalid rt2860.inf driver). Ndiswrapper also doesn’t work with Windows version of the latest Ralink driver because there’s no INF file.

I suspect that the reason it was easy to install Linux driver on Karmic Ubuntu is Karmic’s latest kernel already has a pre-compiled version of Linux driver. Via YAST > Software Management I saw a file name RT2860 installed (userspace config file for RT2860 driver).

  1. Is this “userspace config file” RT2860 included in the kernel 2.6.31.9-0.1-default for the purpose of being a “staging driver” as in the case of Karmic Ubuntu?

  2. If so, do I really have to modify the Makefile file in README’s Build Instructions?

  3. If yes, how do I change the lines e.g. LINUX_SRC and CROSS_COMPILE, et cetera so that Ralink’s tool uses gcc and cpp in order to build the driver?

  4. It was suggested in some forums that a temporary work-around is to “downgrade” to an older kernel version. How should I do this in OpenSUSE 11.2?

Look forward to your help and suggestions, and thanks in advance.

On 02/03/2010 09:36 PM, taytong888 wrote:
>
> Hello again everyone,
> First, a correction:
>
> taytong888;2114016 Wrote:
>>
>>
>> I did try ndiswrapper in openSUSE but it doesn’t work for the Windows
>> version of the latest Ralink driver (error: invalid driver rt2860.inf).
>>
> Actually ndiswrapper did not work with Windows version of the latest
> Airlink101 AWLC6080 card (invalid rt2860.inf driver). Ndiswrapper also
> doesn’t work with Windows version of the latest Ralink driver because
> there’s no INF file.
>
> I suspect that the reason it was easy to install Linux driver on Karmic
> Ubuntu is Karmic’s latest kernel already has a pre-compiled version of
> Linux driver. Via YAST > Software Management I saw a file name RT2860
> installed (userspace config file for RT2860 driver).
>
> 1. Is this “userspace config file” RT2860 included in the kernel
> 2.6.31.9-0.1-default for the purpose of being a “staging driver” as in
> the case of Karmic Ubuntu?

Yes.

> 2. If so, do I really have to modify the Makefile file in README’s
> Build Instructions?

No.

> 3. If yes, how do I change the lines e.g. LINUX_SRC and CROSS_COMPILE,
> et cetera so that Ralink’s tool uses gcc and cpp in order to build the
> driver?
>
> 4. It was suggested in some forums that a temporary work-around is to
> “downgrade” to an older kernel version. How should I do this in
> OpenSUSE 11.2?

In the repos, you will find a variety of kernel. Choose the one you want;
however, the only reason to downgrade would be that 2.6.31.8 crashes when
attempting to correct with the rt2860 or rt2870. That should not apply for .9.

Hello iwfinger,

Thanks for your quick reply.

In my question #1, I actually meant 2.6.31.8, not .9. In terms of your answer to my question #2, I remember that in Ubuntu I only had to answer Y to “HAS_WPA_SUPPLICANT” and “HAS_NATIVE_WPA_SUPPLICANT_SUPPORT”, and “sudo MAKE, sudo MAKE INSTALL” etc. This being said, in SUSE how do I install the kernel source package so that the MAKE command use it to compile the driver file? From Ralink’s build instruction Item 2: “define the linux kernel source include file path LINUX_SRC”. In other words, how do I find the path to the kernel source?

Thanks again for your help.

On 02/03/2010 11:46 PM, taytong888 wrote:
>
> Hello iwfinger,
>
> Thanks for your quick reply.
>
> In my question #1, I actually meant 2.6.31.8, not .9. In terms of your
> answer to my question #2, I remember that in Ubuntu I only had to answer
> Y to “HAS_WPA_SUPPLICANT” and “HAS_NATIVE_WPA_SUPPLICANT_SUPPORT”, and
> “sudo MAKE, sudo MAKE INSTALL” etc. This being said, in SUSE how do I
> install the kernel source package so that the MAKE command use it to
> compile the driver file? From Ralink’s build instruction Item 2:
> “define the linux kernel source include file path LINUX_SRC”. In other
> words, how do I find the path to the kernel source?

I would not mess around with Ralink’s source. The version in staging is better
as it has been “adjusted” by the kernel experts.

In general, to build a kernel module, you need the kernel header package from
the repository, as well as make and gcc. Installing the headers sets up the path
to the kernel sources.

To build a new kernel from scratch, you need to go to http://kernel.org and
download the source. After downloading, you need to unpack it with

tar jxvf linux-2.6.XXXXXX

The X’s stand for the version. After the unpack is done, do the following:

cd linux-2.6.XXXXX
cp /proc/config.gz config.gz
gunzip config.gz
cp config .config
make
sudo make modules_install install

This process will build a kernel using the same set of options that are being
used in the running kernel. The make step will ask you questions for the options
added since your kernel. In general, the default answer will be adequate, but
you can use your discretion. If you have multiple CPUs, the time for the build
step can be reduced by adding a -jY option to the make step where Y is the
number of CPUs + 1. The build process is done as your normal, unprivileged user.
Do NOT do this as root! The last step will copy the files to the locations
needed for booting, and add the new kernel to the GRUB menu.

Once the kernel is booting correctly, you can reduce the build time by
eliminating things that are not needed from the configuration. The command ‘make
xconfig’ is a handy way to do that.

Hello Iwfinger,

I just tried installing the Linux driver by issuing just 2 commands “make” and “make install” but got a bunch of errors.

  1. Previously the folder /etc/Wireless/RT2860 was blank (by default) but I had made a mistake of editing the file RT2860.dat (to include SSID and encryption, etc) then copied it to this blank RT2860 directory. Now, one of the error messages says to the effect the driver file (?) cannot be installed in this directory because “(another) file exist”. So, how can I go to the same directory to delete the .DAT file, because now even as root I got “permission denied”!

  2. Here’s the whole output of the terminal, could you take a look?

linux-yhaa:/home/hoe/Builds/Ralink_Linux/2010_01_29_RT2860_Linux_STA_v2.3.0.0 # make
make -C tools
make[1]: Entering directory /home/hoe/Builds/Ralink_Linux/2010_01_29_RT2860_Linux_STA_v2.3.0.0/tools' gcc -g bin2h.c -o bin2h make[1]: Leaving directory /home/hoe/Builds/Ralink_Linux/2010_01_29_RT2860_Linux_STA_v2.3.0.0/tools’
/home/hoe/Builds/Ralink_Linux/2010_01_29_RT2860_Linux_STA_v2.3.0.0/tools/bin2h
cp -f os/linux/Makefile.6 /home/hoe/Builds/Ralink_Linux/2010_01_29_RT2860_Linux_STA_v2.3.0.0/os/linux/Makefile
make -C /lib/modules/2.6.31.8-0.1-default/build SUBDIRS=/home/hoe/Builds/Ralink_Linux/2010_01_29_RT2860_Linux_STA_v2.3.0.0/os/linux modules
make: *** /lib/modules/2.6.31.8-0.1-default/build: No such file or directory. Stop.
make: *** [LINUX] Error 2
linux-yhaa:/home/hoe/Builds/Ralink_Linux/2010_01_29_RT2860_Linux_STA_v2.3.0.0 # make install
make -C /home/hoe/Builds/Ralink_Linux/2010_01_29_RT2860_Linux_STA_v2.3.0.0/os/linux -f Makefile.6 install
mkdir: cannot create directory /etc/Wireless': File exists make[1]: Entering directory /home/hoe/Builds/Ralink_Linux/2010_01_29_RT2860_Linux_STA_v2.3.0.0/os/linux’
rm -rf /etc/Wireless/RT2860STA
mkdir /etc/Wireless/RT2860STA
cp /home/hoe/Builds/Ralink_Linux/2010_01_29_RT2860_Linux_STA_v2.3.0.0/RT2860STA.dat /etc/Wireless/RT2860STA/.
install -d /lib/modules/2.6.31.8-0.1-default/kernel/drivers/net/wireless/
install -m 644 -c rt2860sta.ko /lib/modules/2.6.31.8-0.1-default/kernel/drivers/net/wireless/
install: cannot stat rt2860sta.ko': No such file or directory make[1]: *** [install] Error 1 make[1]: Leaving directory /home/hoe/Builds/Ralink_Linux/2010_01_29_RT2860_Linux_STA_v2.3.0.0/os/linux’
make: *** [install] Error 2
linux-yhaa:/home/hoe/Builds/Ralink_Linux/2010_01_29_RT2860_Linux_STA_v2.3.0.0 #

Could you please help me sort this problem out and install the driver?
Thanks a lot for your help.

On 02/04/2010 10:16 PM, taytong888 wrote:
>
> Could you please help me sort this problem out and install the driver?
> Thanks a lot for your help.

I give you a set of instructions. You follow none of them, screw up your system,
and then expect me to help you sort it out. Why should I do that?

Perhaps I misunderstood your instructions, but nevertheless your type of language is not called for. This is not sending a positive message to newcomers to openSUSE.

I did read the SUSE wiki as well as another instruction from Gentoo’s wiki. They all do not mention going to the source package, all they say is to use MAKE and MAKE INSTALL. Perhaps I misunderstood the part you suggested about not messing with Ralink’s file.

On 02/05/2010 12:06 AM, taytong888 wrote:
>
> lwfinger;2115373 Wrote:
>>
>> I give you a set of instructions. You follow none of them, screw up
>> your system,
>> and then expect me to help you sort it out. Why should I do that?
>
> Perhaps I misunderstood your instructions, but nevertheless your type
> of language is not called for. This is not sending a positive message
> to newcomers to openSUSE.
>
> I did read the SUSE wiki as well as another instruction from Gentoo’s
> wiki. They all do not mention going to the source package, all they say
> is to use MAKE and MAKE INSTALL. Perhaps I misunderstood the part you
> suggested about not messing with Ralink’s file.

Yes you did. Using Ralink’s file would get you a driver that is inferior to the
one that you would get with the kernel source as I instructed you.

Should I coddle new users after you take the time to prepare complete cookbook
instructions, and they completely disregard them? I don’t think so!

i believe you are having the same problem I had. I fixed it the same way in ubuntu. lwfinger suggested I try one of the new unofficial kernels and it worked perfectly.

On 02/11/2010 08:06 PM, AFI420 wrote:
>
> i believe you are having the same problem I had. I fixed it the same way
> in ubuntu. lwfinger suggested I try one of the new unofficial kernels
> and it worked perfectly.

The newest version in the repos (2.6.31.12) should be OK with the RT2860.

Thank you Iwfinger and AFI420 for your reply.

Originally I misunderstand about rt2860. Now I know that since it’s a “native” or “staging” driver that was pre-compiled into the kernel in openSuse, I shouldn’t need to worry about compiling it; just have to use the driver directly. Having said this, I returned the Airlink101 wireless adapter last week because it couldn’t hold a steady connection in Windows. Since then, I finally was able to use ndiswrapper to install a Windows driver for Netgear WN-511TA adapter. The next step is to figure out how to set up the card for use with Gnome Network Manager. I am having problems with using wicd.

I decided to switch back to Network Manager because even as root I could not configure wireless interface;kept getting dbus error, also because YAST use Network Manager.

At first I was puzzled about still not getting wireless connection even though I entered SSID and WPA encryption,etc. Finally I entered gateway’s DNS and wlan0 in the Routing tab and was able to see both wired and wireless interfaces in NM.

On 02/12/2010 10:26 PM, taytong888 wrote:
>
> I decided to switch back to Network Manager because even as root I could
> not configure wireless interface;kept getting dbus error, also because
> YAST use Network Manager.
>
> At first I was puzzled about still not getting wireless connection even
> though I entered SSID and WPA encryption,etc. Finally I entered
> gateway’s DNS and wlan0 in the Routing tab and was able to see both
> wired and wireless interfaces in NM.

Make sure that your system is completely updated. Then use Manage Connections to
delete all your wireless connections and recreate them. That way the routing
table bug will be eliminated. There is a way to do it by merely editing the
connection, but I have tired of rewriting that long description. If you want to
use it, find it in this forum.

Hi Iwfinger,

Thanks for your recent advice. How do I access “Manage Connections”? I cannot find it anywhere. Do I need to run “wireless tools” in a terminal?

I really would like to know the answer, so that I can clear up the routing table and start anew if I run into trouble or switch wireless card. Another reason is I found Network Manager still makes it difficult for users. Once I enter ESSID, DNS, WPA/WPA Passphrase, etc. I should be able to have the wireless interface authenticated automatically.

Thanks a lot for your help.

On 02/13/2010 03:26 PM, taytong888 wrote:
>
> Hi Iwfinger,
>
> Thanks for your recent advice. How do I access “Manage Connections”? I
> cannot find it anywhere. Do I need to run “wireless tools” in a
> terminal?
>
> I really would like to know the answer, so that I can clear up the
> routing table and start anew if I run into trouble or switch wireless
> card. Another reason is I found Network Manager still makes it difficult
> for users. Once I enter ESSID, DNS, WPA/WPA Passphrase, etc. I should be
> able to have the wireless interface authenticated automatically.

If you activate NetworkManager and click on the NM applet, “Manage Connections”
will be right there.

If you do NM correctly, it will do just as you want.

Hi Iwfinger,

Prior to receiving your reply, I did a search on “manage connection” and read a number of threads in this sub-forum. I believe the feature you talk about only exist in KDE version of openSUSE whereas I am using GNOME. Unlike Ubuntu where it’s quite easy to set up a wired or wireless interface using Network Manager, it’s very cubersome and difficult to do the setup via YAST’s ifup because there’s no SAVE button to save the settings. Settings for one interface ends up in the other. For example wlan0 ends up being the device for wired connection. Another problem is sometimes wired connection shows 802.11x encryption window, not WPA/WPA2. Another example is when I follow the Help section’s suggestion to put device type = PCMCIA for the wireless adapter card, ie. to the right of kernel module “ndiswrapper” I got an error message asking me to check dmesg, and it turns out PCMCIA was not recognized. I spent most of tonight struggling with configuring the connections. Once I finish configuring each type of connection, I click OK, then wait until YAST finishes updating itself before switching over to NM so that I can check on the NM icon on the task bar.

Now the best I can get is wireless connection only. Based on advice in the threads, I got “automatic connection on startup” for wireless and “started automatically on cable connection”.

PS: missing phrase at the end: “start automatically on cable connection for wired connection

You are right that I gave the instructions for KDE, but the Gnome version of the
applet should be similar. NM is not an openSUSE product, thus what Ubuntu does
should be similar to openSUSE.

You should use ifup only if you have only a wired connection, your wireless
connection never changes location, or you do not run X on the machine. Otherwise
you should use NM.

Hi Iwfinger,

Could you show me a list of commands to manually configure both wired and wireless interfaces?

Thanks a lot for your help.