Just in case someone else runs into the same problems I did — and in case I need it later — here’s what I did when trying to get my laptop with Redhat Linux 9 and a Linksys WPC54G wireless card working together.
First I tried the Linuxant drivers, but luckily they didn’t work — they aren’t free (as in beer). Then I went on to try the NdisWrapper NDIS API implementation, and even though I had to build the tools and modules myself because of a kernel version mismatch, they ended up working perfectly without too much hassle.
To build the tools and install the XP driver (NdisWrapper works by emulating the NDIS API for the non-free Windows drivers):
make install ndiswrapper -i WPC54G/lsbcmnds.inf
Next up is creating an interface configuration file in /etc/sysconfig/network-scripts/ifcfg-wlan0
:
MODE=Managed ESSID=wifi.mfd-consult.dk KEY=<26 hex characters for the 128 bit WEP key specific to my AP> DEVICE=wlan0 ONBOOT=yes BOOTPROTO=dhcp USERCTL=no PEERDNS=no TYPE=Wireless
Then came the tricky part: The WPC54G is a PCMCIA card, but on my Redhat Linux 9 installation, the networking is set to start up before the PCMCIA interface is initialized. To overcome this problem, I changed the chkconfig
parameters for three of the startup scripts (the NFS script failed to work properly if not started after the network):
pcmcia
:21 96
network
:22 90
nfslock
:23 86
After that, I issued the following commands to reset the sequence:
chkconfig pcmcia reset chkconfig network reset chkconfig nfslock reset
The only thing missing was to make sure the PCMCIA and NdisWrapper drivers were loaded on startup, by simulating a card insert event — if necessary — and forcing the drivers to load:
rmmod ndiswrapper 2>/dev/null cardctl status | grep "no card" > /dev/null && cardctl insert modprobe ndiswrapper
That’s it, running /etc/init.d/network restart
should bring up the wireless interface, after which I could turn off the ethernet connection by setting ONBOOT=no
in /etc/sysconfig/network-scripts/ifcfg-eth0
.
Well I can not figure out what to change to comply with the following????
Then came the tricky part: The WPC54G is a PCMCIA card, but on my Redhat Linux 9 installation, the networking is set to start up before the PCMCIA interface is initialized. To overcome this problem, I changed the chkconfig parameters for three of the startup scripts (the NFS script failed to work properly if not started after the network):
* pcmcia: 21 96
* network: 22 90
* nfslock: 23 86
Don,
Each of the startup scripts located in
/etc/init.d/
contains a specially formatted line at the top, instructing the chkconfig program about when to start/stop each service. Thus, you need to edit the three scripts named above, changing the numbers to something that results in the services starting in the listed order.See also
man chkconfig
.Thanks for this, it worked like a charm.
then what? i mean, ok the hardware is recognized, but i am still not online. what do i do now? how to i get the card to look for a signal?
thanks
Neverind, I got it! Ureka!!! The problem was with my ifcfg-wlan0 file… Although, I’m not sure what exactly fixed it, perhaps the hardware address I got from typing ifconfig wlan0.
here it is:
# Wireless NDIS Wrapper Config
DEVICE=wlan0
BOOTPROTO=dhcp
HWADDR=00:0F:66:A1:B1:7F
ONBOOT=yes
MODE=Managed
ESSID=’linksys’
USERCTL=no
PEERDNS=no
TYPE=Wireless
CHANNEL=9
IPADDR=
DOMAIN=
NETMASK=
USERCTL=no
PEERDNS=no
GATEWAY=
IPV6INIT=no
RATE=Auto
Also note I took out the “KEY” line. I don’t know how to obtain this, maybe somebody could help me out on that.
Thank you so much for making my day brighter! =)
Matthew,
The KEY line is needed only when you have turned on WEP on the access point. If you, as I think I can guess from the name of your AP (you should change that when you get the chance), have a LinkSys AP like the WRT54G, you should be able to get a key from the Wireless/Wireless Security tab, after you select the encryption strength and input a passphrase.
Hello,
Maybe anybody can help me, I am not seeing the wlan0 device file on my 2.6.7 kernel. I have downloaded and compiled the linux-wlang package and I see the drivers(prism2_usb) loaded when I do lsmod, but when I try ifconfig, there is no wlan0 device.
Any comments? I appretiate it.
Thanks very much for an informative HOWTO.
I have this card working on Mandrake 10.
Its worth noting that I didn’t have to change the priority of the init.d scripts on MDK10 as they were already in the correct order.
FYI my kernel is 2.6.3-15mdk
Regards,
Darren
Is the card performing well and stable?
Do you have access to all the options and settings using the ndis wrapper?
Alwyn,
I find it to be working flawlessly – actually better than than when running XP, where the connection drops every now and then.
About the settings and options: I’m not quite sure which you are talking about, but I don’t miss anything…
I tried this and it worked, however… I turned off the computer. The next day, bam! it was down again. I ran /etc/init.d/network restart, but I kept getting an error message that said ndiswrapper wlan0 device is not present, or something like that. so, I thought, it must not see it. about an hour or 2 later, I ran rmmod, cardctl and modprobe, I reset /etc/init.d/pcmcia and nfslock. I shuffled through most of the programs listed (modprobe, network, pcmcia) and the files that they linked to (all of them dead ends, by the way, seeing how they’re all very variable oriented), and I even renamed the /etc/sysconfig/network-scripts/ifcfg-wlan0 file, uninstalled the lscmnds.inf drive from ndiswrapper, ran network restart and started from scratch. Still, I get the same message from network. I tried to just check if the network was running and there was some funky thing interfering and telling it “the internet was unplugged” when it really wasn’t. I like your aproch to this, it’s easy to understand; even for a newbie like me.
thanks
-Peter
Okay, I’ve read the info (thanx Morten) and the comments. I’ve also read the man page for “chkconfig” as well as the startup scripts for “pcmcia,” “network,” and “nfslock.” I understand the theory, but still have no idea how to accomplish altering the startup order of these three.
Do I execute a command using chkconfig? If so, what is the syntax?
Do I use vi and edit the startup scripts? If so, could you please give an example of what to change and to what value? (By the way, the only metrics appear to be in the header of these three files, but they are commented out with a hash symbol “#”. I assume those are NOT the values to change.)
Please advise.
Thanx,
Ryan
Ryan,
It *is* actually the commented-out lines that you are supposed to edit, to look like e.g.
# chkconfig: 2345 21 96
(The 2345 are the run-levels to start the script for, while 21 is the start-up “sequence number” and 96 is for shutdown.)
i have tried everything in all of these comments but just can’t get it to go. I had link light going once like it was talking with something. But it only happened once kind of like Peter above explained. No luck since. When i run /etc/init.d/network start , it says that wlan0 [ok] as if it came up fine but i can’t get anything. One question, should issue the chkconfig commands every time or when should i do those and the crdctl commands? just once or everytime i boot up. ????
Thanks for any help
Thank you for making this information available. I too have RH 9 and am unable, at this point, to get the wireless router to work. When I do the “modprobe ndiswrapper”, it tells me that the ESSID value isn’t working (or something like that). I am putting the SSID in for the ESSID value. This has worked on the XP side (a dual-boot system). Any ideas on what is wrong? The other difference is that my system is not a dhcp system, but static IP (I removed the BOOTPROTO line from mine). Any input appreciated. Thanks. -Jim
well funny thing happened happened, i got frusterated with this, and tried wlan-ng rpms on redhat 9 and it worked for me for a second. I wanted to see what would happen if i rebooted. Sure enough after reboot nothing which is kind of similiar to my experiance with ndiswrapper. So i got frusterated and uninstalled all the rpms from wlan-ng. After that i tried this this whole setup on this site and my card works perfectly. I dont’ know what happened, if that wlan-ng left something configured but now my ndiswrpper config works perfectly. I can’t explain it but just thought this might be helpful to some.
Thanks so much for posting this. It made setting up this card on an old version of Linux a real snap.
I am still having trouble and am wondering if someone can help out. Networking is a real weak-spot for me. I have the wireless card mentioned above (however, mine seems to use the wlipnds.sys file). When I start wlan0, it starts fine. However, when I try to ping the router, I get a “destination host unreachable” error. I also have a hard-wired network card. The hard-wired card is configured identically (ip, defgw, …). The hard-wired works perfectly when started. Only one runs at a time. Any ideas what’s up? Thanks. -Jim
I really appreciate the information regarding the WPC54G. My question has to do with WPA-PSK? Some of my research suggests that ndiswrapper supports WPA-PSK. Can someone provide an example of how to get WPA-PSK TKIP working? That seems to be the last piece that I am missing.
Thanks. KP
WPC54Gv2 Issues/Possible solution: I purchased a WPC54G card in August 2004. It is a v2 card. I installed it into a Toshiba Tecra 9200 running FC2, kernel 2.6.7. I had a number of problems with the WPC54Gv2, but finally got the card to work correctly with Linux and ndiswrapper. I hope I can save someone a bit of pain by documenting what happened.
I had two issues: first, I had to use the driver LSTINDS.INF, not lsbcmnds.inf, because LSTINDS.INF is the correct driver for the TI ACX 111 chipset that was used on my WPC54Gv2.
Second issue: after trying ndiswrapper -i WPC54Gv2/LSTINDS.INF, I did a modprobe ndiswrapper. My laptop froze – keyboard and mouse completely dead. I had to do a hard power off and reboot. The issue stumped me for an hour but turned out to be very simple — it was a “mixed case” problem.
TNET1130x.sys is referenced in LSTINDS.INF. So is TNET1130.sys and tnet1130x.sys. However, these files are named, on my filesystem, “tnet1130x.sys” and “tnet1130.sys”. Same issue with LSTINDS4.sys — on the filesystem it was named Lstinds4.sys.
In the same WPC54Gv2 directory I copied tnet1130x.sys to TNET1130x.sys. I copied tnet1130.sys to TNET1130.sys. So too, Lstinds4.sys to LSTINDS4.sys. I could have straightened out the spelling in LSTINDS.INF, but I just wanted to make a simple and (I hoped) fool-proof test. I switched back to the directory where I keep ndiswrapper and did a make clean, followed by make install. I did an ndiswrapper -i WPC54Gv2/LSTINDS.INF and a modprobe ndiswrapper. Suddenly, the card worked fine.
Steve Hulme, you are a lifesaver. Thank you very much!
I am running Tao Linux, a clone of RedHat Enterprise Linux. I build a RPMS for ndiswrapper for those who prefer installing software via RPM instead of building it from source. Here are the steps you need to follow in order to make it work.
1. Download ndiswrapper source RPM from http://www.nanotechnologies.qc.ca/propos/linux/SRPMS/
The file is named ndiswrapper-(version)-(release).src.rpm
2. Make sure you have all needed programs for the next step:
$ yum install kernel-source rpm-build
3. Create the RPM files from the source RPM:
$ rpmbuild –rebuild ndiswrapper-*.src.rpm
Look carefully at the last lines of output. The location of the newly created RPM files is indicated.
4. Install ndiswrapper and its kernel-module:
$ rpm -Uvh ndiswrapper-*.rpm kernel-module-ndiswrapper-*.rpm
5. Follow the instructions given during the installation of the RPM files.
I am currently using my WPC54G wireless card on Tao Linux to write this post. Enjoy!
This is the best page I found on this topic..you really are a lifesaver..was pulling my hair out and now I’m typing this from a wireless enabled laptop..wooohooooo Thank you very much
Last night I figured out my problem: Somehow the driver data got bumped out of the /etc/ndiswrapper/lsbcmnds directory. I had Ndiswrapper 9.0 so I installed 10, re installed the driver, rebooted, and it’s still working this morning after 2 reboots. It’s even working better than windows: I can get a connection from across my house. Thanks. -Peter
any one try this in slacker or slax i need a img or tgz
I am running Fedora Core 2, and i done the ndiswrapper and then i modified the chkconfig and set up the pcmcia before the network and so forth…and then i tried the network restart but it wouldnt work so i got the idea that i would try the internet configuration wizard and it let me select the ndiswrapper and set it up that way on wlan0 and then when i tried to activate the card it says, “ndiswrapper device wlan0 is not present, delaying intialization.” what does this mean…is it not reconizing that i have my pcmcia card inserted…any help is greatly appreciated you can email me at slone.david@insightbb.com Thanks in andvance for any help
Hi there,
I do have a wl-100g asus card and a linksys wrt54g. after installing Fedora Core 3, ndiswrapper and the Win2K driver. I followed the instructions from ndiswrapper and got it running up. Only one problem, i had to fill in the key and essid, bring up wlan0 and use dhclient wlan0 to get an IP. So to cover that i did put the sequence in /etc/rc.d/rc.local and it worked. but after updating via RHN the ndiswraper was not configured properly anymore, so i had to reinstall (make install) ndiswrapper.
the networksettings tool did find my ndiswrapper wlan0, but did not work (i tried all settings) and so i’m still using the trick with the rc.local to get wlan0 working. i will try to use your manual, but will inform you on my progress.
Awesome info buddy. I had everything perfect except for the getting PCMCIA to start before the network. After that it all worked perfectly. I appreciate your insight. FYI I have this working with an Airlink+ WLC3010 card (broadcom).
Fantastic post, a real help. Worked a treat for me with Fedora Core 3. No need to alter the pcmcia vs. network startup sequence with chkconfig (as I think a few other people mentioned).
The only minor thing to do that is not really mentioned is to make sure your /etc/modprobe.conf contains the line
alias wlan0 ndiswrapper
I found that if I did not have this alias defined then the wlan0 interface would not be present after startup (although you could still force it to work with cardctl remove + cardctl insert). I also changed my /etc/sysconfig/network-scripts/ifcfg-wlan0 to set PEERDNS to yes. Otherwise I found resolv.conf did not get autoupdated correctly and my DNS lookups didn’t work.
Ok guys, I have went through these steps and I am still having probles. I am running a Dell Inspiron 3500, PII 300.
I have the WPC54Gv2 card, so I did the recommmendations posted by Steve Hulme, I also did the ones posted by the initial poster of this site. When I do the modprobe ndiswrapper it comes back w/ /lib/modules/2.4.20-8/misc/ndiswrapper.o: unresolved symbol usb_init. There are 3 other lines saying the same thing but refrencing usb_reset_report, usb_submit_nt_urb and usb_exports. the last two lines of out put say: /lib/modules/2.4.20-8/misc/ndiswrapper.o: insmod /lib/modules/2.4.20-8/misc/ndiswrapper.o failed and
/lib/modules/2.4.20-8/misc/ndiswrapper.o: insmod ndiswrapper failed.
This happens w/ either driver being installed by ndiswrapper. To me it looks like it is trying to do something w/ usb, perhaps I am wrong. But this is a pcmcia card and not a usb card. I have been working on this for the past 3 days, any help would be great at this point. Thnx Seth
Comment to add to #20 by Steve Hulme…
I had a similar card and situation. I followed the instructions and STILL got freezups. Compiling ndiswrapper and paying attention to the warnigns, I learned that my kernel had the CONFIG_4KSTACKS option turned on. Apparently, the driver doesn’t like this. The solution? Recompile the kernel, turning this option OFF. You’ll find it under “Kernel Hacking”.
Like Seth Dunn (see #30), I’ve got nearly the same problem when doing “modprobe ndiswrapper”; the only difference is that I’m using a slightly older kernel (2.4.20-6). All other msgs are the same. Any clue, folks?
Thanks!
(Refer to #32 that I just posted)
I guess I found the reason why I got the “modprobe” problem: it’s because the kernel that I’m using is tooooo old. In the “Prerequisites” section of NdisWrapper, it clearly states:
“You need a recent kernel (at least 2.6.6 or 2.4.26) with source.”
So it seems I must update the kernel now …
Okay, WOW!
I am BRAND NEW to linux and using the Fedora 4 Core Test 2. I have NO idea what you guys are talking about as far as the dos-like commands. Does anyone have a package (a.k.a. installer) for doing all this? At least until I get the lingo and commands down right? I have the Linksys WPC54G Version 1.2 PCMCIA Wireless Card.
Dan
This page is really great! I would like to add my hint:
after installing ndiswrapper, loading the driver and editing /etc/sysconfig/network-scripts/ifcfg-wlan0 etc. My card still did not work. Then I tried system-config-network (the Network GUI in System Settings), and after saving the profile, I could simply Activate the interface. The only setting I have set both mode and SSID to “Auto” (It was setcorrectly before, don’t really know what the problem was, maybe the gui made some other modifications as well).The key is separated ina keys-wlan0 file after using the gui. Anyway, it works now. Thank you all!
MODE=Auto
ESSID=
HWADDR=
DEVICE=wlan0
ONBOOT=yes
BOOTPROTO=dhcp
USERCTL=yes
PEERDNS=yes
TYPE=Wireless
RATE=Auto
IPV6INIT=no
NETMASK=
DHCP_HOSTNAME=
IPADDR=
DOMAIN=
GATEWAY=
CHANNEL=1
I installed fedora core 3 (kernel 2.6.11-1.14_FC3) and I followed all related posts above. I have no problem with the setup but WLAN is still Inactive, could not turn on to Active. No error message . /etc/init.d/network restart show [ok] for wlan0. No lights on the WPC54C card visible.
Any help is highly appreciated.
I am using Fujitsu Lifebook E6656 and WPC54Gv2.
I have an error —
ioctl(): Device or resource busy
after the command
cardctl status | grep “no card” > /dev/null && cardctl insert
I have problem with the modification of the chkconfig parameters.
For example the pcmcia file has the chkconfig line commented out.
# chkconfig : 2345 24 96
This format doesn’t seem to the same format as in the MAN pages and also there is an additional number in the parameter list.
If someone could send me the working copy of the PCMCIA, network and nfslock file or send me their chkconfigs statements with the extra third value that would be appreciated!
Thanks
Thanks.. helpful guide to getting ndiswrapper to
work on redhat enterprise linux 3 (old kernel, 2.4.21) with linksys wpc54g. I also created a guide as I took some info
here and on linuxquestions.org. Check out my post:
http://www.linuxquestions.org/questions/showthread.php?s=&postid=1697962#post1697962
The Ndiswrapper Installation says:
“Make sure there is a link to the kernel source from the modules directory. /lib/modules/VERSION/build should be a link to the kernel source, where VERSION is the version of the kernel you are running. If there is no link, you’ll get an error at the make install step. To create a link, assuming the kernel sources are present, use the command
ln -s /usr/src/linux(kernelversion)
/lib/modules/VERSION/build
Make sure you have started compiling the kernel sources, so needed header files are present.”
I can’t get past the first step of this tutorial for this reason. I’m running Agnula Demudi, a version of Debian for audiophiles. The kernel source I need is 2.6.12-3-multimedia-686. I can’t find this kernel on kernel.org, or anywhere. The other advice I find is to use “apt-get” commands. This is impossible, because I have no internet connection.
Any advice?
Can this work on a Hawking wireless card also?
Great guide! Worked like a charm first time!
Thanks much Morten. You just saved me (and I am sure many others) a lot of headaches.
I have a similar problem with trying to run my WPC54g using ndiswrapper on Red Hat Enterprise Linux 4. I have the latest kernel, 2.6.9.34, the most up to date packages, I followed all of the directions on this page, but when I go to use ifconfig
it just does not sense my card at all. I am trying to run this on a Toshiba Satellite A65-S1062 with a Texas Instruments PCI1410 PC cardbus controller (the PCMCIA card controller).
In the hardware browser, it sees the cardbus controller but it does not sense the wpc54g inserted into the pcmcia card slot. In addition, under device information it lists the following info
Manufacturer: Unknown
Driver: yenta-socket
Could the problem possibly be that the pcmcia cardbus controller driver in linux might not be compatible with the cardbus controller built into my laptop?
No one responded to my previous post, but I have more to add. I uninstalled redhat, and installed Ubuntu 5.10 and updated to the the 2.6.12-10-686 kernel. I still had problems getting my card to be sensed by yenta socket. I checked lspci, dmesg, and kernel messages in addition to trying some kernel messages and still had no luck. I at one time thought that the yenta socket with the wpc54g inserted had a specific hardware conflict but it appears to apply to more cards than wpc54g. I just bought a Netgear WG511T that has the Atheros chipset and is known to work with madwifi and it still has the same proble. The only card, that I had luck with getting sensed was my friend’s linksys WPC11 version 3 that has the prism54 chipset. When inserted, the information is updated into dmesg right away. On the other hand, my friends that have different laptops that and different hardware using the same version of ubuntu including the live cd, had no problems with detecting the broadcom chipset of my wpc54g. I now know, the yenta_socket
driver is the problem. Does anyone know how to fix this
problem?
Dear All,
I have a WPC54G and I am using in my LAPTOP w/ RedHat AS 3.0 kernel 2.4.21-40.EL.
I tried a lot of tips to put my wireless card working.
I just get put it working when I used the driver that came with WPC54G windows installation CD (check Atheros directory + ndis5x).
The driver name is: net5211.inf
The associeted files: ar5211.sys & net5211.cat
I did:
# ndiswrapper -l –> check the driver isntalled
# ndiswrapper -e –> remove all drivers
# cd /drivers_dir
# ndiswrapper -i net5211.inf
# rmmod ndiswrapper
# insmod ndiswrapper
# iwconfig
……
Then you can put your wlan up.
If you do not have the cd, please send me an email and I send to you.
Best regards,
Eduardo