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. hi..

    Thanks for the driver, WEP now works fine for me with my NETGEAR wgr614 router, was running unencrypted upto now. I had to run your installation script twice though.. and also reboot

    PB

  2. hi… thank you very very much for your job 😉
    my results:
    -original drivers: only working with unencrypted networks
    -your wep driver: working with unencrypted, wep and wpa networks 🙂
    -your wpa driver: working with unencrypted and wep networks (not with wpa)

  3. Hello,

    well, I have followed the instructions to the letter, and have had no error messages.

    My 901 still doesn’t connect 🙁 (similar to post 47)

    The new driver has not seemed to make any difference at all – I do not get an offer of a lease from the modem, and I have tried it both at home and in the office where we have another type.

    Strangely, and I have no idea why, if I set up the static address, it will connect to the modems, but it doesn’t get out any further – it is as though it cannot find the DNS, but that is not the case.

    Can I post any error log etc. which might help pinpoint the problem? It seems that this is almost a system-wide error with eees, when I read the posts.

    Kind regards

  4. So I had some time to tinker today and solved my problem with WEP by manualy configuring the driver:-

    iwpriv ra0 set AuthMode=SHARED

    Hope this helps

    -Alan

  5. I’ve eventually got mine working too, using the WEP version of the driver, it connects to WPA Enterprise and unencrypted sites OK. But I d have difficulty getting an IP address, especially when moving from one site to another. This looks like some problem with DHclient (since other laptops connect to these routers without difficulty). I’ve observed that the link may go into ‘pending’ mode for several minutes before it gets an IP address successfully for the first time(and sometimes it does not get an IP address). I’ve noticed that going closer to the AP can help. Despite that overall range of the wifi caard is about the same as for other laptops, including a 701.

  6. Alan

    I’ve got the same problem with my 901:

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

    Where do you run the command:

    iwpriv ra0 set AuthMode=SHARED

    Sorry first time using Linux.
    Thanks
    Cris

  7. Cris,

    Assuming you are running a WEP encrypted wifi with a shared key – here’s what I did
    1) First intsall the new package per Tim’s instructions above & restart your WIFI
    2) Open a console by pressing Ctrl-Alt-T
    3) Type in the command line as a “su” or by prefixing with sudo

    FYI – set up my 901 with a static IP address but it works with DHCP – the issue is to get it to speak with the encrypted WIFI AP/modem. and the existing driver sets the mode to OPEN and lacks i/f to change the setting

    -Alan

  8. Alan

    Initially didn’t work, however got it working by playing around with the Wireless connection, disconnect, re-connect, etc…

    However when I reboot the setting seems to be lost, and seems to revert back to its default. How can I set this setting permanently for this wireless connection?

    Is there a boot up script I can place this setting in?

    Regards
    Cris

  9. I downloaded the wep version (rt2860wep.tgz above) onto my Linux eeePC 901, which was intermittently losing the wireless signal and needing to restart the network connection. That was about a week ago and it hasn’t dropped the signal once since. Thanks very much for this fix!

  10. Tim, Thanks for this.
    Installed the WEP version and it works fine for me. No problems. Better support than ASUS! What’s the point of delivering a device with its main function broken? Cheers, Paul.

  11. Tim, thanks heaps for the advice and the new driver. Had spent hours on it previously trying to get WPA to work. Now works like a charm on my 901.

  12. Tim, tried the drivers above on both WEP and WPA, but no joy – wouldn’t even work with encryption switched off, SSID being broadcast and completely open access :O …

    Until I decided to set the IP address as Static instead of DHCP – then it all seems to be working now (on WEP anyway – I’ll try WPA later once I’m confident it’s all working).

    I’m using a Draytek Vigor 2800 router, but all other Wireless devices seem to work okay with this router, so minimal chance of there being problems there.

    Looks like Asus have shot themselves in the foot here – a netbook with it’s wireless broken seems pretty much an own goal. I’m assuming that they think anyone going for the Linux version is a geek and will work out what’s wrong with it anyway 😀

    Anyway, thanks for putting up your new driver and some info about this – it gave me some good pointers on how to get this working…

    Thanks.

  13. Tim:

    i’ve been using one of your earlier efforts, for wpa, for some weeks (since mid August, at least) and it’s been FINE.

    Until Asus issued their new ralink driver update for the 901/linux. I’ve REFUSED to allow it to install, but since it was downloaded the system asks me, at every boot, if I want to install it–TWICE. I always say NO.

    but something has “gone bad” since then. the other day the file /etc/network/interfaces was hosed (I was able to manually patch it up).

    Today it doesn’t appear to be hosed, but I can’t connect to WPA at work (it was fine, last night, at home on WPA). I keep getting the error “Unable to determine interface to use. (lanservice.cpp: 574)”

    As a result and as an experiment I’ve downloaded your latest WEP and WPA binaries, installed the WPA one and it hasn’t changed a thing.

    I also note that neither depmod nor a reboot is actually loading the rt2860sta.ko module. Loading it manually (with lsmod) doesn’t help the problem at all. Neither did rerunning the depmod command that’s in the istaller script you provided.

    Suggestions? Thanks in advance!

  14. [later]…
    actually, I was wrong about one thing: after a reboot the rt2860sta.ko IS being loaded automatically. But I still get the same error message when trying to bring up the WPA connection here at my office.

  15. Hi out there,

    just got my 901 shipped the other day. Nice deeevice..Anyway.
    Booting it up, i connected right away to an open access point. The 901 downloaded some updates (lately including the ralink_WLAN_patch 1.7.1.1. 2008-10-02, and the 1301 bios).
    I must admit, i’m new to linux, and without notifying any issues the first time, i didn’t follow the whole update process with much attention.
    Now, i want to set up my local network, one with my XP laptop connected to internet via cable modem, sharing internet connection over wifi ad-hoc to the linux-dEeevice.
    At the point where i am (still unable to get a valid IP through DHCP on the dEeeevice) found this blog, and my head starts to hurt…
    I’m following this M$ guide

    http://www.microsoft.com/downloads/details.aspx?FamilyID=fac8708e-3762-4e78-b372-8404eeb7f41a&displaylang=en

    to set things up, but i can’t confirm, that i have them set up correctly, or not – obviously (?) issues on 901 wireless.

    My question is, with the latest 1.7.1.1. ralink _patch and the 1301 revision bios (not sure, if the last one HAS something to do with wifi) am i ready and set to connect 901 to the ad-hoc wLan?
    or should i try to install one of these binaries posted here? which one should i start with?

    and while i’m here, maybe somebody could confirm i have the XP set up right…
    three IPs. two on XP ‘a’-‘b’, and one on Linux ‘c’

    ‘a’_got DHCP, connecting to internet via ethernet, ICS enabled.
    ‘b’_got static, ip 192.168.0.1 – subnet. 255.255.255.0 – no gateway, no dns
    ‘c’_got static, ip 192.168.0.2 – subnet. 255.255.255.0 – no gateway, no dns

    i tried setting ‘b’s gateway to the ‘a’ dynamic IP (obviously this will change time to time, boot-to-boot), setting ‘c’s gateway to ‘b’s IP…
    if i set my 901 wifi to DHCP can’t get connection (pending), if i set it to static, it gets to connect (at least in the Network panel) but the wireless icon on the bottom says ” ” and “10% signal” right under the empty line where the name of the SSID should be(?), but PING-ing doesn’t transfer no packets.

    sorry for the complexity and size of the post-o-problem, any help would be appreciated!

    thanks.
    d.

  16. @csakDúk

    OK, you have:

    Laptop with XP
    Cable modem

    and now you want to connect the Eee to the network and Internet.

    Solution: get a wireless router. Connect it to the cable modem with an ethernet cable. Connect your other two machines to the router either wireless or wired.

    This is much easier and more reliable than messing around with XP internet sharing.

    Tim

  17. Thanks Tim, for the quick reply…
    have asked an IT friend of mine, told me the exact same thing…but for now, this isn’t the solution i was looking for, nor an option.
    So, people of the NET, any help about this setup-topic would be much appreciated, still!

    Easier, cheap? Probably.
    But hey, why spend even one cent, if i’ve got EVERYTHING (minus the knowledge) just right under the hood?! I mean, someone could spend some extra cash and change the wifi antenna for a better working one, without driver issues, right?!

    What’s Your experience with the radlink_wlan_patch.1.7.1.1?
    Or You still got this hotfix of Yours installed? (post #5, or #15?)
    Which BIOS You’re using? (does it have anything to do with the wlan issue?)

    And what about these drivers, i have installed? Should the wifi work on an OPEN ACCESS POINT, without any encryption? Or the asus drivers can’t connect to NO AP (open-WPA-WEP)?

    cheers Tim,
    d.

  18. another follow-up on my postings from yesterday…

    the WPA driver works fine on my WPA2 at home. It does not work at all on WPA1 at the office, giving the error message shown in yesterday’s posting (“unable to determine interface to use…”).

    The WEP driver conects to and appears to work with the WPA1 router at work. Go figure.

    NEITHER one of them will connect to the neighbor’s unencrypted wlan. Before I started having this trouble I used what I think was an earlier binary of tim’s that worked fine on both home and office WPA as well as the neighbor’s unencrypted wlan. (I had never tried it with a WEP wlan.)

    I’m planning to travel in a few weeks and it would be very nice if I could get it working, once again, on unencrypted wireless networks such as hotels have.

    Anybody have any thoughts on this?

    Thanks!

  19. to: fredex @ #71

    i got this afternoon the ASUS BIOS update of today, it’s version 1603.
    Had no time to dig deeper into linux though, so i still have the official ASUS updated ralink_WLAN PATCH-1.7.1.1 (dated 2008-10-02) installed. Have tried to connect again to an unsecured/open wireless AP (this time it isn’t the ad-hoc i was trying to set up these days, this one is infrastructured), and guess what, have a stable connection.

    Matter of fact, i didn’t install any of the drivers posted in this blog, because i still can’t find my way through all these partitions, with all these ‘mirrors’ of files (me a linux lamer)…and didn’t found the right one to make the backup of (and WHERE to copy it). By the way…do somebody know a good place to start with it (Google search)?

    This means that i STILL miss something in the setup of that d@rn ADHOC wlan connection of mine…will try to start from an open infrastructured one ASAP – and maybe i give the control to the Manufacturer Drivers of wifi. Could it be more functional than the sp2 driver?

    d.

    ps: 1603 – just got yesterday’s jam!

  20. to: Tim @ root

    messed up big time on that html embedded last post-o-mine…probably the syntax, missing the closing tags.
    previewing the post, it’s missing all the correct hyperlinked words.

    these are:
    – for the ASUS BIOS – “1603” :
    http://update.eeepc.asus.com/bios/901-ASUS-1603.zip
    – the good place to start with it (“linux-partitions”) :
    http://www.google.es/search?hl=en&q=linux%2Bfile%2Bsystem&btnG=Search

    and another strange suggestion starting the last paragraph, namely “Tim might mod this part, because maybe it’s out of the scope of this blog, but…” This means that i STILL…
    (odd joke of xml-tag-stile-embedding this paragraph between this sentence – sillyme)

    meaculpa.

    it’s up to You now, correct it or delete it!
    Thanks – and beg Your pardon,
    d @ #72-#73

  21. csakDúk
    Sorry, I have zero experience in connecting a laptop to an adhoc network.

    You could try opening a terminal, doing “sudo sh” (which leaves you with root privileges, so BE CAREFUL WHAT YOU DO), then type /etc/cron.daily/find which will update the database used by the ‘locate’ command. when that’s done try doing “locate -i rt2860 | ls -ld” without the quotes. it should show you all files/directories with rt2860 in their names. one of them should be the “original” one you want to back up before installing Tim’s drivers. when done with the terminal either close it or type exit twice.

    Tim
    one more data point, as a follow up to my postings over the last day or so:
    the binary labeled as “wep” works fine on the WPA1 network at work AND my WPA2 PSK with AES at home. It APPEARS to be the same as the one I was using previously, before the lan at work suddenly went wonky on me (or at least connecting to it did) the other day.

    I cannot even pretend to understand why things went bad, or why what appears to be the same driver now doesn’t want to work on the neighbor’s open network. (in this case, it never sees a response to its DHCP requests).

    Clues?

  22. @fredex

    Yes, the binary labeled as “wep” should work with WPA as well; it just happens not to on my access point. Things have moved on in that there are now more recent drivers, so you could also try using the latest.

    Tim

Comments are closed.