krish – 起死回生 [Wake up from death & return to life.]

April 6, 2011

Wi-Fi on HP dm1

Filed under: GNU/Linux — krish @ 8:56 am
Tags: , , , , , , , ,

Alright guys, so I got the HP dm1(AMD Fusion) and cancelled the Lenovo Thinkpad x120e that was ordered in US, for many strong reasons that I’ll blog up later.

The HP dm1 comes with Ralink wi-fi card which most of the current Linux distros do not identify out of the box as of now / end up probing the wrong driver.

This is how to get your wi-fi up on the hp dm1
(as well as other new laptops with Ralink cards; just get the correct driver that matches your card )
Note: This was done on Ubuntu 10.04 – 64bit

1. Update your distro. 10.04 needed update to newer kernel 2.6.30 and headers for drivers to compile
krish@shenron:~$ sudo apt-get upgrade

2. Check the model of your ralink card (Mine shows 539x series which is a Wi-Fi, Bluetooth Combo)
krish@shenron:~$ sudo lspci | grep -i 'network'
02:00.0 Network controller: RaLink Device 539f

3. Go to ralink website -> Sofware -> Linux and Download the driver that matches your card version.

4. Unzip the package
krish@shenron:~/Downloads$ unzip

5. Change configuration
krish@shenron:~/Downloads$ cd 2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/

krish@shenron:~/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux$ sed -i 's/HAS_ANTENNA_DIVERSITY_SUPPORT=n/HAS_ANTENNA_DIVERSITY_SUPPORT=y/'

krish@shenron:~/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux$ grep ANTENNA_DIVERSITY

6. Build
krish@shenron:~/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux$ cd ../../

krish@shenron:~/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO$ sudo make

7. Install if Step 6 was successful with no errors; else start fixing your config again 🙂
krish@shenron:~/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO$ sudo make install

8. Make your correct card number to be probed ( Use your card model here, mine is rt5390sta )
krish@shenron:~$ sudo echo "rt5390sta" >> /etc/modules

9. Blacklist wrongly probed ralink drivers – Ubuntu 10.04 probed this bluetooth module
krish@shenron:~$ sudo echo "blacklist rt2800pci" >> /etc/modprobe.d/blacklist.conf

10. Reboot
krish@shenron:~$ sudo shutdown -r now "Yay!"

11. After the machine is up again, check for ra0 interface
krish@shenron:~$ sudo ifconfig ra0 | head -n2
[sudo] password for krish:
ra0 Link encap:Ethernet HWaddr 90:00:4e:1a:76:e6
inet addr: Bcast: Mask:

