Installing a driver on linux...

npsken

Member
Nov 24, 2007
38
0
61
I'm looking to start using linux as my primary OS (Ubuntu 7.10),
and before I was finding it pretty simple to use; however, my onboard ethernet crapped out and I had to get a wireless card (I was planning on moving this computer far away from the router anyway). Installing the wireless card on windows is simple, just install from the cd that came with it.

But now I can't use internet in Ubuntu, so I asked if a linux driver existed. It turns out that there is one, but I have no clue where to begin (my only real experience compiling anything is in DEV-C++).

If anybody here could help me install this card on ubuntu, that would be great.

I've also read about an alternative involving copying the driver from windows and using NDISwrapper. I would need this to work with WPA.

The build instructions are as follows:
1> $tar -xvzf DPB_RT2860_Linux_STA_x.x.x.x.tgz
go to "./DPB_RT2860_Linux_STA_x.x.x.x" directory.

2> In Makefile
set the "MODE = STA" in Makefile and chose the TARGET to Linux by set "TARGET = LINUX"
define the linux kernel source include file path LINUX_SRC
modify to meet your need.

3> In os/linux/config.mk
define the GCC and LD of the target machine
define the compiler flags CFLAGS
modify to meet your need.
** Build for being controlled by NetworkManager
Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y'.
** Build for being controlled by WpaSupplicant with Ralink Driver
Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n'.

4> $make # compile driver source code

5> $cp RT2860STA.dat /etc/Wireless/RT2860STA/RT2860STA.dat
# !!!check if it is a binary file before loading !!!

6> load driver
#[kernel 2.4]
# $/sbin/insmod rt2860sta.o
# $/sbin/ifconfig ra0 inet YOUR_IP up

#[kernel 2.6]
# $/sbin/insmod rt2860sta.ko
# $/sbin/ifconfig ra0 inet YOUR_IP up

7> unload driver
$/sbin/ifconfig ra0 down
$/sbin/rmmod rt2860sta
 

QuixoticOne

Golden Member
Nov 4, 2005
1,855
0
0
I don't have ubuntu running, nor do I have a NIC with your chipset, but I did see these links which may help:

http://sudan.ubuntuforums.com/showthread.php?t=683085
http://ubuntuforums.org/showthread.php?p=3416736
http://ubuntuforums.org/archive/index.php/t-557967.html
http://belfastgeek.net/category/ubuntu-linux/page/9/

Basically it seems like there's an option to use the Windows NDIS driver binaries with NDISWRAPPER softeare.

There seems to be another option, to port/compile the Ralink driver source code to Ubuntu (or find someone who has done that and packaged it or better documented the process).

People report success with the NDISWRAPPER approach; it is simpler than trying to port the driver source code yourself as long as you can extract and copy the right binary driver files for windows for use with your LINUX system. I imagine NDISWRAPPER is a package that you could just find / install for your current kernel version if you're running a commonly used kernel and haven't done any modifications to it yourself.

I believe you'll also need WPA SUPPLICANT which is a package or a part of a package for your UBUNTU. You'll probably want the latest one that matches your kernel.
In any case you usually use this (even if indirectly) to get WPA mode to function. Maybe I'm wrong, though, with UBUNTU, you might already have this, or there might be another package that does this for your system.

You may also want the latest NetworkManager package since that gives you a somewhat easier to use GUI tool to monitor wireless networks and select to connect to them. It isn't applicable to all lower level wireless drivers but it is pretty common. It isn't strictly necessary in that you could configure the wireless link (given drivers for your NIC) manually with the text configuration files etc. but that is not so easy if you have a GUI alternative that works.

I'd consider asking on the UBUNTU forums since you're more likely to find someone who has done this or who can tell you of a repository where you can download the right packages already built for your kernel and configured for UBUNTU.

I highly suggest leaving the system connected to the internet somehow until you can get the wireless drivers working since you'll probably be downloading several things like the NDIS driver files, possibly downloading / installing things you may or not have the current version of installed now like NetworkManager, WPA Supplicant, NDISWrapper, kernel updates, kernel header packages, etc. If you can borrow a USB Wired Ethernet NIC or PCI ethernet NIC or something that is easier to get working, it'll help.

If you can't find a "how to" guide for your NIC model, or a prepackaged driver set, then perhaps you could also consider trying to trade your existing wireless lan NIC for another model that is already supported directly by a driver in your LINIX distribution. It'll probably save a couple of hours or more of your time in trying to get this working if you had a "plug and play" solution.

Keep your data backed up, it isn't super unlikely you could crash the system a few times if you get into loading various new drivers into the system for not very well supported hardware, and sometimes data can get lost in such a crash.

If you want to throw more money at the solution, you might consider getting some wireless access point like the WRT54GL (the L being important -- the 'LINUX' model) for which you can replace the existing Linksys firmware with third party firmware like DD-WRT. Then you can fairly easily configure the access point to act like a CLIENT of your existing access point and then you only have to plug your LINUX system into the client mode AP with wired ethernet and use DHCP and it'll be online with WPA without having to worry about USB wireless drivers or NetworkManager or WPA supplicant etc. Of course you'd need a new WIRED ethernet NIC to do that, but you can get one of those that will work plug and play with UBUNTU on a PCI card for like $6 or something at places like Outpost.com, SVC.COM, Newegg.com, directron.com, monoprice.com, etc.
Several USB to *wired* ethernet cards also work "plug and play" with UBUNTU. But not all wired NICs are compatible, so check for compatibility before considering buying one.

Anyway start off getting on the ubuntu forums and asking for a more specific "how to" from someone who has gotten your exact model / chipset / version of WLAN NIC working. Maybe one of the people who have done it can send you a driver package for your kernel or firmware set for NDISWRAPPER use if that will help.

And figure out an easy way to copy files / packages to your UBUNTU box so you can install / build / whatever. Ideally if you're going to build anything yourself that is kernel dependent you should update to the latest stable kernel before doing the build since drivers tend to only work with one kernel version so you'd need to repeat most of the process of making a driver module whenever you do upgrade kernel versions. It is no big deal and takes about ten minutes once you've done it once and know how to do it, but there's no point in wasting time on doing it twice in the near future if you can upgrade first.

Actually IIRC some of the 2.6.24.xxx and even later 2.6.23.xxx kernel updates were reportedly inclusive of better wireless driver support. It is not impossible that if you just update to the newest kernel it could already have better driver support for your WLAN NIC.

MadWifi had some WLAN NIC drivers for various LINUX versions too, though I'm not sure if that's applicable to your hardware and version of UBUNTU, maybe just the driver / WPA Supplicant / NetworkManager is better. Ask someone who's done it.

 

QuixoticOne

Golden Member
Nov 4, 2005
1,855
0
0
...Just reading your post on the wired ethernet that doesn't access the internet....

comment 1:
****************************************
if you already/still own the WRT54GL and replaced it with another AP as your main AP don't even wait, flash the supported version of DD-WRT onto the WRT54GL and configure the WRT54GL as a client mode WPA secured node that talks wirelessly to your main AP.
I assume you have access to another PC to download stuff and it has working wired ethernet so you can reflash the WRT54GL etc.
Here's the download link to their V24 RC6.2 series that appears to include the WRT54GL for a couple different versions of that access point's hardware; check your hardware version and all installation notes for your model before using!
http://www.dd-wrt.com/dd-wrtv2...%2FBroadcom%2FLinksys/

At some point soonish I guess they'll have a final V24 out or a newer release candidate too so look for that.

****************************************
comment 2:

From reading your post I think it is likely 100% a software configuration problem in Vista as to why you have local access only through your PC and not full access to the internet.
If the XBOX and other PC can connect through your wireless router and / or cable router to the internet then presumably your internet access is OK and your cable router / wireless router are at least SORT OF OK though maybe they could use a settings change of some sort or whatever.

Usually the LEDs on a port indicate one of four things:
1: Nothing is connected.
2: There's a severe problem with something connected to that port like a broken cable, bad polarity, incompatible settings, or whatever.
3: Something is connected at 10 Mb/s speed.
4: Something is connected at 100 Mb/s speed or whatever.

Often the amber light is for a 10 Mbit/s link, and a green light or whatever is for a 100 Mb/s speed link (or maybe 1Gb/s if that's what all your hardware supports).

Vista's network settings are ....weird and flaky...at best. I am not at all surprised you could get into a state where you don't have internet connectivity due to a configuration problem with the firewall or the network settings for that adapter and be clueless why it doesn't work.

I'd suggest plugging the PC into your wireless router (assuming IT is plugged successfully into your cable modem), rebooting the Vista PC, giving it 5 minutes after you login, then going to the "REPAIR THIS NETWORK" option in the Control Panel / Networks & Settings options for the network connection that is reporting local access but no internet access.

99% of the time you should have the Network adapter set up to use DHCP to get its IP address, netmask, gateway IP, DNS servers via your router the PC is connected to. 99% of the time you should have the wired ethernet port hardware set to AUTO NEGOTIATE the link speed and duplex with the router. Review your cable internet documentation to figure out any special needs in terms of settings for DHCP, MAC addresses, NAT use, IP addresses, DNS servers, PPPOE use/logins, whatever, etc. for your particular internet service. But if the XBOX and other PC are working "automatically" then there's no reason your Vista PC can't do that.

If you want to be more drastic if "repair" doesn't help you can even "disable" or even "delete" the network adapter device / connection you're using, reboot, then reenable it or scan for new devices, have it install the driver for your wired ethernet again, automatically try to determine settings, etc.
(when it is wired in to your router of course).

Make sure your router isn't set for security like MAC address filtering or limited numbers of DHCP leases or MAC spoofing such that maybe your XBOX works but your PC can't because the XBOX is getting the only valid/correct IP/MAC address or whatever. Try making your PC work with the other PC / XBOX totally off, and reboot the router and cable modem and wait 5 minutes before booting the Vista PC and trying to repair / recreate its configuration in the wizard or whatever.

Actually I'd trust LINUX's DHCP implementation for Wired ethernet more than Vista's usually.. at least with LINUX it usually either works or tells you it's not even going to work at the driver level. Whereas Vista can just be flaky / tempermental / weird.

Also try to install Vista SP1 if you're going to continue to use it on any system, it seems to fix a good number of networking / general problems... though obviously not all of them. I think you can download the CD ISO image for SP1 starting tomorrow (Tuesday) from Microsoft's download web page.