LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 08-27-2004, 08:56 PM   #1
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 357

Rep: Reputation: 30
ndiswrapper works, iwconfig settings not saved on reboot, no internet


Hey everybody.
I'm having a strange problem. I got ndiswrapper working with a DLink G650 pcmcia card. Well, almost working. Whenever I reboot, it hands for a minute on 'Bringing up interface wlan0:' The led's on the card change to active but unlinked status. After a minute or so of thinking, it starts spitting out the following messages:
zcip[1017]: Retrieved address 127.255.255.255
zcip[1017]: probing.... anyway, it assigns the above address to my wlan0 connection.

As far as I can tell, the reason for this is because my iwconfig for wlan0 somehow changes from open authentication to restricted whenever I reboot. All of the other settings (essid, key etc) are all OK. As soon as I run iwconfig and change the mode back to open, my card's leds show that the connection was established with my router. Unfortunately, even though my card shows linked status, Mandrake doesn't recognize the connection--in the Mandrake Control Center, the settings for wlan0 are correct (dhcp enabled), but it has not been assigned an ip.

Actually, there may be some other problems with my iwconfig, but the status lights on my card show that it's connected. Anyway, here's what iwconfig says

lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11g ESSID:"hotdamn"
Mode:Managed Frequency:2.437GHz Access Point: 00:0D:88:B7:01:F6
Bit Rate:108Mb/s
Encryption key:ABAB-ABAB-AB Security modepen
Link Quality: 0/100 Signal level:-56 dBm Noise level:-256dBm
Rx: invalid nwid:0 Rx: invalid crypt:0 Rx: invalid freq:0
Tx: excessive retries:0 Invalid misc:0 Missed beacon:0

sit0 no wireless extensions.

I'm wondering if the last 3 lines of the wlan section are indicating some other incorrect settings.

Am I missing something really obvious as far as saving my iwconfig settings? I can't figure out why the encryption mode is the only thing that changes on reboot.
If anybody can help out, this stumped newbie would be extremely grateful.
Thanks,
Kris

Last edited by kersten78; 08-27-2004 at 09:14 PM.
 
Old 08-28-2004, 12:50 AM   #2
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 357

Original Poster
Rep: Reputation: 30
OK this is absurd. I am now replying to this post entirely wireless. It still won't activate the wireless on boot, and half the time I set the correct key and authentication mode, it immediately switches to some key (such as 00) or immediately switches to restricted instead of open auth. Has anyone seen anything like this before? Is there a way to fix this, or am I going to have to constantly have aterm up so I can keep resetting the iwconfig values. Realy weird. I'm afraid to reboot again...it sucks that this is a laptop

-Kris
 
Old 08-28-2004, 11:18 AM   #3
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
vi /etc/sysconfig/network-scripts/ifcfg-wlan0

add these entries to the file.

ESSID=YOURSID
KEY=000YOURKEY

make sure you have

ONBOOT=YES

as well.


Thanks
Trey
 
Old 08-30-2004, 02:03 PM   #4
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 357

Original Poster
Rep: Reputation: 30
This is odd. I read quite a bit about Mandrake 9.2 being a lot easier to config for wireless, so I dumped 10 and installed 9.2. I got ndiswrapper installed and configured for my card. Same thing is happening. I can get my card's led's to show a connection, but I can't actually get online. In all the network config settings in the Mandrake control center, there is no mention of wlan0. Hard drake shows that I have two ethernet adapters, but there's no info on the wireless adapter. I can't figure out how to get Mandrake to recognize the connection. When I run iwconfig and ifconfig, they both show that wlan0 is up and running.

But here's the really perplexing thing and it's probably the root of my problem.
I checked the /etc/sysconfig/network-scripts directory and there is no ifcfg-wlan0 file. There's an ifcfg file for both eth0 (which I won't be using) and for lo. Why didn't a config file for wlan0 get added when I got everything up and running? Anyone have any ideas?
Thanks in advance for the help.
 
Old 08-30-2004, 02:22 PM   #5
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 357

Original Poster
Rep: Reputation: 30
OK. I was being impatient and decided to create the ifcfg-wlan0 file myself.
I looked at ifcfg-eth0 and sort of copied it.
Here's what ifcfg-wlan0 contains now:
DEVICE=wlan0
ESSID=mynetwork
KEY=mykey
BOOTPROTO=dhcp
NETMASK=255.255.255.0
ONBOOT=yes
NEEDHOSTNAME=yes

I also changed the permissions to match ifcfg-eth0.

Here's the problem. When I boot I get the following error:

Starting wlan0: ndiswrapper device wlan0 does not seem to be present, delaying initialization [FAILED]

It's as if the ndiswrapper module is not loading (ir is loading incorrectly) before wlan0 initialization.
Does anyone have any idea what I might have done wrong, or does anyone know what should be in the ifcfg-wlan0 file?
 
Old 08-30-2004, 02:43 PM   #6
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 357

Original Poster
Rep: Reputation: 30
Alright...sorry to flood this thread with my incoherent rambling, but there must be something wrong with the way the ndiswrapper module is being loaded.
After I boot the system and get the Starting wlan0 [FAILED] message, i try to start ndiswrapper manually--nothing happens. So I do a rmmod ndiswrapper followed by a modprobe ndiswrapper, and all the sudden the card is initialized. However, it switched the authentication mode to restricted again. So after I ran iwconfig and set the correct values, the card is showing a connection. But I still can't get online.
Am I missing anything really obvious here? Any help would be greatly appreciated (pulling out my hair) ....oh and I'll try to quit messing with everything and wait for a reply from someone who has a clue....because apparently I don't have any idea what I'm doing!
Thanks,
Kris
 
Old 08-31-2004, 10:15 PM   #7
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
Quote:
Originally posted by kersten78
Alright...sorry to flood this thread with my incoherent rambling, but there must be something wrong with the way the ndiswrapper module is being loaded.
After I boot the system and get the Starting wlan0 [FAILED] message, i try to start ndiswrapper manually--nothing happens. So I do a rmmod ndiswrapper followed by a modprobe ndiswrapper, and all the sudden the card is initialized. However, it switched the authentication mode to restricted again. So after I ran iwconfig and set the correct values, the card is showing a connection. But I still can't get online.
Am I missing anything really obvious here? Any help would be greatly appreciated (pulling out my hair) ....oh and I'll try to quit messing with everything and wait for a reply from someone who has a clue....because apparently I don't have any idea what I'm doing!
Thanks,
Kris
sorry for taking so long... i have funny results with mandrake and ndiswrapper... first of all MCC never relizes there is a wlan0 device... in some cases mandrake will never associate ndiswrapper with wlan0 even with the proper alias.... other times it has worked perfectly the first time.

Mandrake obviously recognizes wlan0 as ndiswrapper... what I would recommend and what I have had to do is preload ndiswrapper before, you can add ndiswrapper to /etc/modules.preload. This will load the module before initializing the card when booting. otherwise if it is not there the module is being loaded when it calls wlan0.

now if you already have this set to load... like i said I have had all kinds of trouble with ndiswrapper and mandrake... something always different however.
 
Old 09-01-2004, 01:46 AM   #8
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 357

Original Poster
Rep: Reputation: 30
Well.....I'm still fighting with it.
I gave up on the laptop for the moment to see if I could get the my desktop box configured. I added ndiswrapper to /etc/modprobe.preload Now the card initializes on boot, but fails to connect. I checked dmesg after boot and here's what I have:

[root@192 kris]# dmesg|grep 'ndis'
ndiswrapper: no version for "struct_module" found: kernel tainted.
ndiswrapper version 0.10 loaded (preempt=no,smp=no)
ndiswrapper: using irq 10
wlan0: ndiswrapper ethernet device 00:0d:88:57:47:41 using driver a3ab.sys
ndiswrapper device wlan0 supports WPA with AES/CCMP and TKIP ciphers
ndiswrapper: driver a3ab.sys (D-Link,09/19/2003,2.4.1.32) added
ndiswrapper (ndis_set_rx_mode_proc:566): Unable to set packet filter (C00000BB)

Looks like everything is fine except the last line....no clue what causes that. Oh yeah, the first line might be a problem too, but I've seen some other people with the same message and no troubles.
Same thing with iwconfig also. Everything is reset:

[root@192 kris]# iwconfig wlan0
wlan0 IEEE 802.11g ESSID:""
Mode:Managed Frequency:2.412GHz Access Point: 00:00:00:00:00:00
Bit Rate:54Mb/s
Encryption keyff
Link Quality:0/100 Signal level:-95 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Weird. And for some reason ifconfig shows an entry for wlan0 and wlan0:9 Not sure what caused that either.
Anybody seen anything like this?
Thanks,
Kris

Last edited by kersten78; 09-01-2004 at 01:47 AM.
 
Old 09-01-2004, 02:09 AM   #9
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 357

Original Poster
Rep: Reputation: 30
More unexplained behavior. I did another rmmod and modprobe ndiswrapper, set the iwconfig settings, checked out ifconfig, and it's up and running. I'm running completely wireless right now with no probable explanation. I just did the same thing I've done 100 times before. Heh. Gotta love it.
 
Old 09-01-2004, 02:23 AM   #10
kersten78
Member
 
Registered: Nov 2003
Location: Minneapolis, MN
Distribution: Slackware, Debian, Gentoo, openSuSE
Posts: 357

Original Poster
Rep: Reputation: 30
I think I'm on the verge of a breakthrough. Now that I have ndiswrapper preloaded, I tried to edit the /etc/sysconfig/network-scripts/ifcfg-wlan0 file so it includes the essid and key. It actually picked up the essid, but the key wasn't set. As soon as I gave it the proper key and ran dhclient, it is up and running. Does anyone know the proper format of the KEY=value in the ifcfg-wlan0 file. I need to give it a 10 digit hex key with open authentication. I guess at this point I can write a script to get it up and running, but it would be pretty cool if it loads on boot.
 
Old 09-01-2004, 12:55 PM   #11
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
Quote:
Originally posted by kersten78
I think I'm on the verge of a breakthrough. Now that I have ndiswrapper preloaded, I tried to edit the /etc/sysconfig/network-scripts/ifcfg-wlan0 file so it includes the essid and key. It actually picked up the essid, but the key wasn't set. As soon as I gave it the proper key and ran dhclient, it is up and running. Does anyone know the proper format of the KEY=value in the ifcfg-wlan0 file. I need to give it a 10 digit hex key with open authentication. I guess at this point I can write a script to get it up and running, but it would be pretty cool if it loads on boot.

the key = your wep key.. if you do not have one set.. try leaving the key out of the config file or try KEY= with no value present.
 
Old 11-22-2004, 09:30 PM   #12
mawdryn
LQ Newbie
 
Registered: Jun 2001
Posts: 25

Rep: Reputation: 15
Bit late, but this may help someone..

I've found that you can add the key to the ifcfg-wlan0 file like this:

KEY="open 1234567890"
(with the double quotes)
where open is the type. ie open, restricted, etc
 
Old 06-16-2005, 02:10 AM   #13
sien
LQ Newbie
 
Registered: Jun 2005
Posts: 4

Rep: Reputation: 1
Thumbs up Thanks

I finally got wpc54g working on redhat enterprise 3 2.4.21 using the
hint of rmmod ndiswrapper, then modprobe.. among other things..but that was
the key. Thanks.
 
Old 06-16-2005, 09:27 PM   #14
sien
LQ Newbie
 
Registered: Jun 2005
Posts: 4

Rep: Reputation: 1
fyi on fix to not have to do rmmod, modprobe

From thread I started...

7) Got this from link above, i.e. waasb.dk....
to stop having to do rmmod, then modprobe, you need to change how
things get intiialized started up... See below.

except: from link with annotations to make it more detailed.

"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): START UP SCRIPT ARE IN /etc/init.d.
You will see files pcmcia, network and nfslock. You need to change the number so that
pcmcia starts first, then network, then nfslock... example below shows order to be 21, 22, 23.


* 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."

One other way to ensure you do rmmod, modprobe is to put this in the /etc/rc.local file.
this will make sure these steps execute after all inits are done.. but if above is done, you shouldn't
have to do this.. you can as extra insurance..
/etc/rc.local: add below
rmmod ndiswrapper
modload ndiswraper
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ndiswrapper works, but iwconfig does nothing whit2333 Linux - Wireless Networking 4 12-16-2005 05:54 PM
Cable internet works great after reboot only KMFDM Linux - Newbie 5 04-06-2004 10:18 PM
changes weren't saved after reboot in kernel 2.6.4 csvke Linux - Software 2 03-23-2004 08:09 PM
Are iptables saved on reboot? drgowans Linux - Security 4 09-13-2003 03:51 PM
Changes aren'y saved on reboot under blackbox Scratchmaster Linux - Newbie 1 10-08-2002 12:08 PM


All times are GMT -5. The time now is 11:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration