The D-Link AirPlusXtremeG DWL-G520 Wireless PCI card is an enhanced 802.11g high-performance, wireless card for desktop computers. It supports high-speed wireless networking of up to 108Mbps.

This card has open source GPL driver. Card comes with RT61 chipset from ralinktech. You need to compile this driver for Linux. Make sure you have gcc compiler installed.

My setup is as follows:

  • Linksys WRT54G Wireless router/802.11g access point at
  • ADSL Router at
  • My Laptop IP (obtained using WRT54G DHCP server)
  • My Desktop system (Static IP
  • Other devices (Mobile, PDA, XBOX 360 etc)
  • Debian Linux

Step #1: Verify your driver chipset with lspci command

$ lspci


0000:01:00.0 Network controller: RaLink RT2561/RT61 rev B 802.11

Use update-pciids command to fetch the current version of the pci.ids file from the primary distribution site and installs it.
# update-pciids
$ lspci

Step #2: Find out your kernel version ( I am using kernel v2.6)

# uname -r


Step #3: Download driver

Visit ralinktech site to download RT61 chipset driver.

# cd /opt
# wget

Step #4: Untar driver, type the following command

# tar -zxvf RT61_Linux_STA_Drv1.0.4.0.tar.gz
# cd RT61_Linux_STA_Drv1.0.4.0.tar.gz

Step #5: Compile driver source code

# cd Module
# cp Makefile.6 Makefile
# make

It will take some time to compile driver source code.

Step #6: Install driver

You need to copy firmware and configuration file to /etc/Wireless/RT61STA/ directory. First, create a directory:

# mkdir -p /etc/Wireless/RT61STA

Now copy binary firmware files:

# cp rt2561.bin /etc/Wireless/RT61STA/
# cp rt2561s.bin /etc/Wireless/RT61STA/
# cp rt2661.bin /etc/Wireless/RT61STA/

Now copy confiugration file:

# cp rt61sta.dat /etc/Wireless/RT61STA/rt61sta.dat
# dos2unix /etc/Wireless/RT61STA/rt61sta.dat

Now copy actual driver (rt61.ko) to your kernel directory:

# cp rt61.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless

Step #7: Configure card

Next logical step is to load the device driver. If you have Ethernet card disable to avoid problems:

# ifconfig eth0 down
# modprobe rt61

Once driver is loaded, you can activate interface called ra0. With ifconfig command:

# ifconfig ra0 up

To configure a wireless network interface you need to use iwconfig command. This command is part of wireless-tools package. If wireless-tools is not installed use apt-get or yum to install it:

# apt-get install wireless-tools

Now make sure you know the ssid / essid. If you have turned on encryption, you must use the same encryption type and key on both desktop system and the wireless router. You can obtain necessary settings using iwlist command:

# iwlist ra0 scanning


ra0       Scan completed :
           Cell 01 - Address: 00:12:39:6C:D6:8A
                    Encryption key:on

Step #1: Set SSID/ESSID

You need to set ssid/essid. My SSID is nixcraft. The SSID/ESSID is used to identify cells which are part of the same virtual (wireless) network:

# iwconfig ra0 essid nixcraft

Step #2: Set mode

You need to set the operating mode of the PCI card. Use Managed mode that node connects to a network composed of many Access Points (wireless router).

# iwconfig ra0 mode Managed

Step 3: Setup channel

Set the operating frequency or channel in the device.

# iwconfig ra0 channel 6

Step 4: Setup key

Used to manipulate encryption or scrambling keys and security mode (you can obtain security key by opening your web browser and type your routers IP address into address bar):

# iwconfig ra0 key 47b1122774d1xy55a1194lchjk6

You can now ping to wireless router or browser internet and rest of network (if connected).

Step #8: Configure rt61 driver auto-load at boot time

#1: Configure ra0 interface so that it can activated after reboot. Create a wlan.up and wlan.down helper scripts. Download these scripts and copy to /etc/Wireless directory.

#2: Make sure wireless kernel modules (rt61) to load at boot time. Open config file /etc/modules (this file contains the names of kernel modules that are to be loaded at boot time, one per line.):

# vi /etc/modules

Append rt61 module:


Close and save the file.

#3: Configure ra0 ip address:
Open /etc/network/interfaces file:

# vi /etc/network/interfaces

Make sure ra0 interface look like as follows (static IP configuration):

auto ra0
iface ra0 inet static
name Wireless LAN card
post-up /etc/Wireless/wlan.up
post-down /etc/Wireless/wlan.down

Save the file and reboot the system.

Furhter references

  • Official driver site
  • Please read iwconfig, ifconfig and networking related man pages.
  • Please read driver readme file for more information

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 121 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
121 comments… add one
  • swesleyd Jul 31, 2006 @ 16:41

    Dude! Thanks so much for a wonderful step by step walk-through this process. I am a idealisticly enthused but practically frustrated new linux (Ubuntu for now) user. I love the idea of it, but it is SO hard to learn anything; everyone assumes a certain level of expertise and thus skips steps or assumes understanding of verbage. Thank you so much for your well documented process. Even if this doesn’t solve my problem (wireless hell) it gives me a great little tutorial in linux procedures. Being a new convert I’m used to MS XP Device Manager, etc… so. thanks again.

  • 🐧 nixCraft Jul 31, 2006 @ 17:37

    Glad to know that my knowledge sharing is helping you. 🙂

    Sure, it takes some time to setup, but once everything is up and running you will be free from windows sins.

    If you are a new (totally) to Linux, get good Linux book that explains the basic concepts.

  • systray Aug 9, 2006 @ 15:43

    For what kind of revision it that Open Source driver? For revA oder revb?

  • 🐧 nixCraft Aug 9, 2006 @ 16:47


    It is for rev b 🙂 (and i’m using rav B)

  • Pablo Medina Sep 15, 2006 @ 11:30

    Hi Nick.

    I have a problem with my DLINK DWL-G630.

    The chipset of my card is “RaLink RT2561/RT61 rev B 802.11”, so I thought this page could be the solution to my problems 🙂

    I’ve followed your steps , but when I try to install the driver with modprobe, I get this error: “FATAL: Module rt61 not found”. However, I can see rt61.ko using ls.

    Any idea?



  • 🐧 nixCraft Sep 15, 2006 @ 13:26


    Copy driver to your /lib/modules/version/kernel/net/wireless/ directory

    For example, type the following command:
    # mkdir -p /lib/modules/$(uname -r)/kernel/net/wireless/

    Copy it:
    # cp rt61.ko /lib/modules/$(uname -r)/kernel/net/wireless/

    Now run modprob command. If it does not worked just reboot system and try one more time and it should definitely load.

  • Pablo Medina Sep 15, 2006 @ 16:19

    Thanks Nick, but it didn’t work!

    Perhaps I’m one of those case where anything works 🙁

    I use lsmod to see my driver but it doesn’t appear

    How could I know if the compilation proccess has finished properlly? I mean, I’m not sure if this file is rigth.



  • 🐧 nixCraft Sep 15, 2006 @ 18:40

    That is weird. It should work?

    >How could I know if the compilation proccess has finished properlly? I mean, I’m not sure if this file is rigth.

    If you don’t see any error while compiling code, then 99% times file is correct. Have you followed instructions mentioned in readme file?

    If modprob is not working try insmod:
    insmod rt61.ko
    lsmod | grep rt61

    Let me know..

  • Pablo Medina Sep 15, 2006 @ 19:13

    Thanks Nick!!

    With the last advice it works, finally!!:)
    However, I have problems with the DHCP of my router. Don’t worry, I was looking for some fun 😉

    Thanks again!!

    Pablo (this is my firs week at Linux world)

  • remkade Sep 27, 2006 @ 17:48

    In order to get modprobe to work properly you have to run “depmod -a” after you copy the module into the /lib/modules directory. Otherwise if you reboot (at least in gentoo with a 2.6 kernel) it’ll delete the directories you made.

  • blackelvis Oct 10, 2006 @ 7:36

    i’m running debian testing/unstable with kernel 2.6.17-1-k7 and i’m using a wrt54g and a wmp54g wireless pci. with every driver i tried, the 2×00 drivers from serialmonkey and the ralink driver, my system constantly freezes. well, the connection and everything is working, but it ether freezes during boot, or some minutes later or after an our of surfing the net. if i turn off the router then it runs fine. if i then turn on the router it will freeze again instantly or after some time. i’m really stuck here, any ideas? logs don’t tell me anything.

  • 🐧 nixCraft Oct 10, 2006 @ 19:35

    Try to run driver with latest kernel. My friend had same problem after using latest kernel his problem solved (Linuxant driver).

    Also make sure your driver loaded and configured perfectly .

    Personally I am running stable kernel and I have no problem at all.

  • BretNJ Oct 20, 2006 @ 13:53

    Hey nixcraft, great writeup…i’m gonna reinstall freespire tonight and see if this solves my driver woes. quick question though, to set my desktop to a static ip, do I only have to do that in iwconfig or does that have to be set elsewhere first? Thanks again!

  • 🐧 nixCraft Oct 20, 2006 @ 18:23


    You need to use iwconfig to setup static or DHCP based ip for all wireless cards (for ethernet card use ifconfig command).

    Appreciate your post.

  • eggmatters Oct 23, 2006 @ 20:29

    Hi, I was trying to install my ralink driver. It’s even for the same card pictured above. I get as far as step 5 and receive the following error:

    eggmatters@eggsmachine:/opt/RT61_Linux_STA_Drv1.0.4.0/Module$ make all

    make -C /lib/modules/2.6.8-2-386/build SUBDIRS=/opt/RT61_Linux_STA_Drv1.0.4.0/Module modules
    make: *** /lib/modules/2.6.8-2-386/build: No such file or directory. Stop.

    make: *** [all] Error 2

    There is no build directory in lib/modules/2.6.8-2-386 but it isn’t empty. I am running a Debian kernel “sarge” verion 2.6.8 on the 386 architecture. What am I missing here?

  • 🐧 nixCraft Oct 23, 2006 @ 20:36

    Hello eggmatters,

    Install kernel headers package for 2.6.8-2-386 kernel. These files are available from this package only.

  • eggmatters Oct 24, 2006 @ 20:00

    Hi there, sorry to bother you again but . . . the driver installed perfectly with the kernel headers, I was able to configure the connection, scan the channel I wished to use. I can ping the router but, I can’t get any internet access. lspci still shows “0000:00:09.0: Network Controller: Ralink: Unkown device 0301. But, the card does detect networks so it does work, I just have no idea why it can’t access any of the “free” channels (I have the router in the house set up to broadcast its ssid, with now encrption) So, do I still need to config a key? Also what does the WPA Supplicant do? That’s like 4 or 5 questions but, I’m more interested in why I can’t access the internet. If you can help with that, that would be great.

  • 🐧 nixCraft Oct 25, 2006 @ 2:28

    > lspci still shows “0000:00:09.0: Network Controller: Ralink: Unkown device 0301.
    Update your lspci data to get rid of this problem read previous post:

    >I’m more interested in why I can’t access the internet
    Did you setup correct route? Verify using following:
    route -n

    To see exact channel use iwlist ra0 scanning command, it will show which channel you need to use. Yes you need to specify the key w/o which you will not get access via WL router.

  • eggmatters Oct 27, 2006 @ 20:55

    Alright! I was finally able to ping google and actually visit the site and put in a search term but after that, it freezes up and times out. iwlist ra0 rate shows anywhere between 11 and 12 mb / s so, I dont think its the router, but do you know what might be the problem? search param for my /etc/resolv.conf file perhaps?

  • 🐧 nixCraft Oct 27, 2006 @ 21:30

    Make sure you have correct mode and channel set. I don’t think so resolve.conf should be a problem. But just put two good name servers or try powerful opendns name server:

    cat /etc/resolv.conf:


  • eggmatters Oct 28, 2006 @ 2:21

    Yeah, I played around with that file for a bit but it didn’t seem to help. I fiddled with the antennae of the router and the card and got an ok connect speed from ip config. I found a sticky though that was titled “How to make mozilla faster” It described changes to about:config and after I changed them, problem solved and now it screams. Thank you for all of your help. You’ve been an invaluable resource in this process. It was fun, honestly, definitely a learning experience.


    PS, anybody with problems with the rt61 chipset, you can now send them my way.

  • 🐧 nixCraft Oct 28, 2006 @ 18:25


    I am glad that it is working now. I am just curious to know what changes you have made to Firefox?

  • zug Nov 7, 2006 @ 23:52

    Thank you from freeing me from the ThunderDome match with my wireless card! I leave victorious!

    I have a midlevel of experience on Redhat/Fedora but this wireless stuff was killing me until I found this page. It is up and running! Now I can get on with my life (and my new distro Debian). Thanks much. The card was a Gigabyte GN-WP01GS w/RT61 wireless chipset, kernel 2.6.8-2. Follow these instructions exactly!

  • 🐧 nixCraft Nov 8, 2006 @ 8:59


    No problem. Glad to know you are enjoying freedom.

    Appreciate your post.

  • Drask Nov 9, 2006 @ 19:45

    I’m trying to follow the directions exactly, but when I run make config I get
    ./Configure: Command not found

    I have set permissions to a+rx on Configure, so I looked at the Makefile and saw that make config doesn’t do much more than run ./Configure. When I try running it directly, I get
    : bad interpreter: no such file or directory.

    When I vi these files, every line has a ^M at the end of it, which usually means that EOL is marked by 1310 instead of the normal 10. Is there some step I missed in untarring the archive, or did someone recently recompress this from a windows machine?

    Anyone else running into this?

    I’m going to try running everything through sed and see if it works any better.

  • 🐧 nixCraft Nov 10, 2006 @ 0:18


    Make sure you have complete development environment and gcc compiler is installed.

  • Drask Nov 10, 2006 @ 21:59

    Yes, gcc is installed, thank you. I’m using the 2.4.27-2-386 kernel, so some of the instructions are a little different from what is listed on this site. I have installed the entire devel package group. I don’t seem to have dos2unix and when I try to install tofrodos with apt I get a Couldn’t find Package error. However, I ran “sed s/{CTRL-V}{CTRL-M}$//g Configure > Configure_clean” and “mv Configure_clean Configure” and it appears to have worked (I also had to do the same thing to Makefile), although now I am getting the following error message: “rt61.o: init_module: No such device”. I’m going to try tackling that tomorrow.

  • NJ Hewitt Nov 25, 2006 @ 3:20

    Thank you very much, I’ve got my card working after a few hours of tinkering, this page has a great help.

  • 🐧 nixCraft Nov 25, 2006 @ 8:42

    Cool! Glad to know this how to helped you out!

    Appreciate your feedback.

  • Konrad Dec 16, 2006 @ 19:59

    Thanks for the guide!
    Unfortunately, it doesn’t work for me (yet). When I type
    ifconfig ra0 up
    I get the following error: (free translation from Swedish)
    SIOCSIFFLAGS: No bufferspace availible

    Any ideas as of how to continue?

  • phx_ern Dec 26, 2006 @ 13:22

    hey dude, i got a dwl-g630 pcmcia card based on RT61 rev b chip and a d-link router di-824vup+.
    i had no problems with bringing up driver of the card, but i don’t know how to make it work with DHCP. you wrote:

    You need to use iwconfig to setup static or DHCP based ip for all wireless cards (for ethernet card use ifconfig command).

    i don’t get how to “use iwconfig to setup DHCP based ip”

    and i don’t understand this – u told to edit this file:
    # vi /etc/network/interfaces
    but i don’t even have it. should i make new one or what? sorry for bothering you. thanks a lot anyway.

  • eggmatters Dec 30, 2006 @ 19:49

    Hey there Nix, I have a quick and stupid question. My wireless router does not like static IP’s, (its a Quest, Actiontec DSL wireless router and modem) So, everytime I shut my computer down, I have to manually configure the card, first by bringing it up, then callhin dhclient to get an IP adress. The IP adress is the same every time ( but, I was curious if I could use re direction to call dhclient from /etc/network/interfaces? And if so, how does one do that?

  • 🐧 nixCraft Dec 31, 2006 @ 1:17


    Open /etc/network/interfaces and make sure it read like as follows:

    auto card0
    iface card0 inet dhcp
    # post-up /path/to/

    Remove other static settings. Line # post-up /path/to/ is optional

  • fatkat Jan 2, 2007 @ 14:57


    thanks for this post, I was able to get my Edimax 7128 card up quick!

    Note to Phx_ern: perhaps you run Fedora Core? If so you just need to call the helper script (with the iwconfig’s) from the /etc/sysconfig/network-scripts/ifup-eth script. I put it right after the wireless check which works even though there may be some better way to do it.

  • Matt Jan 7, 2007 @ 22:35

    Hey everyone… i’m following the procuedure above on Slackware 11, 2.4.* kernel…

    Not sure why, but i dont have the file rt61.ko… is this the driver? i have rt61.o… is that the same?


  • 🐧 nixCraft Jan 7, 2007 @ 22:41


    For 2.4 kernel use rt61.o file. Move same file to /lib/modules/$(uname -r)/kernel/drivers/net/wireless directory.

  • Matt Jan 7, 2007 @ 23:23

    ok… so i loaded rt61.o and it loads no problem… however, i cannot save any settings (essid, mode)… i issue ‘iwconfig ra0 essid “my_essid” and there is no error, but when i issue iwconfig, it shows ESSID:”
    … with no essid listed

    any thoughts?


  • viraj Jan 8, 2007 @ 11:53

    can u please tell me the linux driver source for netgear WPN111 wireless usb adapter using atheros AR5005UG chipset.i am using fedora 5.

  • Sunil Jan 15, 2007 @ 18:32

    Thanks for the wonderful advice. I was able to get my RT61 based Dlink 510 card to work. However, I need to run insmod rt61.ko and lsmod | grep rt61 after system start up every time. I have added an entry in modprobe.conf to load the module at startup. However, at startup, I get the error “Device ra0 does not seem to be present. Delaying Initialization.” Please let me know how to resolve this issue. I am using Fedora 6.

  • 🐧 nixCraft Jan 15, 2007 @ 20:14

    Can you paste your entry here?

    Also you can add command modprobe command to /etc/rc.local:
    modprobe rt61
    /etc/init.d/network restart

  • 🐧 nixCraft Jan 15, 2007 @ 20:19
  • Sunil Jan 17, 2007 @ 17:31

    I tried out the rc.local changes. But that did not help. Posting my files now

    modprobe.conf has
    #alias ra0 rt61 (Commented as it anyway did not work)
    install ra0 insmod /lib/modules/$(uname -r)/kernel/net/wireless/rt61.ko

    the file /etc/sysconfig/network-scripts contains

    I run all these commands from a terminal after the system boots up
    cd /lib/modules/$(uname -r)/kernel/net/wireless
    insmod rt61.ko
    lsmod | grep rt61
    iwconfig ra0 essid aaaaaaa

  • Sunil Jan 17, 2007 @ 17:33

    Forgot to mention in my previous post that after I run the commands in the terminal, network comes up. However, if I put these commands into a file and execute the file, network does not come up.

  • Sunil Jan 17, 2007 @ 18:07

    I have done a lot better than my last post. Dis the following

    Ran make install from RT61_Linux_STA_Drv1.1.0.0/Module

    When the system rebooted I got an error “Determining IP for ra0; failed; no link present… Check cable.

    Then I added the dhclient and iwconfig ra0 essid aaaa in rc.local

    The network is now up at boot itself. Any ideas on how to remove the workaround that I have done (ie: changing rc.local) and getting rid of the FAILED that comes up at boot?

    The initial post was really useful though. I am sure I would never have been able to bring up my network without it.

  • 🐧 nixCraft Jan 17, 2007 @ 19:22

    I am glad to learn that it is working now.

    This module should not have to be entered into /etc/modules.conf file. This module should be autoloaded when a device is found that uses the module. Since this module is not block device it will not work by loading from /etc/modules.conf file. You need to add this modules to /etc/rc.local file only. Under debian and Ubuntu we have a special file call /etc/modules.

    Hope this explanation helps you.

    BTW. Can you tell me your distro and kernel version?

  • Sunil Jan 18, 2007 @ 16:19

    I am using Fedora 6 Kernel 2.6.18-1.2798.fc6

  • 🐧 nixCraft Jan 18, 2007 @ 17:40

    /etc/rc.local is the only solution for you.

  • ANuj Jan 21, 2007 @ 18:24

    hi There ,
    I am using a a WRT54G AP with a DWL-G510 card based on rt61pci driver. I am able to install the driver but am not able to connect to the access point. I have tried to associate it to the access point using iwconfig. It gets associated with the AP but when i run iwlist scan it shows my AP only once. On running the scan again it yields no reult. The AP is quite near to me. I have tested it with a 802.11b card it worked fine.
    The error worth nothing is
    in /var/log/messages i get: wlan0: cannot create symlink to default key

    Also on ifup wlan0 i get
    SIOCSIFFLAGS: Input/output error
    Failed to bring up wlan0.

    These are many questions. Can any one throw some light on it. I need to make this work as soon as possible

  • 🐧 nixCraft Jan 22, 2007 @ 15:14

    Hello, ANuj

    rt61pci creates ra0 device and not wlan0. Please use ra0.


  • Anuj Jan 22, 2007 @ 20:06

    The driver I am using is rt2x00. I installed it using moduke assistant. On lsmod it shows rt61 driver. I am not able to understand why is it showing wlan0. Moreover on Ubuntu, it gets auto installed, shows ra0 to be the device name .. but the problem still remains.

  • nico Jan 29, 2007 @ 17:16

    Hi all,

    first off all, Nixcraft, thanks for this great post.

    Step 1 to 7 worked perfectly. after these steps and a call to dhclient, wireless network works for a little while.

    Then (after one DHCP lease??) dns doesn’t work anymore.
    I have reboot, repeat step 7 and enjoy another few minutes of being online.

    Also starting the device up at boot time as in step 8 doesn’t do it for me.
    Can someone help me with these two problems?
    I’m installing a Linksys WMP54G pci card under Fedora Core 6


  • 🐧 nixCraft Jan 29, 2007 @ 21:28

    Hello Nico,

    Add auto config to /etc/rc.local file for FC6.


  • Nico Jan 29, 2007 @ 22:30

    Thanx nixcraft,

    I’ll take a try tomorrow (it’s getting late here in the Netherlands).


  • eggmatters Feb 2, 2007 @ 18:53

    Hey, Nix. I’m having problems when gnome boots on my system. The reason, I’m posting it here is because this happened after I wrote the config script:

    auto ra0
    iface ra0 inet dhcp
    post-up /etc/Wireless/wlan.up
    post-down /etc/Wireless/wlan.down

    I need to run dhcp here because my DSL router flips out if I give it a static IP. A

    So, once it loads, I get a logon and then a splash screen. The splash screen hangs for about 3 hours before gneme finally runs. Then only a select few app’s will run. Namely, Mozilla and Abi. Nautilus will not cooperate at all nor any application that requires it for file browsing.

    When I remove the interfaces script, it loads right up. I have to manually bring my network up but, all I need to run is ifconfig up and dhclient. But then, I stll have the same problems with nautilus and gnome etc. Any ideas?

  • 🐧 nixCraft Feb 2, 2007 @ 20:01


    Your DNS is not working correctly or DHCP is not assigning correct DNS server. Look for /etc/resolv.conf file:
    cat /etc/resolv.conf

    Make sure file is correct and upto date.

    Also run updated version of Gnome.

  • ike Feb 8, 2007 @ 21:33

    to install dos2unix on Ubuntu (edgy):
    sudo apt-get install tofrodos

  • greasy Feb 23, 2007 @ 7:44

    Fantastic forum! I hope you can help me out.
    VERY new Linux user here (less than 48 hours). Using a WMP54G, rev 4.11 i think. FC 6, 2.6.19-1.2911. I have updated the kernel. Yesterday I dloaded the nightly driver pakage from serialmonkey for the rt61 chipset and somehow miraculously, got wireless to work through the night. AFTER I rebooted, it was dead in the water. The system even froze upon reboot. How I fixed that, I have no idea, but I’m up and running again. I tried following the same steps as before and it didn’t work. I think it was posted on I logged in as root and deleted the .ko from /lib/modules/2.6.19-1.2911.fc/kernel/drivers/net/wireless and deleted the device through Network under the System/Administration menu. Then I found this forum. I made it through step 4 with no problems. I can’t figure out Here’s where I’m stuck “Now copy confiugration file:

    # cp rt61sta.dat /etc/Wireless/RT61STA/rt61sta.dat
    # dos2unix /etc/Wireless/RT61STA/rt61sta.dat

    Now copy actual driver (rt61.ko) to your kernel directory:”
    When I do the dos2unix command, I do not end up with a .ko file. I searched the entire system for a RT61STA.KO and there isn’t one anywhere. I tried to research dos2unix and I got nowhere. I’m at wits end, but I wont give up. I hope I gave enough info.


  • greasy Feb 23, 2007 @ 8:04

    more info…
    I just rebooted, and started over again..
    I didn’t notice this before, but, at step 5 at the ‘make’ command, I’m getting errors..

    make -C /lib/modules/2.6.19-1.2911.fc6/build SUBDIRS=/home/dan/Desktop/RT61_Linux_STA_Drv1.1.0.0/Module modules
    make[1]: Entering directory `/usr/src/kernels/2.6.19-1.2911.fc6-x86_64′
    CC [M] /home/dan/Desktop/RT61_Linux_STA_Drv1.1.0.0/Module/rtmp_main.o
    /home/dan/Desktop/RT61_Linux_STA_Drv1.1.0.0/Module/rtmp_main.c: In function ‘RT61_probe’:
    /home/dan/Desktop/RT61_Linux_STA_Drv1.1.0.0/Module/rtmp_main.c:197: error: ‘struct net_device’ has no member named ‘get_wireless_stats’
    /home/dan/Desktop/RT61_Linux_STA_Drv1.1.0.0/Module/rtmp_main.c: In function ‘RT61_open’:
    /home/dan/Desktop/RT61_Linux_STA_Drv1.1.0.0/Module/rtmp_main.c:326: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type
    make[2]: *** [/home/dan/Desktop/RT61_Linux_STA_Drv1.1.0.0/Module/rtmp_main.o] Error 1
    make[1]: *** [_module_/home/dan/Desktop/RT61_Linux_STA_Drv1.1.0.0/Module] Error 2
    make[1]: Leaving directory `/usr/src/kernels/2.6.19-1.2911.fc6-x86_64′
    make: *** [all] Error 2

    thanks again

  • 🐧 nixCraft Feb 23, 2007 @ 12:36


    Make sure you have kernel source code and kernel headers packages installed

  • greasy Feb 23, 2007 @ 19:02

    i apologize for being so green, but this whole ‘kernel’ thing is a bit much for a windows convert. ive been googling for a walk through for kernel install on fc6 and i found

    is this what i’m looking for?
    when i uname -r
    i get 2.6.19-2911.fc6
    how can you tell if the kernel source code and kernel headers packages are installed?
    i understand this is beyond the scope of this forum, and i will take this up somewhere else, i just dont have any idea where to turn right now. I appreciate the help. i see myself going to the bookstore today for a big fat unix bible.

  • greasy Feb 23, 2007 @ 19:55

    i TRIED something else, during boot, i was able to load kernel 2.6.18-2798 through grub… i went through the steps here again. modprobe didnt work, but i was able to insmod (same deal as Pablo, above), when i scanned I saw my network! wow! almost there. but no ping, no surf. i rebooted to same kernel. nada. os wont recognize card, no network, no ping. device is gone from my Network Config panel. FRUSTRATING! I verified that mod is in the kernel, and did following steps until ping… didnt work. am i beyond help here?

  • ale Mar 2, 2007 @ 19:33

    network interface is up. but host don’t ping.
    “Destination host unreachable”. In “route -n” I see routing table.

  • Amal Mar 12, 2007 @ 15:05

    The make error you are receiving is due to the kernel – 2.6.19.x
    This driver is not compatible with kernel versions 2.6.19.x and above.

    I’m having the same problem… Waiting for ralink to release a new driver for the new kernels

  • MetaMorfoziS Mar 17, 2007 @ 11:30

    Amal: Your last post totally send me to the ground. I was trying to get working the driver for a hour ago, then i read this. Braah:((

  • b2ornot2b Apr 7, 2007 @ 5:14


    Try this patch to fix the compile problem with the kernel API change.

    I’ve tested on 2.6.20-1.2933.fc6

  • Fredrik Jansson Apr 8, 2007 @ 12:14

    The patch above worked for me on 2.6.20-1.2933.fc6,
    but i also had to add
    in the beginning of rtmp_main.c.
    This is the file affected by the patch.

  • Fredrik Jansson Apr 8, 2007 @ 12:17

    #include net/iw_handler.h
    the less-than and grteater-than signs seems to kill
    text between them.

  • 🐧 nixCraft Apr 8, 2007 @ 14:13


    Thanks for sharing patch. Appreciate your post!

  • Siddharth Apr 26, 2007 @ 23:58

    Is it possible to setup this card as an AP for other wireless devices? I tried to put it in the Master mode but I get
    Error for wireless request “Set Mode” (8B06) :
    SET failed on device ra0 ; Invalid argument.

    Any kind of help will be appreciated. Thanks in advance.

  • jono May 21, 2007 @ 1:16

    i had the same problem as “no rt61.ko” so i used rt61.0

    When i try and probe the card i get

    “Can’t locate module rt61”

    Can anyone help?

  • Gene Jun 12, 2007 @ 15:51

    I am extremely new to Linux and I just downloaded FC6 and installed it on my brother’s machine. He want’s to use this wireless card so found this web site and I tried downloading the driver from the link above. It could not find that driver so I tried to find the closest thing to it. I downloaded RT61_Linux_STA_Drv1.1.0.0.tar.gz which looked like a possible update to the driver you had linked to. I followed the directions when I get down to step 7 things turn south. It says to type ifconfig eth0 down. When I do that it replies “eth0: unknown interface: No such device. I tried to go on and type modprobe rt61 and got an error but read where you needed to type depmod –a first. I tried that and I didn’t get any errors but when I typed the ifconfig ra0 it barked back SIOCSIFADDR: No such device. Any suggestions.

  • 🐧 nixCraft Jun 12, 2007 @ 16:04

    FC6 needs a patch, please download and apply patch as indicated by b2ornot2b

  • Gene Jun 12, 2007 @ 18:20

    I installed the patch and even installed the include statement in main.c. I have recompiled with no errors and I have copied everything that needs to be copied and done per the instructions. Still, when I get to Step 7 and type ifconfig eth0 down, I get eth0: unknown interface: No such device. My kernel is 2.6.18-1.2798.fc6.

  • Gene Jun 12, 2007 @ 20:28

    Help No Longer Needed went to something else thanks

  • 🐧 nixCraft Jun 12, 2007 @ 20:34

    Ok, you can skip step # 7 as you don’t have Ethernet card (or unsupported Ethernet card). See if there is a file called rt61.ko. Run command:
    ls -l *.ko

    Copy .ko driver file as told in # 6 , run depmod, followed by modprobe and you should have ra0 up (some newer kernel version comes with rt61pci just remove the same using rmmod to avoid conflict).
    rmmod rt61pci
    modprobe rt61
    ifconfig -a
    ifconfig ra0

  • John Jul 8, 2007 @ 6:25

    The problem I have is that after executing “ifconfig ra0 up” and “dhcpcd ra0” I can ping successfully, but Firefox cannot find the server at

  • 🐧 nixCraft Jul 8, 2007 @ 7:49

    Setup DNS server (NS1,NS2) by editing /etc/resolv.conf file

  • John Jul 8, 2007 @ 9:33

    Thank you vivek for your very quick reply. /etc/resov.conf had:
    I changed one to and Firefox found google ok. If I then do “ifconfig ra0 down” and “ifconfig ra0 up”, Firefox cannot connect. Is that normal?

  • 🐧 nixCraft Jul 8, 2007 @ 12:46

    Noop, your dhcp server is not configured properly to assign NS1 and NS2 ip. When dhcp client is run it obtained nameserver information from DHCPD and update /etc/resolv.conf file. Make sure dhcd has as NS1

  • John Jul 9, 2007 @ 0:03

    Hi vivek. Thank you again. I am using SimplyMepis 6.5 on my laptop. I edited /etc/resolv.conf to:

    nameserver # added john 8jul07

    If after connecting to the internet, I do “ifconfig ra0 down” “ifconfig ra0 up”,”ping″ reports: connect: Network is unreachable

    If I do the same thing using PClinuxOS I get the same fault. However, if (in PClinuxOS) I do “rm -f /etc/dhcpc/” then “dhcpcd ra0” the ping works and Firefox finds

    In Mepis, is in /var/run, but deleting it and running “dhcpcd ra0” tells me dhcpcd is still running, and “ping” reports: connect: Network is unreachable

    I note Mepis has dhcpcd and dhcp (dhclient), I’m not sure whether I have understood your “Make sure dhcd has as NS1”

  • David Jul 10, 2007 @ 6:13

    Hello there!

    I just wanted to join the group of the happy users! Following the instructions found here I managed to get my D-Link DWL-G510 working on OpenSuse 10.2. I still need to start it manually, but I will soon make the proper changes so that it will be configured at boot time. The card connects to a D-Link DI-524UP router with WEP and DHCP.

    Many thanks to all of you for the help,


  • John Jul 11, 2007 @ 22:35

    Referring to my post on 9 July, can you suggest why I cannot reconnect my Mepis after doing “ifconfig ra0 down” “ifconfig ra0 up”

    Another issue is, what do you edit when /etc/resolv/conf is overwritten by glibc resolver?

  • Rahul Tomer Aug 8, 2007 @ 7:44

    Is it possible to setup this card as an AP for other wireless devices? I tried to put it in the Master mode but I get
    Error for wireless request “Set Mode” (8B06) :
    SET failed on device ra0 ; Invalid argument.

    Any kind of help will be appreciated. Thanks in advance.

  • b2ornot2b Aug 10, 2007 @ 15:27

    For FC6 kernel update you can use this patch to compile.

  • b2ornot2b Aug 11, 2007 @ 3:42
  • chil Aug 16, 2007 @ 14:32

    i just install Fedora 7 from DVD with default settings. I cant get my wireless card to work 🙁

    my problem is like below

    make -C /lib/modules/2.6.8-2-386/build SUBDIRS=/opt/RT61_Linux_STA_Drv1.0.4.0/Module modules
    make: *** /lib/modules/2.6.8-2-386/build: No such file or directory. Stop.

    make: *** [all] Error 2

    so i need to install kernel header?

  • mehfuz alam Aug 18, 2007 @ 4:41

    i have a d-link Airplus GDWL-G510 wireless PCI Adapter, i already install this on pci slot but can’t find out to communicate.
    Can you tell me what are the prodecure step by step to configure this wireless land card driver in linux (RHEL 5)

  • Shakti Saran Sep 2, 2007 @ 13:23


    I’m using 2.6.18-1.2798.fc6 kernel and after following all the steps above, running “iwlist ra0 scanning” lists my router with its ESSID. However, running “iwconfig” shows “ESSID:”””. So when I ping my router, it shows 100% packet loss. I’ve run “cat /proc/net/dev” and found ra0 interface to be receiving more packets on each run whereas packets transmitted is not changing and also showing the same number of errors and drops in transmission. On running “dmesg | grep ra0” shows “ra0 (WE) : Driver using old/proc/net/wireless support, please fix driver!” I’m not sure why the “iwconfig” commands not setting up the ra0 interface. Could you please help with this?

    Thank You,

  • Hubert Samm Sep 9, 2007 @ 2:18

    Hello… thanks for the instructions.. I just loaded, configured, & complied for my system running Fedora Core 7, Kernel .. ran into an issue with an undefined in the rt61.ko module, here’s what I had to change in order to get the module to compile correctly…

    FIND THE FOLLOWING IN rtmp_main.c
    // =======================================================================
    // LOAD / UNLOAD sections
    // =======================================================================
    // Driver module load function
    static INT __init rt61_init_module(VOID)
    // return pci_module_init(&rt61_driver);

  • Hubert Samm Sep 9, 2007 @ 2:22

    for some reason my last comment didn’t post correctly… in the module rtmp_main.c,

    comment out

    return pci_module_init(&rt61_driver);

    and replace it with:

    return pci_register_driver(&rt61_driver);

  • Hubert Samm Sep 9, 2007 @ 2:24

    comment out the return pci_module_init as shown above, and replace it with:

    return pci_register_driver(&rt61_driver);

  • Psych Sep 18, 2007 @ 0:22

    Hi there!

    This would be my first post ever on this site. I am having a problem I didn’t have before.

    My D-Link dwl G 520 was working fine under kernel 2.6.21 using the daily cvs from serialmonkey(rt61 driver) until very recently when ra0 had been deprecated and replaced by wlan*. Of course, I’m sure the change of naming conventions is not the issue. Now I am running on I also had my kernel-devel and kernel headers updated and recompiled the latest version for the drivers from serialmonkey.

    The driver works. compiles correctly, device starts up okay, scans okay, finds the wireless AP at a good signal strength(using rtutils and iwconfig). But when I ping the router, i get a “destination host unreachable”.

    I am using WEP authentication (64 bit hex) and other machines seem to connect okay wirelessly using windowsXP.

    my ifconfig output for wlan0 are as follows (Edited for security reasons):

    wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
    inet addr: Bcast: Mask:
    inet6 addr: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/xx Scope:Link
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1948 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:180017 (175.7 KiB)

    my iwconfig output(edited for security reasons):

    wlan0 IEEE 802.11g ESSID:”******”
    Mode:Managed Frequency:2.412 GHz Access Point: xx:xx:xx:xx:xx:xx
    Bit Rate=1 Mb/s
    Retry min limit:7 RTS thr:off Fragment thr=2346 B
    Encryption key:xxxx-xxxx-xx
    Link Quality=24/100 Signal level=-78 dBm
    Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid misc:0 Missed beacon:0

    by the way- I am using 2 network adapters. one wired directly to a different AP and one connected
    wirelessly to another AP(which I am trying to configure now and both were working simultaneously before). Now even when I disable my wired NIC- I still can’t ping the wireless AP although it scans correctly.

    Anybody faced this issue before? Thanks in advance.

  • Avish Nov 9, 2007 @ 18:27

    Hello there,

    Cheers for a wonderful webpage – was tearing hairs out until i found it a few months back.
    Now, for the problem (which seems to have appeared on some previous comments, but no satisfactory solution for me yet): after upgrading to debian lenny and kernel 2.6.22-2-amd64, I have tried to reinstall the rt61 driver. Using the patch described in earlier posts, I have managed to compile the driver and load it. Interface ra0 is up, but I can not ping the router. It may be noted that the 2.6.18-4 driver works perfectly (on the same machine, i.e. same configuration).
    Any suggestions?

  • Avish Nov 10, 2007 @ 12:47


    compiling and using the cvs tarball of the rt61 from serialmonkey solved the problem.

  • ranjani Nov 20, 2007 @ 8:00

    when i try to excute ./configure command i am getting command not found error. how can i over come from this?

  • Paul Nov 26, 2007 @ 11:03

    I’m using Debian lenny with my own compiled 2.6.23. I can’t compile the drivers, I get a series of warnings in rtmp_main.o with the final error of an implicit declaration of function in pci_module_init.
    It is quite possible that my very much stripped down system is missing something, but I have enough to compile kernels.

  • Paul Nov 26, 2007 @ 17:20

    I can answer my own question – might be useful for somebody else. The drivers on the ralink site are not old, they are prehistoric. Go to serialmonkey and get the cvs.

  • Rahul Dec 17, 2007 @ 8:12

    I’m using Debian on my system and tried configuring my DWL-G510 (rev C) card using the instructions given above. I’m able to install all drivers etc (even tried using ndiswrapper) but the system is unable to detect the wireless card itself. I also need to work with NS2 simulator. Can someone plz suggest me a suitble operating system which can detect the network card. Will Ubuntu or Xennopix work?

  • siva Feb 2, 2008 @ 4:41

    this information is very helpfule i followed the above configuration detailes and configure my wiereless carb and i am getting pinging from access poin also but in the system when i open mozilla ” UNABLE TO CONNECT” after that when i am trying to restart “network service” i am getting following error “rt61 device eth0 doesnot seem to be present, delaying initialization.” so kindly help out me

    thanks in advance


  • Charles Johnson May 22, 2008 @ 21:40

    Thanks so much for that. I’m running Debian Etch and can confirm you do need to do

    depmod -a

    before loading the driver

  • syed May 27, 2008 @ 18:25

    hi gurus,
    Basically i am not from LInux background but know basic commands. I have question to all Linux gurus outthere.
    I have laptop (Red Hat Linux installed AS 4) and desktop (Red Hat Linux installed AS 4) and D-link router(wireless). I want to connect to internet from laptop (through wireless) and also from desktop (through wired) and also i want to communicate (telnet,ftp) between laptop and desktop. what should i do

    can anyone give me step by step process?

    thanks in advance

  • marco Jun 5, 2008 @ 21:59

    I tell ya, I’m having the hardest bloody time getting this RAlink card to work in CentOS 5. Ugh, I’m shocked that it’s 2008 and it’s still this hard to get a wireless card configured! My card is a GigaByte with the RAlink chipset. I downloaded the correct drivers for it, etc. The install directions are similar to your directions, but some minor differences. I don’t recall directions to copy the rt61.ko to the kernel/drivers/net/wireless dir – but when i tried to it failed saying that directory is read only. I tried copying the file their via the window interface also but it failed. That screwed something up and I ended up having to repair the boot volume. Anyway, back to my wifi problem.

    When I run iwconfig, I can see the info there for ra0. However, the essid is empty. When I look at the dat file, it’s configured properly. When I look at the ifcfg-ra0 file, it shows the mode Managed, ESSID is correct, channel is correct etc.

    I’ve switched back and forth with using the network configuration control panel and setting up get IP automatically and using a fixed IP. But I’m not having luck.

    I’m using WPA2PSK for authmode and AES encrypttype. In the dat file I see “wpapsk” and that’s where I was putting my password. I’m not sure if that’s right or not? Because there is also the ‘key’ that gets set in the key file and can be seen in the wireless settings dialog in the control panel.

    I can get a ping when I use the fixed IP, but nothing when I used DHCP. I can sometimes see my router with iwlist ra0 scanning, and sometimes I see another router but not my own. If I try to restart network services with DHCP it fails when trying to get an IP from the router.

    when I run iwconfig, again it shows an empty essid. I can’t change it with iwconfig ra0 essid my-link – it doesn’t do a thing. I’m thinking this maybe part of the problem?

    Also, if I’m using a plain text password, which place is the correct place for the password with AES encryption using WPA2PSK authmode? dat file or in the key file that supplements the ifcfg-ra0?

    Sorry for the rambling post, but I’m exhausted and I’m trying to cover all the ground as concisely as possible. If anyone has any suggestions i would greatly appreciate your input. – Cheers.

  • marco Jun 7, 2008 @ 0:55

    well, for those of you on CentOS, I found this link, which was of some help:
    The card seems to be working now and I can connect to the router! BUT – I still can’t get internet via a browser?? So weird. I’m clueless again, searching everywhere for an answer. If anyone has a clue, I’ll buy a vowel please 😛

  • marco Jun 7, 2008 @ 6:36

    Solved. Basically, the NetworkManager was the missing link. In addition, to get the internet after I connected I used the admin – network configuration cp to put my router’s IP as the primary DNS under the DNS tab. This can also be done via file of course. Restarted the network, then restarted the NetworkManager service and kablamo! Internet 🙂 Good luck and I hope this helps someone.

  • Kiran Damle Jul 3, 2008 @ 20:19

    Great instructions (step by step).. even setting the channel same as what you get in iwlist is important!!!

  • Dan Yotz Aug 25, 2008 @ 22:30

    Thanks for the walkthrough. There is a typo, however. You utilize two different distributions, and, actually I had troubles with each of those and instead used the newest from RAlink:

    I still had issues with the build – no errors, but many warnings concering WPA_Supplicant.

    However, it did work in the end, and together with your WPA2 walkthough, I am now surfing in privacy.

    2q’s though:

    1) Can anyone tell me how to encrypt the password within /etc/network/interfaces ?

    2)Why do possible wireless connections no longer appear when I right click the network icon on the top-right of the screen in ubuntu 7.04 feisty fawn?

    Oh, and the MSI MP54G5 miniPCI wireless card works just fine!

    3)Can someone tell me if the combo BT card does also???

  • Tim Sep 20, 2008 @ 5:24

    Thanks for the walk-through. I am completely new to linux and have finally managed to get it compiled and the driver up. I am running mythdora 4 which is based on fc6.

    I can see the wireless network and set everything through iwconfig but cannot connect to it properly. Could the GUI Wireless assistant be interfering or the settings i entered in rt61sta.dat?

    When you startup ra0 with the ip – what determines what that ip should be? my router eg. es

  • Dan Yotz Sep 20, 2008 @ 18:15

    well if your router’s ip is, that could be a problem, you must make sure that your netmask does not prevent one device from seeing the other …

  • kaloqn Sep 20, 2008 @ 19:58

    make all
    make -C /lib/modules/2.6.26/build SUBDIRS=/root/Desktop/2008_0723_RT61_Linux_STA_v1.1.2.2/Module modules
    make[1]: Entering directory `/usr/src/linux-2.6.26′
    scripts/ *** CFLAGS was changed in “/root/Desktop/2008_0723_RT61_Linux_STA_v1.1.2.2/Module/Makefile”. Fix it to use EXTRA_CFLAGS. Stop.
    make[1]: *** [_module_/root/Desktop/2008_0723_RT61_Linux_STA_v1.1.2.2/Module] Error 2
    make[1]: Leaving directory `/usr/src/linux-2.6.26′
    make: *** [all] Error

  • vic Apr 21, 2009 @ 0:05

    I have the same error of the guy above

    @slackware 12

  • kaave' Apr 28, 2009 @ 9:58

    I ‘m working with CentOS linux and i want to ues linksys wireless-g pci to connect to internet. how i can find the rmp file of this.

  • Jozsef Apr 29, 2009 @ 9:58

    I have a same error message as “kaloqn” and “vic”!

    Anybody has a suggestion for this matter?


  • Jozsef Apr 30, 2009 @ 5:50

    What I got now is that I have installed the driver and now system automatically starts with ra0 but the Internet is not working! So I need to type in the konsole
    # ifconfig ra0 down
    And just after that my eth0 starts working again and I have access to the Internet.
    My question is how can I change eth0 back to default?

  • Jozsef Apr 30, 2009 @ 11:30

    i got it as default now again. by the way I notice that my wireless card is working and scanning and finding my signal from router but I can’t connect to it. don’t really know what’s the reason. I tried everything I’ve read above but nothing worked. yet I’m sure it’s something very simple since the card is working but I just can’t figure it out what’s the problem.

  • vic May 1, 2009 @ 22:17

    Jozsef, what driver did you use?

  • Jozsef May 6, 2009 @ 18:26

    I used the deriver from and that is this one.

    do you think something is wrong with driver?

  • vic May 11, 2009 @ 21:21

    Its the same driver Im traying to install, but the error persists

  • kelsey Dec 6, 2009 @ 23:28

    How do u install it??

  • Mateus Machado Luna Aug 8, 2011 @ 23:46


    I’m having some problems here. It looks that I don’t have an rt61.ko file. I also don,t have any of the other you sugested. I’m with 2.6.38-10 kernel… it’s that a problem?

  • Shain Padmajan Mar 24, 2012 @ 5:47


    I’m using the 3.0.0-17 kernel and I am unable to compile the ralinktek driver. Any help would be appreciated.

  • CM Jan 11, 2013 @ 4:49

    I had problems with kernal 3 and up but finally got it with windows wireless drivers and the latest winxp 32bit drivers from softpedia.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum