Fixing wi-fi on Asus Eee PC 901 with Linux

I mentioned my annoyance that wi-fi with WPA encryption did not work on the Asus 901 Eee PC with Linux which I am reviewing. I later found that even a WEP connection, while it worked a bit, tended to drop out after few minutes. Worse still, the Asus repositories are messed up so getting updates is tricky.

I’ve managed to fix it. For the record, here’s what I did; though I can’t promise it will work for you; try it at your own risk. I should think there will be an easier way to install an updated driver soon.

One of the irritations about the repository problem is that attempted updates fill up your /dev/sda1. I wanted as much space as possible (without removing the recovery partition) so I reset the system with F9 on boot. Then I went into /etc/apt/sources.list and removed the default repositories, replacing them with these two:

deb http://xnv4.xandros.com/xs2.0/upkg-srv2 etch main contrib non-free

deb http://download.tuxfamily.org/eeepcrepos/ p701 main

(This is probably not a good arrangement long-term; but having the Asus repositories enabled right now makes it hard to install anything).

Then I did:

apt-get update

apt-get install build-essential

I also installed ksmserver and kicker to get access to the full desktop; but this wasn’t needed to get wi-fi working.

Next, I downloaded the latest driver source for the 901’s Ralink wi-fi card:

http://www.ralinktech.com.tw/data/drivers/2008_0708_RT2860_Linux_STA_v1.7.0.0.tar.bz2 (Update: don’t use this code – see Update 3 below).

Extracted it; then edited /os/linux/config.mk and changed:

HAS_WPA_SUPPLICANT=y

HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y – but see update 2 and update 3 below for the problems this caused.

I also removed –DDBG from WFLAGS

WFLAGS += –DCONFIG_STA_SUPPORT

In order to compile you need the kernel source. I adapted the instructions here. In essence, download the source from http://dlsvr01.asus.com/pub/ASUS/EeePC/701/Linux_Kernel_071127.rar, extract, install the deb, unpack the source in /usr/src, delete the .bz2 to save space, build the kernel with:

make oldconfig

make

(don’t actually install it), then create the following symbolic link:

ln -s /usr/src/linux-source-2.6.21.4-eeepc /lib/modules/2.6.21.4-eeepc/build

Now I was able to compile and install the ralink driver by switching to the RT2860 directory and typing:

make

make install

Wi-fi now worked with WPA; at least, it did on my second attempt after disabling native WPA supplicant support. I’ve also found it perfectly stable so far – much better.

Active wi-fi connection with WPA; a few numbers changed to reassure the paranoid

I’m happy now, but… what is Asus thinking?

I doubt the Eee brand would have ever taken off, except that the first 7xx releases made excellent use of Linux and open source applications to win people over; you did not even need to know that it was Linux.

Now we get this; the support for the 901 is dire; updates don’t work, the wi-fi doesn’t work properly, and the only fix I’ve found is a hack. Wi-fi is critical for a gadget like this, which is not much use without an Internet connection.

Together with short supply of the Linux version, this does suggest that Asus is keen to favour the Windows XP variant.

Update: I’ve made the binary (rt2860sta.ko) available for download here. Download includes RT2860STA.dat which goes in /etc/Wireless/RT2860STA. I guess we need an install script; I’ll have a go when I get a moment.

Update 2: Unfortunately I’m not quite there yet. If I compile with HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y then WEP works but WPA does not. If I compile with HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n then WPA works but (I now discover) WEP does not. Weird. I’m going to seek advice. If anyone wants the binary that works great with WEP but not WPA, let me know.

Update 3: Thanks to Ralink tech support I now have a fully working driver. I’ve updated the download above. The new code defines EEEPC_SPECIAL_SETTING and has some edits in common/mlme.c. It now works OK with HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y. Interesting point: the code is dated 15th July; which suggests that the problem was both known and fixed 2 and half weeks ago; it’s a shame nobody shared this with the community.

Update 4: I suggest you delete the old copy of rt2860sta.ko in /lib/modules/2.6.21.4-eeepc/rt2860 (if it exists).

PS: I’ve posted instructions for the binary install, with download links, here.

Technorati tags: , ,

