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. Thanks for simplifying everything in post #15. Am a total know-nothing at Linux, but was still able to follow your very clear directions in that post. wifi works great now. many thanks.

  2. Oh one question: the install worked, the new version of rt2860sta.ko is at /lib/modules/2.6.21.4-eeepc/rt2860 but there seems to be an older version at ro/lib/modules/2.6.21.4-eeepc/rt2860

    Is this because ro is the read-only directory that’s used when one does an f9 restore? If so, is there an easy way to replace it with the new one so when one does an f9 the new driver gets loaded instead?

    Thanks again.

  3. Tim and others,
    Thanks for all the excellent notes and guidance. I’ve got the STA driver up and running on my new 901. It works in open and WEP.

    BUT

    As a noob, I’ve no idea how to get PEAP working with this driver at my College. I’ve had a go with the clear walkthrough here (http://lug.wsu.edu/wireless/peap/eee) but I’m not sure if this driver will support PEAP.

    Any ideas?

    Thanks again

  4. Tim, Good job. After installing the new driver, my eee 901 wireless connection is very stable now.

    Thanks.

  5. Thanks Tim.

    I had annoying wifi drop outs since getting the 901 whihc I initially put down to relatively week signal. Found your advice via Google and now have had uninterupted wifi for 3 days.

    much appreciated.

  6. @Roger

    Use the same connection you used to post the comment 🙂

    USB sticks can be handy in this scenario.

    Tim

  7. I have an eee PC myself, and anyone who gets one I recommend you install eeeXubuntu and replace Xandros !

    It will save you a lot of hassle, and eeeXubuntu is way more secure than Xandros (Xandros is always super-user which I think is very insecure)

    WPA works under eeeXubuntu, and no unionFS or any other problems!

  8. I did install your patch, but it still don’t work, i made a backup /lib/modules/2.6.21.4-eeepc/rt2860.

    How can i undo your setup?

  9. How can i undo your setup?

    Copy the rt2860sta.ko file from the old folder to the folder you extracted from the download, then re-run the install script.

    Tim

  10. hi Tim-

    i am wondering if you contacted asus with this problem and if it is widespread?

    i just purchased a 901 last night and am having the same problem (connects to the wireless ap fine w/o encryption, but will not connect w/ wpa).

    i called asus and the tech help person said she hadn’t heard of the problem and if it persists i should exchange the machine.

  11. I did contact Asus but by the time they got back to me I had fixed it, albeit still not ideally.

    I believe the problem is widespread though I do not know if all models are affected. For the record, what model is your WPA wifi router or access point?

    Tim

  12. hi Tim-

    thanks for your reply (as well as for your initial post). i am using a linksys befw11s4.

    out of curiosity, what was asus’s reply to you regarding the problem?

  13. out of curiosity, what was asus’s reply to you regarding the problem?

    I said I had fixed it with code I’d received from ralink. Then we discussed the update problem and he said there was not enough space and that most users did not need to update. Later I discovered he was talking about XP SP3! So not very illuminating overall, sorry.

    Tim

  14. Thanks Tim!!! I’m among the many Eee owners who have experienced the annoying problem of the WiFi stopping after a few minutes. Although it’s no show-stopper, since it only takes a reconnect to repair the problem until the next reboot, it’s certainly a mild-to-major inconvenience (depending on your level of patience). After trying the various work-arounds suggested on numerous forums to no avail, I followed the instructions in post 15 and my Eee 1000 wireless WEP is now working flawlessly–plus I now get instant connect at login instead of a 15-30 second wait.

  15. Many thanks, Tim, for your excellent instructions in post #15. As a newcomer to linux they looked scary, but it was a very straightforward process and it’s cured my WEP connection problems.

  16. I just installed the updated Ralink driver (30 minutes ago) and all of the wireless hijinks have ceased. I can shut the system down, turn it back on and it connects to the network (WEP encryption). In the past this connection was good for about 5 minutes and then, while still connected to the AP, internet access was dead. I would have to bring up “NETWORK” and force “RECONNECT” after which it would connect and stay connected until shut down. Thanks Tim, this is a real improvement. Now if we can just get Asus to stop messing with the OS setup. They fixed the on-again-off-again file manager but managed to migrate most of the INTERNET menu to FAVORITES, go figure. Maybe it’s just my 901! Thanks again, fine work!

  17. Hello, Sorry to be a pain, but I tried the instructions above and got as far as the sudo./install bit.
    I got the following error message:
    bash: sudo.i/install.sh: no such file or directory

    Unfortunately I know nothing about linux (or any other system) – can anyone help? Thanks for any assistance

  18. Yes, typed that exactly. Just tried again and cp:cannot create regular file ‘/etc/wireless/RT2860STA/.’: No such file or directory.

    Any ideas?
    Many thanks for your help
    Bryan

  19. Tim,

    Thank you for posting the patch & install script. I successfully went through it all brand new eeePC 901 but have no luck with my home wifi WEP network.

    When trying to connect the log shows a few DHCPDISCOVER attempts and then NO DHCPOFFERS

    Of course it works with non-secured access points.

    I have a native windows network XP & VISTA machines + Linux NAS (hacked MBW) on the wireless netwok by HPNA (Argon 432 ADSL-A/2/HPNA/WG) – any suggestions??

    Thanks!

  20. Thanks for the updated driver, however I cannot get it to successfully link to my University’s WPA APs. I did set up a wpa_supplicant.conf that works OK on a 701, but when I compare the output from wpa_supplicant it looks as if it is breaking on the 901 here:

    wpa_driver_wext_set_countermeasures
    ioctl[SIOCSIWAUTH]: Operation not supported
    WEXT auth param 4 value 0x0 – wpa_driver_wext_set_drop_unencrypted
    Setting scan request: 0 sec 100000 usec
    Using existing control interface directory.
    Added interface ra0
    Daemonize..

    …so although it then goes on to complete the connection, its impossible to get an IP address. Any idea if the set_countermeasures command is supported in the driver (or hardware)?

Comments are closed.