How to install a D-Link DWA-525 wireless network card in Ubuntu 10.04

I was having an issue with an old network card in my Ubuntu machine (x86 arch), so I went out and got a new one that supports 802.11n. It’s been some time since I swapped out hardware, and Linux has matured greatly since then: the last install of Ubuntu detected everything perfectly, first time, including the network devices!

Not so for this network card. After much searching it turns out it’s actually unsupported [1] out of the box. Bah! I finally found the information I need to get it running. This article is a combination of several articles [2], [3], [4], I had to borrow bits and pieces from all of them, listed below.

Here’s how to get up and running with the D-Link DWA-525 on Ubuntu 10.04:

1. Install the card and power up the machine.

2. Open the terminal and run

lspci

In the list you will see:

Network Controller: Ralink Device 3060 0

So now we know what device we need drivers for.

3. Go to http://www.ralinktech.com/support.php?s=2 http://www.ralinktech.com/en/04_support/license.php?sn=5019 and download the RT3062PCI/mPCI/CB/PCIe(RT3060/RT3062/RT3562/RT3592) drivers.

You’ll be prompted for your name and email but you don’t need to sign into anything.

4. Extract the package and cd to the directory.

5. We need to make a slight modification to the configuration for the driver:

nano os/linux/config.mk

And set:

# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y

# Support Native WpaSupplicant for Network Manager
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

By default they are both set to ‘n’. Save and close the file.

6. From the top level directory, compile and install the driver:

sudo su
make && make install

You need to use ‘sudo su’ and not just ‘sudo’ so it creates the directories properly.

7. After compilation, and whist still root, modprobe the driver:

modprobe rt3562sta

You should get no output signalling success.

8. Now an important step. We need to blacklist a conflicting driver that will be loaded preferentially for this network card.

sudo nano /etc/modprobe.d/blacklist.conf

and enter the following line at the bottom of the file:

blacklist rt2800pci

Save and close.

9. Restart the machine.

10. When the machine is back up, verify the driver has been loaded and is being used by the device:

lsmod

You should see the following in the list:

rt3562sta     924607     1

11. Now, launch the Network Manager and it should have detected the available wireless networks and you can configure the one you want.

References, in order of usefulness:

[1] https://help.ubuntu.com/community/HardwareSupportComponentsWirelessNetworkCardsDlink
[2] http://ubuntuforums.org/showpost.php?p=10055176&postcount=4
[3] http://ubuntuforums.org/showthread.php?t=1045703
[4] http://ubuntuforums.org/showthread.php?t=1559576

About these ads

160 thoughts on “How to install a D-Link DWA-525 wireless network card in Ubuntu 10.04

  1. Akhil Ranjan says:

    Dear Mr. Steveswinsburg,
    Thanks a lot for this post. I could get the device DWA 525 working and now using it to post this.
    Regards,
    Akhil Ranjan
    PS. I don’t know anything technical about linux.

  2. I just did a kernel update and had to repeat this procedure as it wiped out the built kernel module altogether. Thanks for that.

    However this time I just needed to build, deploy and modprobe, no reboot.

  3. Bryan says:

    This just worked for me under Ubuntu 10.10 :D

    Thank you so much for this.

    (comment made wirelessly using my Dlink N150 on Ubuntu)

  4. Just upgraded to 11.04 – had to repeat the process again since the kernel was upgraded.

    Still works as advertised!

    Again, just a ‘make clean && make && make install’ then the ‘modprobe rt3562sta’ and I was up and running again.

  5. silentkiller says:

    thanks mate
    im running Ubuntu 11.04 x64 and worked fine for me
    i just wanted to know if its possible to use this card for packet injection using air-crack it didn’t work with the old drivers
    thanks for taking the time and trouble

  6. pratheek adidela says:

    Man, you rock! i got a new machine today, and installed ubuntu 11.04 on it…and to my disappointment, i found that there were no drivers for the wireless card….

    i stumbled upon your post..and honestly, even to a newbie like me, it was simple and easy….made me say LINUX ROCKS!!! thanks for the help…really appreciate it!

  7. This just isn’t working for me! I’m running 11.04.

    I have done everything except edit the config.mk file because it doesn’t exist on my system. Please help!

    Thanks

  8. Wayne says:

    Hey man, you are a star!
    My heart sank when I installed my wireless card in my machine running on Ubuntu 10.10 and found that it didn’t work. Up till now, all new devices have just worked when I installed them on my Linux machine. However, I stumbled across your article while Googling for a solution, followed your steps (except I used gedit instead of nano) and it worked first time.

    Cheers!
    Wayne

  9. luponiano says:

    I have followed the instructions provided and although the card seems to be installed and working (it connects to my access point) it does not work smoothly (I have 11.04). What happens is that is as if it suddenly works and suddenly it stops working (even communicating with the router). This behaviour does not occur when using my old usb wireless. Any clue what could be happening?

  10. Andy says:

    I upgraded to Natty 11.04 and when I try to do make I get this error. Any suggestions please?

    make -C tools
    make[1]: Entering directory `/home/andy/Downloads/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/tools’
    gcc -g bin2h.c -o bin2h
    make[1]: Leaving directory `/home/andy/Downloads/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/tools’
    /home/andy/Downloads/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/tools/bin2h
    cp -f os/linux/Makefile.6 /home/andy/Downloads/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/os/linux/Makefile
    make -C /lib/modules/2.6.38-10-generic-pae/build SUBDIRS=/home/andy/Downloads/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/os/linux modules
    make: *** /lib/modules/2.6.38-10-generic-pae/build: No such file or directory. Stop.
    make: *** [LINUX] Error 2

    • I’ve seen this before (on Centos). Go into /lib/modules and check that the symlink there is correct. My bet is it isn’t. Check where it is pointing to then go there, grab the path to the real kernel, and recreate the symlink.

      • Andy says:

        Yes, there is no symlink in there. There are two sets of headers on my system:

        root@mybox:/lib/modules/2.6.38-10-generic-pae# ls -l /usr/src/linux-headers-2.6.38-10
        linux-headers-2.6.38-10/ linux-headers-2.6.38-10-generic/

        I just did the Natty Upgrade via the desktop to get from Ubuntu 10.10 to Ubuntu 11.04

        Shall i manually repair this by setting a symlink from /lib/modules/2.6.38-10-generic-pae/build to the linux-headers-2.6.38-10 or linux-headers-2.6.38-10-generic directory?

        Or should I be doing something else to repair this?

        Many thanks,
        Andy

      • Andy says:

        Followup to my last post. I found that the headers are not installed by default even thought uname gives “2.6.38-10-generic-pae”
        To fix this I had to go into System->Administration->Synaptic Package manager

        Then search for pae… which showed the linux headers package matching my kernel. I then installed this package.

        It now builds and appears to be running fine

  11. Vitaly says:

    Dear Steve! Thank you very much for this wonderful article which helped me many times. Thanks alot also from Yuriy Padlyak. He holds this in bookmarks all the time.

  12. Thank you very much for this valuable info, I could get it working on my mom’s pc after an ethernet device failure. Bought the DWA-525, put it on, read this tuto, internet connection established.

  13. monetschemist says:

    Steve, this is just great, thank you so much for sharing this with us.

    I noticed Samuel above having a problem with lsmod; he saw something like

    rt3562sta 874110 0

    I saw that too… I guess it was an artifact of having messed around a bit before stumbling on your post. When I opened the network manager, I saw that wireless was disabled. I enabled it, connected up to my router, and now when I do an lsmod I see a trailing “1” as well

  14. Alexander says:

    Hello!
    It worked great for my wireless PCI card Tenda W311P (chipset RT3060F).
    Linux Mint 11 “Katya”-GNOME-32bit.
    Thank you VERY much! :-)

  15. Alexander says:

    Hi!
    It worked great for me.
    Details: PCI wireless card Tenda W311P (chipset RT3060F); Linux Mint 11 “Katya” Gnome 32-bit.
    Thank you VERY MUCH!

  16. cristian g.n.r says:

    no he podido instalarlo con exito en linux mint 12, necesito ayuda please
    cristian@cristian-MS-7529 ~/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217 $ sudo make
    [sudo] password for cristian:
    make -C tools
    make[1]: se ingresa al directorio «/home/cristian/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/tools»
    gcc -g bin2h.c -o bin2h
    make[1]: se sale del directorio «/home/cristian/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/tools»
    /home/cristian/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/tools/bin2h
    cp -f os/linux/Makefile.6 /home/cristian/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/os/linux/Makefile
    make -C /lib/modules/3.0.0-14-generic-pae/build SUBDIRS=/home/cristian/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/os/linux modules
    make: *** /lib/modules/3.0.0-14-generic-pae/build: No existe el archivo o el directorio. Alto.
    make: *** [LINUX] Error 2
    cristian@cristian-MS-7529 ~/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217 $ make install
    make -C /home/cristian/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/os/linux -f Makefile.6 install
    mkdir: no se puede crear el directorio «/etc/Wireless»: El archivo ya existe
    make[1]: se ingresa al directorio «/home/cristian/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/os/linux»
    rm -rf /etc/Wireless/RT3060STA
    rm: no se puede borrar «/etc/Wireless/RT3060STA/RT3060STA.dat»: Permiso denegado
    make[1]: *** [install] Error 1
    make[1]: se sale del directorio «/home/cristian/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/os/linux»
    make: *** [install] Error 2

  17. nurul says:

    this great…
    my ubuntu 10.10 can work now with high signal. I can solved my trouble (ubuntu freeze randomly) after use this way.

    you know before use this, i have no answer how to solving since May 2011. I have reinstall ubuntu but its not help.

    thanks a lot for you, and thanks in advance.

  18. Simon McWaters says:

    Great article – very clear instructions. The link to ralinktech.com was broken, but I found the relevant download available here: http://www.ralinktech.com/en/04_support/license.php?sn=5019

    This worked fine for me on a very old desktop I’ve resurrected with Linux Lenny/KDE. There were some issues with the source code having references to slightly varied parameters for some functions – ULONG vs. unsigned int; I suspect it would make no difference anyway as the types are equivalent on this machines architecture – but it was easy to correct.

    Thanks very much.

  19. Mike More says:

    Thanks Steve! I was having problems with my DWA-525 on a new Linux Mint 12 (Lisa) 32 bit install but after following your instructions my wireless connection is finally working. Cheers.

  20. barnesjd says:

    Thanks a million from this Windows user/Linux tinkerer. This process worked to get it installed on my CentOS 6.2. However, I’m unable to get large files to upload or download to this machine. Other machines (Windows machines, albeit) can grab these files. I’m not even able to push them via sftp. So for now, I’ll just have fun with my thumb drive, lol

  21. Carlos says:

    Hello, It is my fist time with Ubuntu. I am trying to install this wireless desktop adapter. I am stuck in step 6. When I write make && makefile install , Im having this answer: No targets specified ans no makefile found.

    Could please somebody give a little help?

    • bonzini says:

      Carlos it sounds like you are not in the right directory. type the two commands

      pwd
      ls

      on two separate lines and post the output.

  22. Carlos says:

    Hello, I just managed to install it. Thank you so much, it is working now! Just when I did the last step “lsmod” Im having this result: rt3562sta 874147 1, instead of 924607. Is this ok?

    Thank you again!!

  23. Eliot says:

    Hello. i managed to do it and now see all the connection but now it does not except my password. it making so angry and my head hurts now. please help

  24. I am using ubunt 10.0.4,My issue is I am able to build the driver sucessfully but wireless is not dispalying at applet,it says device not ready.I tried giving iwlist scan where I am able to see the networks.Please help me out to bring up the device so that I can use.

  25. Laurie Scott says:

    I am not able to get Ubuntu 11.10 to recognize my Marvell 88E8057 wireless card (state:unavailable) – do you think your procedure would work for this version of Ubuntu?

  26. David Woodward says:

    Dude, you’re a rockstar. Great guide. I can easily imagine how it saved me hours and hours of time! Thanks.

  27. nurul says:

    I found two problems in my D-LINK DWA-525 in ubuntu 10.10 :
    first, my PC suddenly can’t turn on (orange light at power button), I found it cause by wireless card (cause after take out this my pc work normally), try this card to another pc then found same problem.
    second, suddenly show network no connection (but PC can work normaly), try to another pc but still same.

  28. Jorge says:

    Steve, thank you very much for this detailed and useful information. I just got one problem, everything works fine until i reboot my PC, after that my WIFI conections disapear. I followed all of your instructions. Any idea about that? Thank you very much!

  29. Amit says:

    Thanx for your such a detailed info. I have configured my pci card on one system, but it’s giving me trouble on the other system, with same system & same OS. At step 9 after restarting my system, I get the following…

    rt3562sta 1044395 0

    what may be problem ?

  30. mark says:

    Thank you Steve great article! I am posting this comment because of the lines you wrote, thank you very much again!!!! :)

  31. miguel says:

    it didn’t work for me.
    I’m on a ubuntu 12.04 and after I reboot and do lsmod it says
    rt3562sta 882339 1

    it sees my wireless network but doesn’t accept password

  32. nurul says:

    Hi steven, just now I’m purchase DLINK DWA-525, but won’t work even using this way.
    After I check, this DWA-525 different from last time (smaller than before). read DWA-525A2 on this PCI card.

    then I go back to ndiswrapper but what I get is the driver already installed but show “HARDWARE PRESENT : NO”.
    why ?

  33. Sebas says:

    Hi, anybody tried this in Ubuntu 9 ? With the other driver I installed, I can see the wlans around me but iwconfig does not configure the card (shows no errors either). Is it worth it to try this one or is my system too old ?

  34. Keihan says:

    hi
    that was great. thank you
    but i have a little problem.
    i had done everything u said.and when i execute modprobe rt3562sta my wireless works like charm.and even i blacklist the rt2800pci but when i reboot i have to do the modprobe rt3560sta again to wireless works.i want to know is there any knid of solution that i dont have to do the same every time i reboot.

  35. Pratik says:

    I’ve done
    lspci
    its shows
    04:06.0 Network controller: Ralink corp. Device 5360
    your prescribed method, not worked here
    help me on this, i cannot find driver for RT5360 chip
    I m using Fedora 17 64 bit
    Thanks

  36. juancarlos says:

    it doesn’t work for me on linux mint 13 (nor cinnamon or mate), it does see all the wireless network connections (that worked even before installing drivers), but for some reason, it can’t connect to my WPA protected network, it stays there for a while trying to connect, but after a few seconds it tells me the wireless connection could not be established

  37. Hi Steve! I’ve just upgraded today to Ubuntu 12.04 and this step-by-step guide to enabling my D-Link DWA-525 PCI Wireless Adapter and yes, it just works!!! At first, I was a bit worried that some unexpected glitches might be encountered during the process since Ubuntu 12.04 sports a new kernel version. I’ve followed this same procedure before on my Ubuntu 10.04 box a few months back and it worked like charm. It seems to me that D-Link DWA-525 Wireless Adapter don’t work out of the box in Ubuntu and I’m really very glad that you’ve come to write this easy to follow “How-to” article. Thanks man and I’m looking forward to your other interesting and helpful articles.

  38. makani says:

    in step 5,,how do i save and close the file??.give me an example
    this is where i am stuck;

    # Support Wpa_Supplicant
    HAS_WPA_SUPPLICANT=y

    # Support Native WpaSupplicant for Network Manager
    HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

    ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
    ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell

  39. Karthik says:

    Hi Steve, I’m struggling with my Dlink DWA 525 wireless card with Ralink RT5360. Please could you help me to make it work with Ubuntu 12.10. Thanks in advance.

      • Paul says:

        Hi, Steve! Thanks for your all above explanations, but I have the same issue which Karthik has (also it is Ubuntu 12.10 and DWA-525 wireless card Ralink RT5360).

        Rather often I have my WiFi connection just totally dissapeared.
        Sometimes after system restarts it appears again but not for the constant time.
        I did all the described steps to prevent it but it doesn’t work.

        Please, tell me how one could resolve such a problem?
        Maybe there are already some special updates or even patch for the DWA-525 RT5360 drivers?

        Kind regards!

  40. benji says:

    i am an ubuntu newbee – but am stuck at step 6 as i cannot work out which directory exactly to access in Terminal – and how.
    i have downloaded and unpacked the driver in a directory in my home folder – but cannot open it in terminal
    if i try to navigate to it in terminal with command line – “ls” shows the folder i want called “Downloads” but if i type “cd /Downloads/” i get “filename or folder does not exist”

    in the gnome folder browser i dont seem to have the option to simply click on it in folder and “open in terminal”

    obviously i am doing something simple wrong – be grateful for any help

  41. benji says:

    thanks for the help !
    still couldnt get into “downloads” instead moved the files into the “Home” directory
    was able to run the commands on them there
    got a WARNING message when i ran the modprobe command – but only to say i needed to have a “blacklist.conf.save” file – which i have – so seems OK
    other steps no issue
    wireless manager seemed a bit confused – so i just deleted all previous networks and rebooted teh machine
    working fine now
    tenda w322p pci card
    ubuntu 11.10 64bit

    thanks very much indeed!

  42. urpbl says:

    thanks, it worked for me in Ubuntu 10.04!
    but after updating to 12.04 wlan disappeared again. I tried to do this again but got make error 1277 Permission denied at step “make && make install”. What should I do to fix this?

    • Are you running that via sudo or as root user, or just normal user? The ‘make install’ step will try to put the built components where they need to go, so you need to have permission for those areas.

      • urpbl says:

        I can’t list output now. I’m at work.
        but commands was same
        sudo su
        lspci (I’m sure that it doesn’t need to do, because I already downloaded driver)
        cd /media/Streak/Downloads/wlan (renamed that long named folder)
        nano os/linux/config.mk
        those values was already set to ‘y’
        make && make install
        —- got error 127 with Permission denied
        make
        —- got error 127 with Permission denied again

      • urpbl says:

        Here the outputs of lspci and make && make install
        all commands was under root

        root@mycomp:/media/Streak_/Downloads/wlan# lspci
        04:04.0 Network controller: Ralink corp. RT3060 Wireless 802.11n 1T/1R

        root@mycomp:/media/Streak_/Downloads/wlan# make && make install
        make -C tools
        make[1]: Into folder `/media/Streak_/Downloads/wlan/tools’
        gcc -g bin2h.c -o bin2h
        make[1]: out of folder `/media/Streak_/Downloads/wlan/tools’
        /media/Streak_/Downloads/wlan/tools/bin2h
        make: execvp: /media/Streak_/Downloads/wlan/tools/bin2h: Permission denied
        make: *** [build_tools] Error 127

        now googling solution

  43. Nikolai says:

    I just installed a machine and put a 3.7 series kernel on it, the drivers for this card now seem to be in the main kernel tree. I would have to check the changelogs, but I suspect all 3.x kernels have support for it.

  44. Rajesh says:

    Hi Steve n Hi all,
    Did anyone get lucky with finding drivers for DWA-525 RT5360 drivers? I’m having the trouble finding the said driver.
    Regards
    Rajesh

  45. Mark says:

    Thanks for the post… I forget what brand of card but a new install of ubuntu 12.04 was using rt2800pci and only getting 3mbs. After installing the new driver I am now getting 10.2mbs which is what my windows laptop is also getting. Worked like a charm!

  46. Julien says:

    Hello,

    I have the DWA-525 RT5360. I followed the exact procedure having doubts it would work. The driver rt3562sta appears in my list. But as soon as I reboot it disappears. Also when I do a ifconfig wlan0 up, it says ”no such device detected” (or something like that, I am not home).

    So if someone has an idea…? Or found a way to install the 5360 card.

    Thanks a lot !

  47. Medusetfil says:

    Here you have the solution form 5360, with an updated hyperlink:

    Download http://www.mediatek.com/_en/07_downloads/01-1_windowsDetail.php?sn=5001 it to your desktop. Right-click it and select ‘extract here.’ It is handily a bz2.bz2 file, so you may have to ‘extract here’ a couple of times. Good work, Ralink! Now open a terminal and, with an internet connection, do:
    sudo apt-get install linux-headers-generic build-essential
    Open the folder you extracted and drill down to os/linux/config.mk and with a text editor change:
    HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
    Proofread, save and close the text editor. Now open the file os/linux/pci_main_dev.c with a text editor. After the line:
    {PCI_DEVICE(NIC_PCI_VENDOR_ID, NIC5362_PCI_DEVICE_ID)},
    Add this line:
    {PCI_DEVICE(NIC_PCI_VENDOR_ID, NIC5360_PCI_DEVICE_ID)},
    (the empty space before the text is made with the tab key)
    Everything before and after is unchanged. Spacing, punctuation, brackets, etc. are crucial. Proofread carefully twice before you save and close the text editor. Now back to the terminal:
    cd Desktop/2011
    Press Tab and the rest will fill in automagically. Press Enter.
    sudo su
    make (you will have to wait a few minutes probably till finishes)
    make install
    modprobe rt5390sta
    echo rt5390sta >> /etc/modules
    exit
    Your wireless should now be working.

  48. kthkr says:

    I recently got the dlink dwa-525 with the RT5360 chipset for an old P4-2.66 that i’m planning to set up as a media / xbmc / DVR server. I got it onto Ubuntu 12.10 and then followed these instructions. Works perfectly. One suggestion: doing ‘extract here’ from the GUI didnt really extract the archive properly, so instead i did it from the command line with a ‘tar xjvf 2011_xxx_xxxetc.bz2.bz2′. That seemed to extract the archive with no worries and all was hunky dory after that.

    Cheers for this, Steve !

  49. hobi says:

    Hi, great thanks for the tuto, installation phase when well, i rebooted the system but the driver is not loading, can you help?

  50. vishnu viswanath says:

    Thanks a loot. It worked for me aswell :) Had to restart twice before the old driver was actually blacklisted :)

  51. I plan to order 3 of these for new boxes we deploy in office. Seeing this scared me.
    About 3 years from the original post, and Ubuntu linux is not able to install driver of this??? Wondering…

  52. hiper says:

    Yo instale DEBIAN 7.6, busqué el firmware en los repostorios debian y los que están ahí no eran compatibles con mi “DWA-525″ busque información y no encontre mucho que me ayudará.
    Aquí descarga el controlador “Ralink” que necesitas. Al principio se me hizo complicado pero paciencia, lee el archivo “README_STA_pci” con detenimiento.
    http://www.mediatek.com/en/downloads/
    Al terminar de compilar e instalar reinicia.

  53. Pradeep Joseph says:

    Great work Thank you….
    It failed for me in my mint 13 at first the net work disconnected after a minute and after a few days of trial and error I fond that the wi-fi channel was the culprit.

    Login to router settings—change the channel to 11 and OK— every thing came back wonderfully.

    Again the druver was not loading at startup so after bootup I had to teload the driver using modprobe rt3562sta and I opened /etc/modprobe.d/ and edited modules —– EVERY THING FINE———

    FOR ANY ONE WHO EXPERIENCE SAME PROBLEM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s