100 thoughts on “Fixing wi-fi on Asus Eee PC 901 with Linux”

  1. Hello,

    I have problems with connections at my state library and it is an open unencrypted network, should I be looking at dl these new drivers. I have ZERO knowledge of linux, and very limited tech knowledge on how to even get into computer software. I mainly bought this to be a user, not a tweaker. I only wanted web access and word processing w the portability. And now , I am almost considering taking this thing back b’c it’s not doing what I thought it would.

    If i have no programming /tech experience, is this do-able, the above info is just baffling to me. It’s another language. I currently have a MAC OSX on my desktop, and thought the 901 would be as easy.

    Asus have said I need to get the library’s proxy server’s address, the library aren’t equipped with dealing with any tech issues, and sai they never have to give out proxy server addresses to anyone.

    When I am in the library . I have full strength signal (90-100%) and can even get into the library’s intranet, but cannot browse beyond that..

    can anyone help, PLEASE!?!

    Many thanks.

  2. oh, I have only just bought the 901 LInux, so it’s still got the stock Xandros on it. I’m not quite game to go wipe it and get Ubuntu at this stage, esp because I know it’ll be a time-consuming exercise, and I haven’t got the time right atm to be messing around with it. I’m meant to be studying not messing around with a new gadget.

  3. Hi!

    Thank you for your support and effort to try to fix WPA support on the EEE 901.

    I managed once to get it connected but with static IP with Adam’s kernel wwhich includes a version of your drivers.

    Apart from that I haven’t succeeded to connect it again. I get no response from the DHCP server of my router (USR 9108). Unfortunately, even if enter static IP I can’t get it connected.

    What is your recommendation and what drivers should I try to install?

    Thank you in advance,
    Theodoros Ch.

  4. This is my deamon.log
    Hope it helps.
    During the connecting procedure I can see from the router that the EEE 902 has associated and authorized successfully but it disconnects the moment it can’t get an IP.

    Oct 16 19:44:46 teodor-eeelaptop avahi-daemon[4843]: Registering new address record for fe80::222:43ff:fe24:694e on ra0.*.
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: [1224182714.637849] nm_device_802_11_wireless_get_activation_ap(): Forcing AP ‘TheGreeks’
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: User Switch: /org/freedesktop/NetworkManager/Devices/ra0 / TheGreeks
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: Deactivating device ra0.
    Oct 16 19:45:14 teodor-eeelaptop avahi-daemon[4843]: Withdrawing address record for fe80::222:43ff:fe24:694e on ra0.
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: Device ra0 activation scheduled…
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: Activation (ra0) started…
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 1 of 5 (Device Prepare) scheduled…
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 1 of 5 (Device Prepare) started…
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 2 of 5 (Device Configure) scheduled…
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 1 of 5 (Device Prepare) complete.
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 2 of 5 (Device Configure) starting…
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: Activation (ra0/wireless): access point ‘TheGreeks’ is encrypted, but NO valid key exists. New key needed.
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: Activation (ra0) New wireless user key requested for network ‘TheGreeks’.
    Oct 16 19:45:14 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 2 of 5 (Device Configure) complete.
    Oct 16 19:45:42 teodor-eeelaptop NetworkManager: Activation (ra0) New wireless user key for network ‘TheGreeks’ received.
    Oct 16 19:45:42 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 1 of 5 (Device Prepare) scheduled…
    Oct 16 19:45:42 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 1 of 5 (Device Prepare) started…
    Oct 16 19:45:42 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 2 of 5 (Device Configure) scheduled…
    Oct 16 19:45:42 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 1 of 5 (Device Prepare) complete.
    Oct 16 19:45:42 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 2 of 5 (Device Configure) starting…
    Oct 16 19:45:42 teodor-eeelaptop NetworkManager: Activation (ra0/wireless): access point ‘TheGreeks’ is encrypted, and a key exists. No new key needed.
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: sending command ‘INTERFACE_ADD ra0^I^Iwext^I/var/run/wpa_supplicant0^I’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: response was ‘OK’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: sending command ‘AP_SCAN 1’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: response was ‘OK’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: sending command ‘ADD_NETWORK’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: response was ‘0’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: sending command ‘SET_NETWORK 0 ssid 546865477265656b73’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: response was ‘OK’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: sending command ‘SET_NETWORK 0 proto WPA2’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: response was ‘OK’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: sending command ‘SET_NETWORK 0 key_mgmt WPA-PSK’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: response was ‘OK’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: sending command ‘SET_NETWORK 0 psk ‘
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: response was ‘OK’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: sending command ‘SET_NETWORK 0 pairwise TKIP’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: response was ‘OK’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: sending command ‘SET_NETWORK 0 group TKIP’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: response was ‘OK’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: sending command ‘ENABLE_NETWORK 0’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: SUP: response was ‘OK’
    Oct 16 19:45:43 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 2 of 5 (Device Configure) complete.
    Oct 16 19:45:44 teodor-eeelaptop avahi-daemon[4843]: Registering new address record for fe80::222:43ff:fe24:694e on ra0.*.
    Oct 16 19:45:48 teodor-eeelaptop NetworkManager: Supplicant state changed: 1
    Oct 16 19:45:48 teodor-eeelaptop NetworkManager: Activation (ra0/wireless) Stage 2 of 5 (Device Configure) successful. Connected to access point ‘TheGreeks’.
    Oct 16 19:45:48 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 3 of 5 (IP Configure Start) scheduled.
    Oct 16 19:45:48 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 3 of 5 (IP Configure Start) started…
    Oct 16 19:45:49 teodor-eeelaptop NetworkManager: Activation (ra0) Beginning DHCP transaction.
    Oct 16 19:45:49 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 3 of 5 (IP Configure Start) complete.
    Oct 16 19:45:49 teodor-eeelaptop dhclient: There is already a pid file /var/run/dhclient.ra0.pid with pid 134519072
    Oct 16 19:45:49 teodor-eeelaptop NetworkManager: DHCP daemon state is now 12 (successfully started) for interface ra0
    Oct 16 19:45:50 teodor-eeelaptop NetworkManager: DHCP daemon state is now 1 (starting) for interface ra0
    Oct 16 19:45:53 teodor-eeelaptop dhclient: DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 3
    Oct 16 19:45:56 teodor-eeelaptop dhclient: DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 7
    Oct 16 19:45:56 teodor-eeelaptop NetworkManager: Supplicant state changed: 0
    Oct 16 19:46:03 teodor-eeelaptop dhclient: DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 21
    Oct 16 19:46:06 teodor-eeelaptop NetworkManager: Supplicant state changed: 0
    Oct 16 19:46:06 teodor-eeelaptop last message repeated 2 times
    Oct 16 19:46:10 teodor-eeelaptop NetworkManager: Supplicant state changed: 1
    Oct 16 19:46:22 teodor-eeelaptop NetworkManager: Supplicant state changed: 0
    Oct 16 19:46:24 teodor-eeelaptop dhclient: No DHCPOFFERS received.
    Oct 16 19:46:24 teodor-eeelaptop avahi-autoipd(ra0)[8292]: Found user ‘avahi-autoipd’ (UID 105) and group ‘avahi-autoipd’ (GID 113).
    Oct 16 19:46:24 teodor-eeelaptop avahi-autoipd(ra0)[8292]: Successfully called chroot().
    Oct 16 19:46:24 teodor-eeelaptop avahi-autoipd(ra0)[8292]: Successfully dropped root privileges.
    Oct 16 19:46:24 teodor-eeelaptop avahi-autoipd(ra0)[8292]: Starting with address 169.254.4.63
    Oct 16 19:46:29 teodor-eeelaptop avahi-autoipd(ra0)[8292]: Callout BIND, address 169.254.4.63 on interface ra0
    Oct 16 19:46:29 teodor-eeelaptop avahi-daemon[4843]: Joining mDNS multicast group on interface ra0.IPv4 with address 169.254.4.63.
    Oct 16 19:46:29 teodor-eeelaptop avahi-daemon[4843]: New relevant interface ra0.IPv4 for mDNS.
    Oct 16 19:46:29 teodor-eeelaptop avahi-daemon[4843]: Registering new address record for 169.254.4.63 on ra0.IPv4.
    Oct 16 19:46:32 teodor-eeelaptop NetworkManager: Supplicant state changed: 0
    Oct 16 19:46:32 teodor-eeelaptop NetworkManager: Supplicant state changed: 0
    Oct 16 19:46:33 teodor-eeelaptop avahi-autoipd(ra0)[8292]: Successfully claimed IP address 169.254.4.63
    Oct 16 19:46:33 teodor-eeelaptop NetworkManager: DHCP daemon state is now 9 (fail) for interface ra0
    Oct 16 19:46:33 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 4 of 5 (IP Configure Timeout) scheduled…
    Oct 16 19:46:33 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 4 of 5 (IP Configure Timeout) started…
    Oct 16 19:46:33 teodor-eeelaptop NetworkManager: Activation (ra0) failure scheduled…
    Oct 16 19:46:33 teodor-eeelaptop NetworkManager: Activation (ra0) Stage 4 of 5 (IP Configure Timeout) complete.
    Oct 16 19:46:33 teodor-eeelaptop NetworkManager: DHCP daemon state is now 14 (normal exit) for interface ra0
    Oct 16 19:46:33 teodor-eeelaptop NetworkManager: Activation (ra0) failed for access point (TheGreeks)
    Oct 16 19:46:33 teodor-eeelaptop NetworkManager: Activation (ra0) failed.
    Oct 16 19:46:33 teodor-eeelaptop NetworkManager: Deactivating device ra0.
    Oct 16 19:46:34 teodor-eeelaptop avahi-daemon[4843]: Withdrawing address record for 169.254.4.63 on ra0.
    Oct 16 19:46:34 teodor-eeelaptop avahi-daemon[4843]: Leaving mDNS multicast group on interface ra0.IPv4 with address 169.254.4.63.
    Oct 16 19:46:34 teodor-eeelaptop avahi-daemon[4843]: Interface ra0.IPv4 no longer relevant for mDNS.
    Oct 16 19:46:34 teodor-eeelaptop avahi-daemon[4843]: Withdrawing address record for fe80::222:43ff:fe24:694e on ra0.

  5. So I tried both the WPA and WEP versions, no dice on my parent’s home network. Its WPA secured, and I get stuck at “pending”

    No problem finding the network, so hardware is working as it should, just can’t connect. Any ideas?

  6. I have tried both outlined in post 15 to no avail. I’m using a fresh EEE 901 with with BIOS 1603. I noticed on the ralink website that theres a 1.8.0.0. Has anyone tried to compile using that one yet?

  7. Guys. I have some news.

    I got sick of playing around with drivers so i started to play with my AP.

    Turns out the WPA key cipher was set to tkip. Changing it to Auto fixed everything.

    Hope this helps with someone.

  8. Tim,

    Thank you for all your work on this. I installed your version of the WPA driver on my 901 and it can now connect to my D-Link DI-514 AP, which is a great step forward.

    The only problem is that the AP has to be broadcasting its SSID for the 901 to find it, otherwise the WPA supplicant just keeps scanning indefinitely. I also note that iwconfig seems unable to set the SSID (it doesn’t produce an error – the command just seems to have no effect). I’m no expert on WiFi and I am wondering if these two problems are symptomatic of the same cause Has anyone else experienced this and found a way around it?

    SimonP

  9. Nope it did not work for me… after i did it i get a new error now the wifi wont even see the network it just sats unary operator expected line 195 line 198 line 201. i am not a newbie but this is not what i expect from asus i have just recommended it to all friends since we got of so well but now i am starting to doubt it… i have no idea what to do

  10. I was having “some” problems with connecting to some networks but now it doesn’t work at all – I too got too convinced that it would work or that it would just update the drivers… think twice next time as now it doesn’t work at all!

  11. What the hell is this pathetic device doing to our heads.It should state you need to be a programmer on the box to set this up to work.Asus should be ashamed of themselves to allow the 901’s to be sold while it’s most important application of networking was all over the place.I’m not wasting any more of my precious time on this fat useless nintendo joke.Please God send us a Macbook nano soon

  12. I told that the reason I cannot connect to my router is that my WPA passphrase contains spaces. I’m a Linux newb so before I start messing a around can you tell me whether this fix address that issue?

    I had the same problem with an old router and WEP when I first got the 901 last summer but I got round it then by typing the passphrase in hex… which doesn’t work with WPA.

    Like you Tim I wonder what Asus are thinking! As others have said this should work out of the box, we shouldn’t have to fiddle this much. Asus support have been hopeless, they don’t even seem to be aware that this is a known problem posted repeatedly on Linux forums! I realise that I could change the passphrase to one without spaces but spaces are implicit in the word passphrase and I don’t see why I should have to go around changing the settings on the 2 PCs, 3 laptops (incl a Mac) and 1 printer that are already accessing the router with no problems.

  13. Wow, so easy. The rt2860wep.tgz version works for WPA too. I’m running Ubuntu 8.10 Intrepid. You’re the man Tim!

  14. I’ve just received my 901 today and am having problems despite a Linux history back to V1.3.

    The device out of the box can see the access points, iwconfig & ifconfig look OK apart from a low datarate, but the signal level was 0% until I installed Tim’s new module. Now the signal level is 10% – my AP – a WG602 in WEP mode shows the 901 as disconnected all the time except when the 901 is off when the entry disappears. So as far as I can tell everything is OK but I can’t even ping the AP. I’ve had plenty of problems/experience with Linux wireless connections in the past which have all been resolvable but this is a puzzle.

  15. Got it working !

    Followed some clues from ifconfig & iwconfig for the 901 compared to my other Linux laptop and googled more specifcially.

    This link http://bbs.archlinux.org/viewtopic.php?pid=417599 gave me the info necessary to write a script to make the d*** thing work. Just altering the .dat file as suggested first did not work.

    Will explore this in more detail

    Many thanks for the great work on the module Tim

  16. P.S. WPA, WPA2, WPA2 Enterprise, WEP, and open, are all working correctly.

  17. P.P.S. I compiled against the 2.6.27-13-generic kernel. The eeepc kernel is missing kernel debugging and timer support, which means a lot of ACPI battery functions are not reported.

  18. Tim,

    I just wanted to say thank you. Post 15 is the real answer. I talked to ASUS tech support and searched the internet for 7 hours before finally finding this solution. Thanks, again.

  19. Hello,

    First – many thanks to Tim, and others, for all their efforts on this topic and making their advice and experiences available.

    I am running an Asus 1000 and have successfully connected using WEP in the past without problem. Today I started trying to connect with WPA…and the trials and tribulations of that are how I ended up on this site.

    Before I took the leap of seeing if post 15 could help me, I read through most of the other posts, and number 82 from Gorilla caught my eye. And I’m glad it did.

    I checked, and my WPA was set to TKIP by default. I changed this to WPA2-PSK (AES) in my internet wireless settings, edited my network settings accordingly on my Asus machine (using the graphical Network Connections window), et voila!

    So, making the rather large and hopeful assumption that this is a real fix, as opposed to a freak connection success, Gorilla’s suggestion may be a simple fix for some.

  20. Hi Ben,

    Thanks for this information, after a long search I finally got it working with the description in
    Ben Selinger
    March 4th, 2009 at 5:42 am
    I had no problems with version 1.8.0.0

    FYI, I used the latest 2010_01_29_RT2860_Linux_STA_v2.3.0.0.tar.bz2 instead, which I downloaded from http://www.ralinktech.com/support.php?s=2

    Kind regards

  21. Walter,
    Please, can you let me know the steps to install 2010_01_29_RT2860_Linux_STA_v2.3.0.0.tar.bz2.
    I’m new in Linux and I don’t know how I can install:
    I run the command make install but I had the folowing message:

    make -C /home/network/Share_SrvLnx/Network/2010_01_29_RT2860_Linux_STA_v2.3.0.0/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/network/Share_SrvLnx/Network/2010_01_29_RT2860_Linux_STA_v2.3.0.0/os/linux’
    rm -rf /etc/Wireless/RT2860STA
    mkdir /etc/Wireless/RT2860STA
    cp /home/network/Share_SrvLnx/Network/2010_01_29_RT2860_Linux_STA_v2.3.0.0/RT2860STA.dat /etc/Wireless/RT2860STA/.
    install -d /lib/modules/2.6.28-17-server/kernel/drivers/net/wireless/
    install -m 644 -c rt2860sta.ko /lib/modules/2.6.28-17-server/kernel/drivers/net/wireless/
    install: no se puede efectuar `stat’ sobre «rt2860sta.ko»: No existe el fichero ó directorio
    make[1]: *** [install] Error 1
    make[1]: se sale del directorio `/home/network/Share_SrvLnx/Network/2010_01_29_RT2860_Linux_STA_v2.3.0.0/os/linux’
    make: *** [install] Error 2

  22. dear sir i have wi-fi signal avilavile but not warking.everithing ok but receving 0

Comments are closed.