Page 1 of 1

Netgear WG311 wifi config not retained on reboot (Solved)

Posted: Mon 30 Oct 2006, 03:46
by wombat
Hi, I have a Netgear WG311T wireless card in a P3-733 system, currently using Puppy 2.02 properly installed on a hard-drive with a gig of swap space.
I followed the ndiswrapper procedure and loaded the W-XP inf file from the cards driver CD.
I was able to get the card operating properly.
My problem is that the driver is retained but when the system reboots I have to re-run ndiswrapper, then iwconfig, then use the ethernet/network setup > wlan0 > autodhcp to reload the driver for operation.
WAG does not appear to do anything.
How do I config it to automatically load at each reboot?
It certainly works well once it is up!

Thanks for any suggestions.
wombat.

Posted: Mon 30 Oct 2006, 08:34
by BlackAdder
You can add the commands to set up your wireless adapter to /etc/rc.d/rc.local. They will be excuted late in the boot sequence. Example

Code: Select all

modprobe ndiswrapper
iwconfig wlan0 essid mynet channel 6 key mykey
rm /etc/dhcpc/*.pid  # remove any leftover process id files
dhcpcd -t 10 -d wlan0
The commands could also put into a simple shell script to run when you choose.

Posted: Mon 30 Oct 2006, 12:13
by wombat
Thankyou so much for your reply BlackAdder, I added those items to that file but still no joy.
I removed all the items apart from
modprobe ndiswrapper
iwconfig wlan0
and that allows me then to use the ethernet / networking setup wizard to simply use the "wlan0 button" and then "auto DHCP" and everything is operating properly.
Is there a simple way of adding the "auto DHCP" in a line, I feel that would fix it.
Again Thanks.
wombat.

Posted: Mon 30 Oct 2006, 21:22
by BlackAdder
wombat,
The line dhcpcd -t 5 -d wlan0 should be equivalent to clicking the auto dhcp button. Does that sequence of commands work okay if used from a console window? If so, maybe the command to remove the old process id files should be:

Code: Select all

if [ -e /etc/dhcpc/*.pid ]; then
  rm /etc/dhcpc/*.pid 
fi
That simply makes the removal of any of those pesky little files conditional on there being any.

Posted: Thu 02 Nov 2006, 12:01
by wombat
G'Day BlackAdder, well you certainly know your suff there, I applied the commands after a lot of typo errors and the wireless now works perfectly.
The eventual code now reads as ...
modprobe ndiswrapper
iwconfig wlan0
dhcpcd -t 5 -d wlan0
if [ -e /etc/dhcpc/*.pid ]; then
rm /etc/dhcpc/*.pid
fi

This really does the trick!!!
Thank you so much for your help. Blinky works overtime!
Wombat.

Posted: Sun 12 Nov 2006, 10:14
by Garth
HiWombat and BlackAdder

I (very newbie) have had the same problem until I found your topic on the forum.

Went through the same steps as Wombat but found his final text did not quite work on my machine.

I reversed the last two commands so that the entire text in /etc/rc.d/rc.local reads as follows:-

modprobe ndiswrapper
iwconfig wlan0
if [ -e /etc/dhcpc/*.pid ]; then
rm /etc/dhcpc/*.pid
fi
dhcpcd -t 5 -d wlan0


and that works perfectly for me!

Thanks guys

Posted: Sun 12 Nov 2006, 17:57
by GuestToo
it's not important, but this line will work:

rm -f /etc/dhcpc/*.pid

(instead of
f [ -e /etc/dhcpc/*.pid ]; then
rm /etc/dhcpc/*.pid
fi )

the -f option suppresses an error message if there are no .pid files ... and it over rides -i if someone aliased rm to rm -i

so all you would need to start your connection would be:

modprobe ndiswrapper
iwconfig wlan0
rm -f /etc/dhcpc/*.pid
dhcpcd -t 5 -d wlan0

Here is what I had to do

Posted: Sun 10 Dec 2006, 02:58
by OverDrive
in /etc/rc.d/rc.local:

modprobe ndiswrapper
iwconfig wlan0
rm /etc/dhcpc/dhcpcd-wlan0.pid 2>/dev/null #if left over from last session, causes trouble.
rm /etc/dhcpc/dhcpcd-wlan0.cache 2>/dev/null #ditto
rm /etc/dhcpc/dhcpcd-wlan0.info 2>/dev/null #ditto
dhcpcd -t 5 -d wlan0

I copied the rm statements from /etc/wlan0mode

I don't profess to know why it now works. But I can say it did not work untill I rm'ed the .cache and the .info files also. Hope this helps someone else

Best Regards

Dave

netgear wg511t with static ip

Posted: Sat 20 Jan 2007, 14:01
by cruzin
Hi, I did modprobe ath_pci and ifconfig ath0 up in the above file and that
got the network card running but I dont use dhcp but use a static ip. Is there any way to configure that at startup. I have to go into network set up and chooose wireless and set all up manually and then it works. any help will be appreciated. thanks

works for me

Posted: Sat 27 Jan 2007, 13:32
by topaz
Hi

modprobe ndiswrapper
iwconfig wlan0 essid mynet channel 6 key mykey
rm /etc/dhcpc/*.pid # remove any leftover process id files
dhcpcd -t 10 -d wlan0

in rc.local works fine for me , I used to have to load profile in WAG to pick up the key

cheers :P