Setting up RT61 or RT2500 Wireless Cards
From SUSE Wiki
Type: Howto
Tested Versions: 10.0, 10.1, 10.2
Written By: Kamatsu
Further Modifications By: [Dieter Jurzitza]
Note: Newer versions of SUSE have a NetworkManager applet. We highly recommend you do not use this applet for Ralink cards as it has not been successfully tested yet.
Note: This article refers to the usage of the Ralink drivers called rt2500 and rt61. Do not use them with a SMP kernel nor use them with a kernel having PREEMT enabled, as it has been reported to cause issues. rt2500 seems to be stable with SMP, both rt61 and rt2400 (untested) are subject to stability issues on SMP. The official RT61 drivers from Ralink are reported to work properly with SMP Kernels.
Installation
What chip resides on my card?
After safely seating your card into a free slot of your PC, boot into linux. Open a xterm or a console and call:
$ /sbin/lspci -v | less
Given you have a card that needs the rt61 driver, you should see something like:
00:0b.0 Network controller: RaLink RT2561/RT61 802.11g PCI
Subsystem: RaLink Unknown device 2561
Flags: bus master, slow devsel, latency 32, IRQ 5
Memory at d1000000 (32-bit, non-prefetchable) [size=32K]
Capabilities: <access denied>
If it is a card that needs the rt2500 driver, you should see something like:
00:0a.0 Network controller: RaLink RT2500 802.11g Cardbus/mini-PCI (rev 01)
Subsystem: RaLink Unknown device 2560
Flags: bus master, slow devsel, latency 32, IRQ 9
Memory at d1800000 (32-bit, non-prefetchable) [size=8K]
Capabilities: <access denied>
The most important information is buried in the RaLink RT2561/RT61 and the RaLink RT2500, correspondingly. The setup for both types of cards is very similar, however, will be treated seperately for the sake of simplicity.
Initial Compilation
Note: You will need the following packages from YaST installed:
- wireless-tools
- gcc
- kernel-sources for your kernel
- make
- patch
For RT61 cards
First, download the latest version of the RT61 Linux Drivers Here (http://rt2x00.serialmonkey.com, the old page http://www.ralinktech.com/supp-1.htm vanished and has been moved to http://web.ralinktech.com/ralink/Home/Support/Linux.html). 64-Bit (x86_64) users and users that have difficulties with those drivers may wish to try the cvs build (rt61-cvs-daily.tar.gz) from http://rt2x00.serialmonkey.net. There have been reports of this working with these instructions.
Note to SUSE 10.2 Users: Remove the wlan-kmp-default (or other wlan-kmp) package before installing these drivers. They clash otherwise.
Then, fire up your favorite console app (e.g xterm or konsole) do the following:
$su
Assuming we are in the directory that the driver .tar.gz was in, (I used ~ for convenience). Your filenames may differ, depending on the driver version.
#tar zxvf rt61-cvs-daily.tar.gz #cd rt61-cvs-2007011312 #cd Module #make
Wait a short while as the module is compiled. If you encouter errors, you probably do not have the development packages you need. Some warnings should be expected and are harmless. The module is called rt61.ko. If you are being told something like:
Building modules, stage 2. MODPOST CC /home/fred/work/rt61-cvs-2007011312/Module/rt61.mod.o LD [M] /home/fred/work/rt61-cvs-2007011312/Module/rt61.ko make[1]: Leaving directory `/usr/src/linux-2.6.18.2-34-obj/i386/default'
everything should be fine and you finally have to type
#make install
The RT61 cards come with a configuration file (rt61sta.dat) and binary only files that are mandatory to make the card work. They are searched for in the directory /etc/Wireless/RT61STA. Thus, we have to move them there as final step.
#dos2unix rt61sta.dat #mkdir -p /etc/Wireless/RT61STA #cp *.bin /etc/Wireless/RT61STA #cp rt61sta.dat /etc/Wireless/RT61STA
Now we are set to proceed with the configuration.
For RT2500 cards
Basically the same procedure is required for the rt2500 driver. Download the latest version from http://rt2x00.serialmonkey.com and perform the following steps:
#tar zxvf rt2500-cvs-daily.tar.gz #cd rt2500-cvs-2007010814 #cd Module #make
Wait a short while as the module is compiled. If you encouter errors, you probably do not have the development packages you need. Some warnings should be expected and are harmless. The module is called rt2500.ko in this case. You should see messages like
Building modules, stage 2. MODPOST CC /home/fred/work/rt2500-cvs-2007010814/Module/rt2500.mod.o LD [M] /home/fred/work/rt2500-cvs-2007010814/Module/rt2500.ko make[1]: Leaving directory `/usr/src/linux-2.6.18.2-34-obj/i386/default'
at the very end. Then you finally type
#make install
The RT2500 cards come with a configuration file (rt2500sta.dat) only, there are no binary drivers neccessary. It is searched for in the directory /etc/Wireless/RT2500STA. Thus, we have to move it there as final step.
#dos2unix rt2500sta.dat #mkdir -p /etc/Wireless/RT2500STA #cp rt2500sta.dat /etc/Wireless/RT2500STA
Same as above. We are set to proceed with the configuration of the module.
Installation and initial Configuration
There are two possibilities to configure the modules. The most simple one is to use YaST2 for all steps.
Note: If you are using WEP or WPA-PSK Encryption, please see the corresponding sections on using WEP / WPA-PSK, in the meantime, we strongly suggest disabling WEP or WPA-PSK on your access point until you can get a connection going.
Note: If you follow the steps in the "Configuration via YaST2" section, do NOT follow the steps in the "Manual Configuration" section. If the YaST2 steps do not work for you, then you may wish to try manual configuration.
Configuration via YaST2
After the module has been compiled and installed, it is residing in the appropriate module directory. It is time for a reboot now to allow hwdetect to find out about the presence of your card and that the module is usable.
It is a good idea to configure your accesspoint in a first step to no encryption and no access lists to make sure that your card can attach to it.
Start YaST (entering your administrator password), and go to "Network Devices", then "Network cards". Make sure you use the "traditional method using ifup" approach rather than NetworkManager, which tends not to work.
The system should automatically detect your new network card now. In the overview screen you should see the display:
RaLink RT2561/RT61 802.11g <bus type> - not configured
if you use a RT61 card or
Ralink RT2500 802g <bus type> - not configured
in case you use a RT2500 card.
You should mark the appropriate name and say "add". In the "add" menu you can choose whether you want to get the IP via dhcp or you want to assign a fixed IP-address. Most of the access points are configured to use dhcp initially, so it is a good idea to start with this.
Note for RT61 Users: The RT61 card may be shown as an ethernet card, not as wireless card. If you experience this, you should change the setting to wireless.
If you proceed now, the mode of operation (generally managed), the ESSID (should match the one of your access point. Watch uppercase / lowercase) and the type of encryption (no encryption for the first step) should be configured.
If you confirm these settings and accept the warning that no encryption is risky, you are done and you can leave YaST2 for now, or move on to set up encryption.
Configuring WEP
Start YaST2, open up the "Network Devices" panel, and click "Network Card". Then, skipping the first screen (for 10.1 and 10.2), choose to edit your RaLink card from the list (RT61 or RT2500).
Click "Next", then "WEP Keys". Choose the length of the key (defaults to 128) from the dropdown box, then press "Edit" and type the key you have determined from your router or access point. Ensure that WEP is enabled on your access point before you do this.
Press "Next", and finish your YaST2 session. Upon saving settings, YaST2 should re-negotiate the connection with the access point with your new WEP key.
Configuring WPA-PSK
Firstly, make sure that WPA-PSK is enabled at your access point.
This next step requires you to patch one sysconfig file. This seems risky, however, your work will be much easier in the end. After doing this, you can configure everything via YaST2. Again, both RT2500 and RT61 drivers behave similarly here, so after patching sysconfig, you can configure both cards simply through the graphical YaST2 interface. This description is valid for SuSE 10.1 and SuSE 10.2, but is not tested on 10.0
Let's go now. First, you have to move to the place where the file we have to modify resides and make a copy for safety reasons (we have to be superuser to do this!):
# su Enter Password: <Type Root Password> # cd /etc/sysconfig/network/scripts # cp -p ifup-wireless ifup-wireless.original
Now, whatever is going to happen, you are on the safe side, as you have a backup.
Note: The patch would vanish in case there was an update of sysconfig from SUSE. Then you should patch again to get things going.
The file we are patching is responsible for bringing up the network for wireless cards.
Open up your favorite editor (as root) by typing in the same console (replacing gedit with kate, vi or emacs depending on what you use):
# gedit mypatch
In it, copy the following contents:
--- ifup-wireless.original 2006-10-27 15:32:54.000000000 +0200
+++ ifup-wireless 2007-01-21 23:21:03.000000000 +0100
@@ -630,9 +630,20 @@
else
SUPPARGS="-P/var/run/wpa_supplicant/${INTERFACE}.pid -B"
fi
- mkdir -p /var/run/wpa_supplicant
- message "`printf " %-9s starting wpa_supplicant" $INTERFACE`"
- eval wpa_supplicant -i$INTERFACE -c$WPA_SUPP_CONF -D$WPA_DRIVER $SUPPARGS
+ if [ "$WPA_DRIVER" = "iwpriv" ]; then
+ i=0
+ while [ "$i" != "2" ]; do
+ run_iw_tool priv set AuthMode=WPAPSK
+ run_iw_tool priv set EncrypType=TKIP
+ run_iw_tool priv set WPAPSK="${WIRELESS_WPA_PSK}"
+ run_iw_tool config essid ${WIRELESS_ESSID}
+ i=`expr $i + 1`
+ done
+ else
+ mkdir -p /var/run/wpa_supplicant
+ message "`printf " %-9s starting wpa_supplicant" $INTERFACE`"
+ eval wpa_supplicant -i$INTERFACE -c$WPA_SUPP_CONF -D$WPA_DRIVER $SUPPARGS
+ fi
}
kill_wpa_supplicant()
@@ -682,6 +693,12 @@
ndiswrapper|*.sys)
WPA_DRIVER=wext
;;
+ rt2500)
+ WPA_DRIVER=iwpriv
+ ;;
+ rt61)
+ WPA_DRIVER=iwpriv
+ ;;
*)
WPA_DRIVER=unsupported
PREFER_WPA_SUPPLICANT=no
Save the file.
Vi users may need to force write, so use :w! to save the file.
Now we have a patch and can apply it. This is one single command:
# patch -p0 < mypatch # patching file ifup-wireless
We are ready to go now.
Start YaST (entering your administrator password), and go to "Network Devices", then "Network cards". Make sure you use the "traditional method using ifup" approach rather than NetworkManager, which tends not to work.
Select your network card (see above - RT61 or RT2500) and click on Edit. On the first page there is nothing to do, but if you proceed to the next one, there you should change the mode of authentication from "Open", our initial setting, to "WPA-PSK" now.
One thing should be noted here. For some reason I do not know the WPA-PSK option is not displayed every time. If you open the encryption type dialog and you see "Common Key" (WEP) or "Open" only, then you should select "Common Key" for the moment, enter whatever key, save it, exit YaST2 and restart this part of the configuration once again. For some strange reason YaST2 is not behaving consistent in this regard. Usually the option dialog including WPA-PSK appears the second time you try to set it, however, this is an experience based statement only.
Testing your setup
After performing the steps as described before, it is a good idea to start a console and / or an xterm and test what the wireless tester called "iwconfig" tells about the status of your network.
Type the following:
$ /usr/sbin/iwconfig
and you should see something like:
lo no wireless extensions.
ra0 RT61 Wireless ESSID:"djlinux"
Mode:Managed Frequency:2.462 GHz Access Point: 00:14:6C:24:CC:F2
Bit Rate=54 Mb/s
RTS thr:off Fragment thr:off
Link Quality=89/100 Signal level:-49 dBm Noise level:-79 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
eth0 no wireless extensions.
sit0 no wireless extensions.
The network is displayed, in this case ra0 is the wireless device with a RA61 chip. The ESSID shows and you see the address of the Access Point, in this case 00:14:6C:24:CC:F2. Another command to verify your settings is:
$ /sbin/ifconfig
Telling you something about the IP-configuration:
ra0 Protocol:Ethernet Hardware Address 00:0E:2E:B0:C1:9B
inet Address:172.16.41.6 Bcast:172.16.41.255 Mask:255.255.255.0
inet6 Address: fe80::20e:2eff:feb0:c19b/64 Access Point: <Access Point>
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7858 errors:0 dropped:0 overruns:0 frame:0
TX packets:1778 errors:0 dropped:0 overruns:0 carrier:0
collisions:42 Strength:1000
RX bytes:1770217 (1.6 Mb) TX bytes:579466 (565.8 Kb)
Interrupt:5
The output of ifconfig gives information about all network interfaces you have, however, to keep things smaller, I restricted the example to ra0 here.
Manual configuration
Initial Configuration
For RT61 Cards
You can edit /etc/Wireless/RT61STA/rt61sta.dat prior to or after installation. For example, if you would want to set the ESSID globally in the modules' config file, you would perform the following steps:
Type:
#cd /etc/Wireless/RT61STA #vi -b rt61sta.dat
Using vi, edit the settings:
- ESSID: The name of your access point
Once it is configured (you may have to learn your way around vi a little) type:
:w! :q
to exit vi.
If you discover the need that more parameters should go into the *.dat - files, you are free to do so. The README gives you detailed information on how to do this.
For RT2500 cards
You can edit /etc/Wireless/RT2500STA/rt2500sta.dat prior to or after the installation. For example, if you would want to set the ESSID globally in the modules' config file, you would perform the following steps:
Type:
#cd /etc/Wireless/RT2500STA #vi -b rt2500sta.dat
Using vi, edit the settings:
- ESSID: The name of your access point
Once it is configured (you may have to learn your way around vi a little) type:
:w! :q
to exit vi.
If you discover the need that more parameters should go into the *.dat - files, you are free to do so. The README gives you detailed information on how to do this.
Testing Manual Configuration
RA61 cards
You can test if it’s all working now by going:
#insmod rt61.ko #ifconfig ra0 inet up #dhcpcd ra0 #ping www.susewiki.org
Or, if you are not using DHCP, omit the last line and specify the IP in ifconfig.
RA2500 cards
Very similar as before:
#insmod rt2500.ko #ifconfig ra0 inet up #dhcpcd ra0 #ping www.susewiki.org
With regard to DHCP, the same rules as above apply.
Hopefully it will be all working properly (see bottom of this article if it isn’t), so now we can move on to making it load at startup.
Note: Many users have reported problems using WEP encryption. There is a short article at the bottom of the page on how to get around issues like this, but we recommend disabling encryption temporarily to start, and then trying later to get encryption going.
Loading on Startup
RA61 Cards
Now, if you did the test earlier, type this:
#ifconfig ra0 down #rmmod rt61
Otherwise go straight on to editing /etc/modprobe.conf.local using your favorite editor, and at the very bottom add the line:
alias ra0 rt61
Then, type:
#depmod -a #modprobe rt61 #depmod -a
If no errors were returned there, that means the module has been properly installed into modprobe.
Now, to make it configure our connection at startup. Create a file called ifcfg-ra0 in /etc/sysconfig/network (you will have to be root)
In it, type:
DEVICE='ra0' ONBOOT='yes' BOOTPROTO='dhcp' STARTMODE='auto'
Assuming you are using DHCP, if not, remove that bootproto line.
Then, open YaST, and open the /etc/sysconfig editor under “System”. Go to System->Kernel->MODULES_LOADED_ON_BOOT, and in the setting, type “rt61″. Then save the setting and exit YaST.
And your card is now set up! Reboot and it should all be working perfectly!
RA2500 Cards
As discussed in the RA61 section, type this:
#ifconfig ra0 down #rmmod rt2500
Otherwise go straight on to editing /etc/modprobe.conf.local using your favorite editor, and at the very bottom add the line:
alias ra0 rt2500
Then, type:
#depmod -a #modprobe rt2500 #depmod -a
If no errors were returned there, that means the module has been properly installed into modprobe.
Now, to make it configure our connection at startup. Create a file called ifcfg-ra0 in /etc/sysconfig/network (you will have to be root)
In it, type:
DEVICE='ra0' ONBOOT='yes' BOOTPROTO='dhcp' STARTMODE='auto'
Assuming you are using DHCP, if not, remove that bootproto line.
Then, open YaST, and open the /etc/sysconfig editor under “System”. Go to System->Kernel->MODULES_LOADED_ON_BOOT, and in the setting, type “rt2500″. Then save the setting and exit YaST.
All of these steps are basically identical to those under the RT61 section, exept that the module name has changed to rt2500.ko. Please note that you should not mix up this manual configuration scheme with the YaST2 configuration. Many things described here in the "manual" section are done automatically for you if you use YaST2 for the configuration.
Using WEP Encryption
Initial Connection
RA61 Cards
If you edit the .dat file with anything other than OPEN and NO encryption the network is not detected.
For some reason iwpriv can change the settings fine, so do the following to establish connection:
- Turn off encryption on the router.
- Load the module by typing this into a console window:
$ su Password: <enter root password> # modprobe rt61
- Bring up the interface by typing this:
# ifconfig ra0 inet up
- Then type the following as per iwpriv_usage.txt:
# iwpriv ra0 set NetworkType=Infra # iwpriv ra0 set AuthMode=SHARED # iwpriv ra0 set EncrypType=WEP # iwpriv ra0 set DefaultKeyID=1 # iwpriv ra0 set Key1="KEY" # iwpriv ra0 set SSID="MY_SSID"
- Where MY_SSID is the name of your access point, and KEY is the WEP encryption key.
- The card then breaks its connection to the Router/Network.
- Turn on encryption on the router. The card should reconnect.
- Then type (if you use dhcp):
# dhcpcd ra0
And everything should then work. If it does, then proceed to the next section.
RA2500 Cards
This section again only differs from the section above through the different module name. If you edit the .dat file with anything other than OPEN and NO encryption the network is not detected.
For some reason iwpriv can change the settings fine, so do the following to establish connection:
- Turn off encryption on the router.
- Load the module by typing this into a console window:
$ su Password: <enter root password> # modprobe rt2500
- Bring up the interface by typing this:
# ifconfig ra0 inet up
- Then type the following as per iwpriv_usage.txt:
# iwpriv ra0 set NetworkType=Infra # iwpriv ra0 set AuthMode=SHARED # iwpriv ra0 set EncrypType=WEP # iwpriv ra0 set DefaultKeyID=1 # iwpriv ra0 set Key1="KEY" # iwpriv ra0 set SSID="MY_SSID"
- Where MY_SSID is the name of your access point, and KEY is the WEP encryption key.
- The card then breaks its connection to the Router/Network.
- Turn on encryption on the router. The card should reconnect.
- Then type (if you use dhcp):
# dhcpcd ra0
And everything should then work. If it does, then proceed to the next section.
Configuring WEP on startup
RT61 Cards
Note: There is a wireless scanner and graphical configuration utility for easy setup of RT61 based cards at http://sourceforge.net/projects/ra0dar. This may be used to achieve WEP, and may be more useful if you use many access points. However it is still beta and largely untested. Once it has reached a mature enough state this article will be updated.
Heres how to make these settings stick on startup.
Open up your favorite editor (KWrite, gedit or emacs). In it, type:
#! /bin/bash # Wireless Boot Script echo Setting wireless priv ifconfig ra0 inet up iwpriv ra0 set NetworkType=Infra iwpriv ra0 set AuthMode=SHARED iwpriv ra0 set EncrypType=WEP iwpriv ra0 set DefaultKeyID=1 iwpriv ra0 set Key1=<your key> iwpriv ra0 set SSID=<your ssid> ifup-dhcp ra0
Omit the last line if you don't use DHCP of course, and specify the IP in ifconfig. Save it as "ifup-ra0" in your home folder. Then open up a console (xterm, konsole or rxvt) and type in it:
$ cd ~ $ su Password: <enter root password> # chmod 777 ifup-ra0 # cp ifup-ra0 /etc/sysconfig/network/scripts
Then, as root, edit the ifcfg-ra0 file as shown:
# gedit /etc/sysconfig/network/ifcfg-ra0 <assuming you use gedit>
Then, simply change the file to look like this:
DEVICE='ra0' ONBOOT='yes' BOOTPROTO='dhcp' STARTMODE='auto' PRE_UP_SCRIPT='ifup-ra0'
Save it, and reboot, and all should work perfectly!
RT2500 Cards
Basically the same calls as above. Open up your favorite editor (KWrite, gedit or emacs). In it, type:
#! /bin/bash # Wireless Boot Script echo Setting wireless priv ifconfig ra0 inet up iwpriv ra0 set NetworkType=Infra iwpriv ra0 set AuthMode=SHARED iwpriv ra0 set EncrypType=WEP iwpriv ra0 set DefaultKeyID=1 iwpriv ra0 set Key1=<your key> iwpriv ra0 set SSID=<your ssid> ifup-dhcp ra0
Omit the last line if you don't use DHCP of course, and specify the IP in ifconfig. Save it as "ifup-ra0" in your home folder. Then open up a console (xterm, konsole or rxvt) and type in it:
$ cd ~ $ su Password: <enter root password> # chmod 777 ifup-ra0 # cp ifup-ra0 /etc/sysconfig/network/scripts
Then, as root, edit the ifcfg-ra0 file as shown:
# gedit /etc/sysconfig/network/ifcfg-ra0 <assuming you use gedit>
Then, simply change the file to look like this:
DEVICE='ra0' ONBOOT='yes' BOOTPROTO='dhcp' STARTMODE='auto' PRE_UP_SCRIPT='ifup-ra0'
Save it, and reboot, and all should work perfectly!
Troubleshooting
The driver compiles fine, but I get a whole pile of warnings
That is normal. These drivers are very badly coded, so expect those sorts of warnings, provided the driver compiles OK.
I get kernel panics (lockups) as soon as I insmod rt61.ko
The RT61 drivers are still beta, and still have some issues, at the moment the best advice I can offer you is to disable some advanced kernel features. Try loading SuSE in failsafe (perhaps change the “3″ to a “5″ if you want a GUI in the boot options) and see if it still happens. Otherwise, post at the ralink forums (Here (http://61.222.76.235/))
I get general system instability after installing these drivers
Try loading linux with the option
acpi=off
using grub. If this does not fix the issue, try loading linux in failsafe, and through a process of elimination work out what boot options you’ll need to start Linux on for it to be stable.
I get errors like "no IPv6 routers present", "SET failed on device wlan0 ; Operation not supported.", or "ra0: cannot create symlink to default key" on rt2500 cards
If you're using OpenSuse 10.2, and have compiled your own driver, you may be unable to get an IP from dhcp, and see above errors as symptoms. Try to use the 10.2 driver from packman: ftp://packman.links2linux.de/pub/packman/testing/rt2500/10.2/
This driver resolved the above issues for me.
I followed all the instructions, but my card isn't working on startup
If you use the manual configuration steps as described above, you will not entirely circumvent some structures that are happening on boot time. There is a bug in sysconfig causing the device ID for the rt61 (at last) driven cards to be increased at every boot. To find out whether you are suffering from this, please try the following:
Open up a console (e.g xterm) and type:
$ dmesg | grep "ra. renamed to ra."
If it returns a line like this:
ra0 renamed to ra1
or
ra1 renamed to ra2
Then your ralink device number is being automatically renamed to an increasing number each boot. Fortunately the solution isn't too difficult.
Edit /etc/sysconfig/network/config and change the entry FORCE_PERSISTENT_NAMES to "no". Moreover, you should edit the file /etc/udev/rules.d/30-net_persistent_names.rules and make sure that there is only one single entry for your ralink card, looking i. e. like this:
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:0e:2e:b0:c1:9b", IMPORT="/lib/udev/rename_netiface %k ra0"
Duplicate entries will have the same SYSFS{address} entry but will have increasing numbers at the end of the line: ra1, ra2, ra3 ...
If you do not follow the suggestion above, this file will contain another line of code at each new boot. This solution has been tested on SuSE 10.2, may differ slightly on previous SuSE releases.
I have another problem, how can I fix it?
Try the Ralink Support Forums.