Wolah, you’re connected and free to move away from the computer table on to the couch for some lazy working style 😉


  1. good job. keep it up.

    Comment by manish — April 6, 2011 @ 2:08 pm

  2. Hi Krish, Thanks for the post, by far the most complete for a complete noob like me but…step 6, Build was fine no errors, just a few minor warnings. Step 7, make install was also fine. However, when I got to step 8, the system returned that I didn’t have permission to do so, the same was true when I attempted step 9 blacklisting. i’m using Ubuntu 10.10 64bit. Anyway, after a reboot the network manager finally could see my router and requested the key which I duly entered. I should have known better that to get too excited as the system just hangs when trying to reboot and I’ve managed to get no further. i hope you can help because of all the posts I’ve found on this subject, you are the only person who has given clear step-by step instruction for newbies like me to follow. Thanks, Frank

    Comment by Frank — April 11, 2011 @ 12:26 am

  3. @Frank:

    1. Did you use “sudo” from step 6 as shown.
    2. Even step 8 and step 9 needs to be done as sudo because unprivileged user will not have access to write to configuration files.
    3. Paste me the commands that you used along with errors to das dot srikrishna at gmail dot com

    About reboot, do you own an HP dm1? .. Ubuntu seems to have problems on reboot with hp dm1. Mine gets stuck too. Haven’t found time to fix it.
    The quick fix is to use shutdown and then manually jack the power button instead of using the reboot; for now 😉

    Comment by krish — April 11, 2011 @ 10:04 am

  4. Hey Krish,

    I have the exact same card as you and managed to install, I can see the wifi networks but cannot connect to any of them. Can you please send the file you use? I’m on 11.04 but I think it’s the config and not the Ubuntu version. I am really desperate so this would help 🙂

    Comment by kaya — May 17, 2011 @ 3:00 am

  5. @Kaya

    Did you run a “make install” .. it does a dep mod and creates more files which get used.
    Sending you the on your email though 🙂

    Comment by krish — May 17, 2011 @ 9:41 am

  6. Good night: I have a trouble in step 6.

    root@cmarzuzadebian:/home/cmarzuza/Descargas/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO# sudo make
    make -C tools
    make[1]: se ingresa al directorio `/home/cmarzuza/Descargas/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/tools’
    gcc -g bin2h.c -o bin2h
    make[1]: se sale del directorio `/home/cmarzuza/Descargas/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/tools’
    cp -f os/linux/Makefile.6 /home/cmarzuza/Descargas/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/Makefile
    make -C /lib/modules/2.6.32-5-686/build SUBDIRS=/home/cmarzuza/Descargas/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux modules
    make: *** /lib/modules/2.6.32-5-686/build: No existe el fichero o el directorio. Alto.
    make: *** [LINUX] Error 2

    Thank’s for your help.

    Comment by CMauricio ArzuzaLinares — June 21, 2011 @ 9:07 am

  7. You are missing kernel headers.

    If on debian/ubuntu, use
    sudo apt-get install linux-headers-`uname-r`

    I had them installed already due to other packages,
    krish@shenron:~$ apt-cache policy linux-headers-2.6.32-31 | grep Installed
    Installed: 2.6.32-31.61

    Comment by krish — June 21, 2011 @ 3:37 pm

  8. I’m using ubuntu 10.04 64bit and it works great on my HP dm1. Thank you very much

    Comment by emitor — July 16, 2011 @ 9:16 pm

  9. I’m glad I could help 😀

    Comment by krish — July 17, 2011 @ 12:18 am

  10. When I grep for ANTENNA_DIVERSITY, there are no results. Could you post your file here?

    Comment by Jonah Bron — September 24, 2011 @ 7:12 am

  11. Could you me your

    krish@shenron:~/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO$ grep ANTENNA_DIVERSITY os/linux/

    Comment by krish — September 24, 2011 @ 10:55 am

  12. Hello All,

    I am new to the Ubuntu 11.4. I have HP pavilion G6-1b60us can not get the wireless working Please help
    thank you

    Comment by nghi tran — October 8, 2011 @ 8:15 am

  13. @nghi tran, the easiest way to get WiFi is to do an early upgrade to 11.10. See my blog post about it.

    Comment by Jonah Bron — October 8, 2011 @ 9:43 pm

  14. jeffrey@jeffrey-Dv6-Linux ~/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO $ sudo make
    [sudo] password for jeffrey:
    make -C tools
    make[1]: Entering directory `/home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/tools’
    gcc -g bin2h.c -o bin2h
    make[1]: Leaving directory `/home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/tools’
    cp -f os/linux/Makefile.6 /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/Makefile
    make -C /lib/modules/2.6.38-8-generic/build SUBDIRS=/home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux modules
    make[1]: Entering directory `/usr/src/linux-headers-2.6.38-8-generic’
    CC [M] /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/rtmp_mcu.o
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/rtmp_mcu.c: In function ‘RtmpAsicSendCommandToMcu’:
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/rtmp_mcu.c:463:4: warning: passing argument 3 of ‘pci_read_config_word’ from incompatible pointer type
    include/linux/pci.h:736:19: note: expected ‘u16 *’ but argument is of type ‘INT *’
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/rtmp_mcu.c:482:4: warning: passing argument 3 of ‘pci_read_config_word’ from incompatible pointer type
    include/linux/pci.h:736:19: note: expected ‘u16 *’ but argument is of type ‘INT *’
    CC [M] /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.o
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.c:679:2: warning: ‘enum tx_power_setting’ declared inside parameter list
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.c:679:2: warning: its scope is only this definition or declaration, which is probably not what you want
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.c:678:29: error: parameter 2 (‘Type’) has incomplete type
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.c:676:12: warning: function declaration isn’t a prototype
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.c:1355:2: warning: initialization from incompatible pointer type
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.c:1378:2: warning: initialization from incompatible pointer type
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.c:1379:2: warning: initialization from incompatible pointer type
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.c:1380:2: warning: initialization from incompatible pointer type
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.c:1381:2: warning: initialization from incompatible pointer type
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.c:1388:2: warning: initialization from incompatible pointer type
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.c: In function ‘CFG80211_SupBandInit’:
    /home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.c:2594:2: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’
    make[2]: *** [/home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/cfg80211.o] Error 1
    make[1]: *** [_module_/home/jeffrey/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.38-8-generic’
    make: *** [LINUX] Error 2

    I am getting this, did everything correct for step 1-5. What is the error? Thanks.

    Comment by Jeffrey — October 29, 2011 @ 7:42 am

  15. […] first, my Wi-fi had issues with Ubuntu, which I fixed and blogged here – Now, speakers screwed up.. which I can’t […]

    Pingback by Bluetooth on HP dm1 « su -c ‘rm -rf /mnt/proprietary’ — November 13, 2011 @ 3:37 am

  16. Not everyone wants to update to 11.10.. few of us stick to LTS for pretty sane reasons that we dont go install distro every 6 months. 🙂

    Comment by krish — November 13, 2011 @ 3:32 pm

  17. you are the best one!


    Comment by Nico Melgarejo Sabelle — February 1, 2012 @ 12:17 pm

  18. I get this message when I try to issue the command sudo make:

    make: *** /lib/modules/3.9.0-030900rc8-generic/build: No such file or directory.

    Comment by Jason Smith — June 1, 2013 @ 11:02 am

RSS feed for comments on this post. TrackBack URI

Please leave a Reply / Discuss this topic here :)

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

Blog at

Rough Draft

by Atteris Amarth and Darrek Ringo

The Kochi Post.

Read by all + Influenced by none


A signature of Kiran


This blog is just for additional and extension share of it's main frames. No activity is planned from here

krish - 起死回生 [Wake up from death & return to life.]

Get a sneak peek into krish's life, work and passion. is the best place for your personal blog or business site.

A Tale of Two and a Half

Monika Amita Bakshi

%d bloggers like this: