Setting up a Netgear WG511T wifi card.


Forum: Networking
Topic: Setting up a Netgear WG511T wifi card.
started by: captainpotato

Posted by captainpotato on Nov. 15 2005,12:15
Hello all,

Having managed to solve my ethernet card woes, I'm now trying to set up my wifi card, a Netgear WG511T card (PC card, based on the Atheros AR5212 chipset).

My machine (Libretto 110, running DSL 2.0rc2) detects the card correctly using

Quote

> lspci

0000:14:00.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)


So far, so good. I have extracted the relevant .inf file from the card's Windows installation CD. Following the < ndiswrapper installation guide >, I do the following:

Quote

> sudo ndiswrapper -i netw511.inf

> sudo ndiswrapper -l
Installed ndis drivers:
netw511 driver present, hardware present

> depmod -a


This is where the problem hits: I get the following error:

Quote

depmod: Can't open /lib/modules/2.4.31/modules.dep for writing


Following a suggestion < in another thread >, I tried the following:

Quote

sudo /etc/init.d/mkwriteable


But it makes no difference.

The card appears to be supported by DSL and by ndiswrapper, so I'm stuck with a somewhat minor (I assume) problem. Any ideas would be most appreciated on how to fix it.

Also, to preempt a followup question, how would I then ensure that the settings are saved upon reboot (in the /opt/bootlocal.sh file, I presume)

I also don't want to affect the eth0 settings for my ethernet card, so the WG511T should be configured on wlan0.

Thanks again for any assistance.

Posted by adssse on Nov. 15 2005,23:05
Instead of depmod -a, try 'modprobe ndiswrapper'. This works for me with another card.
Posted by captainpotato on Nov. 15 2005,23:49
Quote (adssse @ Nov. 16 2005,04:05)
Instead of depmod -a, try 'modprobe ndiswrapper'. This works for me with another card.

That's the step after depmod -a, according to the ndiswrapper docs.

In any case, I've tried that, and I get a very similar error (can't tell you what it is at the moment, as I'm at work ;) ). Either way, it doesn't help.

Posted by roberts on Nov. 16 2005,00:07
Try using the script for ndiswrapper located on the control panel.
This makes things easy.  You did check that your card is supported via ndiswrapper?

Also, you can try the madwifi modules that have been built for DSL-2.0 and then modprobe some of the modules there.

Let us know.

HTH

Posted by captainpotato on Nov. 16 2005,01:27
Quote (roberts @ Nov. 16 2005,05:07)
Try using the script for ndiswrapper located on the control panel.


I get the message "no wireless cards detected" (or words to that effect).

Quote

This makes things easy.  You did check that your card is supported via ndiswrapper?


Yes it is. When I enter 'ndiswrapper -i netw511.inf (the relevant file), it works and detects the card correctly (see original post). It's only at the next stage the installation fails.

Quote

Also, you can try the madwifi modules that have been built for DSL-2.0 and then modprobe some of the modules there.


Okay, I'll try that tonight and see how it goes. Having said this, I suspect that the issue isn't ndiswrapper, but rather using a frugal installation as the issue seems to be about not being able to write to /lib/modules/2.4.31/modules.dep - there again, I'm only new to the frugal method, so this may just be my (incorrect) perception...

Posted by captainpotato on Nov. 20 2005,01:44
Okay, have now had some time to try to madwifi modules, as suggested. In short - no luck as the same problem occurs. This is what I did and what happens:

1. Downloaded madwifi.tar.gz
2. sudo su
3 . tar -zcvf madwifi.tar.gz -C /
4. depmod -a

The output is:
Quote

depmod: Can't open /lib/modules/2.4.31/modules.dep for writing


In other words, the same as before. Trying:
Quote

/etc/init.d/mkwriteable /lib/modules/2.4.31/modules.dep


Doesn't help either.

I've tried skipping depmod -a and trying modprobe ath_pci, but I get the following:

Quote

modprobe: Can't locate module ath_pci


I've checked, and ath_pci.o is in /lib/modules/2.4.31/net as it should be.

I've hit the same wall that I hit trying ndiswrapper. any other ideas? :)

Posted by tempestuous on Nov. 20 2005,02:40
It sounds like you're running from liveCD - and this can be a problem because much of the filesystem is ready-only.
If you had a hard drive installation it would be so much easier.
But if you want to stick to a liveCD, here's how to make those files writeable -

sudo su
/etc/init.d/mkwriteable ## not sure if this is needed
cd /lib/modules/2.4.31
cp modules.dep tmp1
cp modules.generic_string tmp2
cp modules.pcimap tmp3
cp modules.isapnpmap tmp4
cp modules.usbmap tmp5
cp modules.parportmap tmp6
cp modules.ieee1394map tmp7
cp modules.pnpbiosmap tmp8
rm -rf modules.dep modules.generic_string modules.pcimap modules.isapnpmap modules.usbmap modules.parportmap modules.ieee1394map modules.pnpbiosmap
mv  tmp1 modules.dep
mv  tmp2 modules.generic_string
mv  tmp3 modules.pcimap
mv  tmp4 modules.isapnpmap
mv  tmp5 modules.usbmap
mv  tmp6 modules.parportmap
mv  tmp7 modules.ieee1394map
mv  tmp8 modules.pnpbiosmap

Now depmod will work.

Posted by tempestuous on Nov. 20 2005,02:41
double-posted.
Posted by captainpotato on Nov. 20 2005,05:16
Quote (tempestuous @ Nov. 20 2005,07:40)
It sounds like you're running from liveCD - and this can be a problem because much of the filesystem is ready-only.
If you had a hard drive installation it would be so much easier.
But if you want to stick to a liveCD, here's how to make those files writeable -

sudo su
/etc/init.d/mkwriteable ## not sure if this is needed
cd /lib/modules/2.4.31
cp modules.dep tmp1
cp modules.generic_string tmp2
cp modules.pcimap tmp3
cp modules.isapnpmap tmp4
cp modules.usbmap tmp5
cp modules.parportmap tmp6
cp modules.ieee1394map tmp7
cp modules.pnpbiosmap tmp8
rm -rf modules.dep modules.generic_string modules.pcimap modules.isapnpmap modules.usbmap modules.parportmap modules.ieee1394map modules.pnpbiosmap
mv  tmp1 modules.dep
mv  tmp2 modules.generic_string
mv  tmp3 modules.pcimap
mv  tmp4 modules.isapnpmap
mv  tmp5 modules.usbmap
mv  tmp6 modules.parportmap
mv  tmp7 modules.ieee1394map
mv  tmp8 modules.pnpbiosmap

Now depmod will work.

I've done a frugal install with the /opt/ and /home set to save, which as such, is a LiveCD installation in this regard (or at least, that's how I understand it works).

I've copied your suggestion into the /opt/bootlocal.sh file, and the boot sequence stops with the error:
Quote

bash: no job control in this shell


Clearly, this isn't the place that your suggestion should be placed... I was going to stick the depmod/modprobe sequence of commands after this, but clearly this isn't the way to go with this.

Where should I be putting this, seeing that I don't want to be typing this in each time I boot the machine?

Posted by tempestuous on Nov. 20 2005,07:26
It's possible that "sudo su" caused that error you describe, so don't include it in /opt/bootlocal.sh ...
but walk before you run - try this sequence of commands manually from the commandline to see if they work first, and obviously this process should be done after you have uncompressed the MADWiFi modules.

Once you have successfully loaded the MADWiFi module with "modprobe ath_pci" you still have to configure your wireless settings with iwconfig / pump / ifconfig, before making the whole process automatic.

You could refer to my info file for the ipw2200 dsl package here - < http://www.ajpearce.co.uk/files/mydsl/ >
this explains the process for making new modules and settings "permanent".

Posted by captainpotato on Dec. 28 2005,12:54
Quote (tempestuous @ Nov. 20 2005,12:26)
It's possible that "sudo su" caused that error you describe, so don't include it in /opt/bootlocal.sh ...
but walk before you run - try this sequence of commands manually from the commandline to see if they work first, and obviously this process should be done after you have uncompressed the MADWiFi modules.

Once you have successfully loaded the MADWiFi module with "modprobe ath_pci" you still have to configure your wireless settings with iwconfig / pump / ifconfig, before making the whole process automatic.

You could refer to my info file for the ipw2200 dsl package here - < http://www.ajpearce.co.uk/files/mydsl/ >
this explains the process for making new modules and settings "permanent".

After six weeks of not being able to find time to turn on my laptop (damn, I hate the end of year and all the associated time hogging events...), I've *finally* been able to try what you've suggested. Everything works fine until I try the iwconfig line. Entering:

iwconfig wifi0 essid MY_ESSID key 1234567890 mode managed

(with my personal settings, obviously), I get the following error:

Error for wireless request "Set ESSID (8B1A) : SET failed on device wifi0 ; invalid argument

I've entered the name of my essid using the correct case, and the key as a hexadecimal number.

Any ideas?

Posted by tempestuous on Dec. 28 2005,14:57
The new MADWiFi driver requires an extra command -
wlanconfig ath0 create wlandev wifi0 wlanmode sta

... as discovered by Max here - < http://damnsmalllinux.org/cgi-bin....6;st=20 >
Read the whole thread, instructions are slightly different from what you previously tried.

And Robert has revised the package, so make sure you get the latest version.

Posted by captainpotato on Jan. 10 2006,13:08
Wow, time really does race by when you're busy :P

tempestuous, thanks for all your help so far - I've just seen that DSL 2.1 has just been released, so I'll download and install that first before I try again. Having said this, once I get this, I am confident of success with the new madwifi package, as my last effort got me a lot closer to success :)

(That is, once the torrent seeding picks up, as I haven't been able to get a single byte so far... the least I can do is to contribute to torrent seeding).

Posted by captainpotato on Jan. 10 2006,13:08
*edit* Double post somehow :P
Posted by captainpotato on Jan. 22 2006,07:14
Okay, I think I've made some progress - but I'm not there yet. This what I've done:

1. I've downloaded the madwifi.dsl file and saved it in the usual spot for myDSL files on my machine.

2. Run sudo /opt/madwifi_setup.sh - this works without problem (only the GPL-related warnings). The modules are up and running and all seems to be as it should.

3. Following roberts' instructions < here >,  I run the usual iwconfig GUI for device ath0. After sitting there for about five seconds, a dialogue pops up with the error "connection failed". Yes, highly useful :P

'iwconfig' suggests that the card isn't working - the link quality is 0/94, and so forth.

Running wlanconfig instead seems to get me further: I enter my ESS_ID, WEP, mode as auto, channel 6,  and nothing for NWID or  the additional options at the end of the config screens.

After this, I type: sudo ifconfig ath0 up

When I type 'iwconfig', I get evidence of the card working, such as signal strength and so on - it just doesn't seem to be able to find my wireless hub. In addition, the two lights on the WG511T change their flashing pattern, and without knowing what they mean, I'd suggest that the card is trying to connect to something as not only do they flash in a seemingly meaningful way, and have transferred and received a few (<10) packets.

I cannot, however, connect to anything (or ping, for that matter) and my hub doesn't recognise the card as being connected.

Using Kismet on this machine (my desktop box), I can see that the wireless card is indeed broadcasting, but that it's not connected up to the network. So it's a configuration issue. Likewise, using iwlist on my laptop, I can see the hub (although the list digit in the MAC address is one number out from what the hub says it is... strange).

Any ideas? I'm loathe to turn off the encryption at this point, as this machine works flawlessly on the network now, so I'd prefer not to have to fiddle around with settings again. If I have to, I will - but I'd prefer not to :)

Posted by tempestuous on Jan. 23 2006,07:15
Before you use the iwconfig gui as Robert suggested, first try things from the commandline similar to what Max did in that other post -

/opt/madwifi_setup.sh
ifconfig ath0 up  ## (this is an extra step that sometimes helps)
iwconfig ath0 essid MY_ESSID key 1234567890 mode managed
pump -i ath0

If still no success, try to "reset" your card prior to wifi setup, like this -

cardctl eject
cardctl insert

... or another more thorough reset is to restart cardmgr like this -

read PID </var/run/cardmgr.pid
kill $PID
## wait a few seconds, then
cardmgr

Posted by captainpotato on Jan. 23 2006,12:01
Okay, this is what is happening:

1. Doing the commands without the reset does nothing;

2. The cardctl suggestion doesn't work either;

3. The PID suggestion didn't either.

In each instance, the problem is with pump -i ath0 - the command fails with the error 'operation failed'. Very helpful... The wireless card lights flicker and alternate.

I noticed that when I typed 'ps aux', there was a process 'pump -i eth0' running, so I killed this, but to no avail. I then removed the ethernet card and rebooted and tried again. Still no luck; however. when I looked at the processes, 'pump -i ath0' was listed, despite the 'operation failed' error message.

As I type this, the lights on the wireless card are still flickering, and 'iwconfig' shows that there is a signal strength and link quality, but I cannot connect (pinging the wireless hub doesn't work, for instance). 'ifconfig' states that no packets have been sent or received (hardly surprising) and that I don't have an IP address (again, not surprising).

It seems as if progress is being made, but still not quite enough ;)

Posted by captainpotato on Jan. 23 2006,12:34
Success!!! Of a type, that is.

I've narrowed the problem down - it's in the assigned of an address  using 'pump'. If I set the wireless hub to accept the laptop with a pre-determined IP address, and then set it using 'ifconfig', I can ping the hub and the other machines on the LAN, and now that I've configured the nameserver and gateway, I can access the outside world!

I suspect that there is a problem with the version of 'pump' that's included - I found several references to this using Google, hence my decision to set a pre-determined IP address.

I'm writing this using my Libretto, BTW :)

Tempestuous - thank you SO much for your help so far. Without it, I wouldn't be at this stage. If you're ever in Adelaide, I owe you a beer (or if I'm ever where you live).

Now comes the fun (easy?) part - getting all of this done automatically :)

EDIT: after getting the card working, this was the easy part. I must be learning something ;) Now for the niceties, such as the battery status.

Posted by tempestuous on Jan. 29 2006,05:50
Since pump is being troublesome, it would be feasible to compile and use an alternative dhcp client daemon. See
< http://freshmeat.net/projects/dhcpcd/ >

But now that DSL has just reverted to the 2.4.26 kernel, pump may work fine in the new DSL 2.2.

Posted by captainpotato on Jan. 29 2006,10:18
Given how long it took me to getting the machine set up, I might wait a little before going to 2.2 :) Mind you, I'll give dhcpcd a go in the meantime.
Posted by tempestuous on Jan. 30 2006,04:54
dhcpcd has a small "quirk" - it creates a process file which needs to be deleted each time dhcpcd is stopped, otherwise at next boot dhcpcd won't start because it thinks it is already running.
So unless your shutdown scripts remove the file, at each boot you need to do this -
rm -rf /etc/dhcpc/dhcpcd-xxx.pid
("xxx" is the name of your network interface)

Posted by vilde on Mar. 22 2006,13:48
Hi all of you

I manage to get my Netgear WG511T adaptor quickly by using ndiswraper setup. I am a newbie about network but thanks to this thread I tried this.

My machine: An old Dell laptop with a 256 mb compactflashcard instead of an harddisk. DSL 2.3RC2, frugal install on the cf-card. This way I have a complete quiet computer the fan never go.

I got the Netgear file from a windows installation "netw511.inf" and put it on my cf-card (hda1)

ndiswrapper setup:

inf file: /mnt/hda1/netw511.inf
device: ath0
sid: "mysssid"
wep: " mykey"

works great for me.

Posted by mrbryo on Sep. 05 2006,07:26
I am a Linux noob/newbie/etc and finally got this card to work after trying a Belkin which I found out after I bought it to be basically Windows only.  I did try ndiswrapper without success but that could have been my inexperience with Linux.  So I purchased the Netgear WG511T.  I was at the time on DSL 2.2.  Put the laptop away since I couldn't get wireless working.

Now I have DSL 3.0.1 installed to the hard drive, no Frugal.  After reading over this forum here is what I had to do once it completed booting up:

First I opened a terminal window.  I then typed the following command and waited for the command prompt.  I didn't recieve any errors:

iwconfig ath0 essid <essid> key <key> mode Managed

Exchange your ESSID for <essid> and your key for <key>.  You may also need to change "ath0" to the actual ID created by DSL.  This was my default name for the wireless card.  Is that the right term?  Anyway...

Next I typed:

pump -i ath0

Again change ath0 (ath-zero) for the name of your wifi card. Again no errors.  Fired up Firefox (no pun intended) and the www.dslos.com/start came up!

Thanks Everyone!

Some other info I learned (if helpful) to compare with our own setup.  When using the lsmod command I have two modules loaded for this card:

1. ath_pci used by 1
2. ath_hal used by 1 [ath_pci] (hal not ha1)

Prior to the two commands above (iwconfig and pump) ath_pci was listed as:

ath_pci used by 0 (unused)

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.