Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unable to set password for wireless
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
edward_scott
Apprentice
Apprentice


Joined: 17 Jan 2006
Posts: 165

PostPosted: Tue Dec 05, 2006 6:31 am    Post subject: unable to set password for wireless Reply with quote

I have been setting up my wireless for the first time. I initially had a problem getting an interface to my wireless card, as discussed here. that problem was solved, and what I am facing now is a different problem, so I thought I would move it to its own thread.

the interface to the wireless card seems to be working, as I am able to connect to unsecured wirless networks and browse the internet just fine. I cannot get it to work with a secured network though.

I read the the gentoo documentation on wireless networking, including the part about setting up the keys in chapter 4.c. accordingly I set up my /etc/conf.d/net as follows:

Quote:
modules=("iwconfig")
key_Flat3="[1] s:password key [1] enc open"
preferred_aps=("Flat3")
associate_order="forceany"


when I try to start /etc/init.d/net.wlan0, however, I get the following output:

Quote:
Starting wlan0
Configuring wireless network for wlan0
wlan0 does not support setting keys
or the parameter "mac_key_Flat3" or "key_Flat3" is incorrect
Trying to force preferred in case they are hidden
Failed to associate with any preferred access points on wlan0
WEP key is not set for "2WIRE626" - not connecting
WEP key is not set for "2WIRE081" - not connecting
WEP key is not set for "Hunee14" - not connecting
Couldn't associate with any access points on wlan0
Failed to configure wireless for wlan0


if I try it manually, I run iwconfig wlan0 essid Flat3 followed by iwconfig wlan0 key s:password. then I get the following output:

Quote:
Error for wireless request "Set Encode" (8B2A) :
SET failed on device wlan0 ; Invalid argument.


no matter how I present the argument, with or without quotes, with or without the word key, with or without enc open before/after the key argument, it always complains that my argument is invalid. I copied some of the examples in iwconfig's man page exactly and it still complained.

similarly I have tried other ways of formatting the key_Flat3 argument in my /etc/conf.d/net file. it always complains that either wlan0 does not support keys, or the parameter key_Flat3 is incorrect.

obviously I wonder whether I for some reason do not have support for keys. (how would I tell?). but that is not the complaint when I try to set the key with iwconfig myself -- it always always complains about the argument being invalid. this confuses me greatly. when I initially encountered this problem I was running wireless-tools 1.20r1. I upgraded to 1.25, which is the latest unmasked version in portage, but the symptoms of the problem did not change. my wireless card is a linksys wireless-g pci adapter, model WMP54GS.

has anyone else encountered this problem? any help or suggestions would be greatly appreciated.
Back to top
View user's profile Send private message
no_hope
Guru
Guru


Joined: 23 Jun 2003
Posts: 482

PostPosted: Tue Dec 05, 2006 2:19 pm    Post subject: Re: unable to set password for wireless Reply with quote

Code:
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.


This indeed sounds like you don't have a module loaded that is necessary for encryption.

You probably need to load an extra module that came with the driver or enable some functionality in the kernel. dmesg should tell you what failed or is missing.
Back to top
View user's profile Send private message
edward_scott
Apprentice
Apprentice


Joined: 17 Jan 2006
Posts: 165

PostPosted: Wed Dec 06, 2006 3:53 am    Post subject: Reply with quote

hm... so here are the relevant parts of dmesg after boot:

Quote:
ndiswrapper: no version for "struct_module" found: kernel tainted.
ndiswrapper version 1.25 loaded (preempt=no,smp=yes)
ndiswrapper: driver wmp54gs (Linksys,12/22/2004, 3.100.46.0) loaded
ACPI: PCI Interrupt 0000:02:03.0[A] -> GSI 19 (level, low) -> IRQ 19
ndiswrapper: using IRQ 19
wlan0: vendor: ''
wlan0: ethernet device 00:18:39:15:1f:18 using NDIS driver wmp54gs, 14E4:4318.5.conf
wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK
usbcore: registered new driver ndiswrapper


and after trying to manually call 'iwconfig wlan0 key s:password':

Quote:
ndiswrapper (add_wep_key:819): adding encryption key 1 failed (C0010015)
ndiswrapper (add_wep_key:819): adding encryption key 1 failed (C0010015)


I'm not sure what the 'kernel tainted' line in the first one means. honestly I don't quite know how to interpret this. if I am missing a module, how do I figure out which one?

any guidance would be greatly appreciated. in case it is helpful, here is the output of an lsmod:

Quote:
Module Size Used by
snd_seq_midi 6176 0
snd_emu10k1_synth 5632 0
snd_emux_synth 22784 1 snd_emu10k1_synth
snd_seq_virmidi 5248 1 snd_emux_synth
snd_seq_midi_event 4352 2 snd_seq_midi,snd_seq_virmidi
snd_seq_midi_emul 4864 1 snd_emux_synth
snd_seq 33360 5 snd_seq_midi,snd_emux_synth,snd_seq_virmidi,snd_seq_midi_event,snd_seq_midi_emul
snd_pcm_oss 37408 0
snd_mixer_oss 13568 1 snd_pcm_oss
lirc_mceusb2 8836 0
lirc_dev 11764 1 lirc_mceusb2
parport_pc 27972 0
parport 22984 1 parport_pc
pcspkr 2948 0
e100 26244 0
mii 3968 1 e100
snd_emu10k1 82212 1 snd_emu10k1_synth
snd_rawmidi 15904 3 snd_seq_midi,snd_seq_virmidi,snd_emu10k1
snd_ac97_codec 63520 1 snd_emu10k1
snd_ac97_bus 2176 1 snd_ac97_codec
snd_pcm 52740 3 snd_pcm_oss,snd_emu10k1,snd_ac97_codec
snd_seq_device 5644 5 snd_seq_midi,snd_emu10k1_synth,snd_seq,snd_emu10k1,snd_rawmidi
snd_timer 16132 3 snd_seq,snd_emu10k1,snd_pcm
snd_page_alloc 7432 2 snd_emu10k1,snd_pcm
snd_util_mem 2688 2 snd_emux_synth,snd_emu10k1
snd_hwdep 6916 2 snd_emux_synth,snd_emu10k1
snd 31460 12 snd_emux_synth,snd_seq_virmidi,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_emu10k1,snd_rawmidi,snd_ac97_codec,snd_pcm,snd_seq_device,snd_timer,snd_hwdep
soundcore 5600 1 snd
nvidia 4220884 0
rtc 10036 0
ndiswrapper 117620 0
dm_mirror 15312 0
dm_mod 37272 1 dm_mirror
pdc_adma 7172 0
sata_mv 13576 0
ata_piix 7812 3
ahci 10116 0
sata_qstor 7428 0
sata_vsc 6404 0
sata_uli 5636 0
sata_sis 6148 0
sata_sx4 10884 0
sata_nv 6916 0
sata_via 6660 0
sata_svw 5892 0
sata_sil24 8580 0
sata_sil 7560 0
sata_promise 8708 0
libata 37132 15 pdc_adma,sata_mv,ata_piix,ahci,sata_qstor,sata_vsc,sata_uli,sata_sis,sata_sx4,sata_nv,sata_via,sata_svw,sata_sil24,sata_sil,sata_promise
sbp2 16516 0
ohci1394 26160 0
ieee1394 57656 2 sbp2,ohci1394
sl811_hcd 10368 0
ohci_hcd 15748 0
uhci_hcd 24976 0
usb_storage 50880 0
usbhid 30432 0
ehci_hcd 23048 0
usbcore 82436 9 lirc_mceusb2,ndiswrapper,sl811_hcd,ohci_hcd,uhci_hcd,usb_storage,usbhid,ehci_hcd
Back to top
View user's profile Send private message
no_hope
Guru
Guru


Joined: 23 Jun 2003
Posts: 482

PostPosted: Wed Dec 06, 2006 1:59 pm    Post subject: Reply with quote

ndiswrapper is a pain.

It's probably not a missing module issue, otherwise in dmesg you should have seen an error about a missing function.

Don't worry about the "tainted kernel" message, it just means that not all code in your kernel is released under the GPL

This is a bit of a shot in the dark, but what's the output of ndiswrapper -l and iwpriv <your wireless interface>
Back to top
View user's profile Send private message
edward_scott
Apprentice
Apprentice


Joined: 17 Jan 2006
Posts: 165

PostPosted: Thu Dec 07, 2006 7:45 am    Post subject: Reply with quote

ndiwswrapper -l

Quote:
installed drivers:
wmp54gs driver installed, hardware (14E4:4320) present


iwpriv wlan0

Quote:
wlan0 Available private ioctls :
ndis_reset (8BF0) : set 0 & get 0
power_profile (8BF1) : set 1 int & get 0
network_type (8BF2) : set 1 char & get 0
usb_reset (8BF3) : set 0 & get 0
media_stream (8BF4) : set 1 int & get 0
set_encr_mode (8BF5) : set 1 int & get 0
set_auth_mode (8BF6) : set 1 int & get 0
reload_defaults (8BF7) : set 0 & get 0



another interesting thing I noticed -- iwconfig doesn't seem to be able to set the ESSID to connect to. when I run 'iwconfig wlan0 essid Flat3' it doesn't complain or give any error, but a subsequent call to 'iwconfig wlan0' shows that the ESSID is set to None/Any. I'm sure that's the right syntax. just as I am sure I am using the right syntax to set the key, which not only fails to set the key but fails with an error.

thanks for your help so far... I'm totally up the creek at this point.
Back to top
View user's profile Send private message
no_hope
Guru
Guru


Joined: 23 Jun 2003
Posts: 482

PostPosted: Thu Dec 07, 2006 2:07 pm    Post subject: Reply with quote

Inability to set ssid may indicate broken ndiswrapper. Try upgrading to another version.

what's the output of
iwpriv wlan0 set_encr_mode
iwpriv wlan0 set_auth_mode
iwpriv wlan0 network_type

Also, try "ifconfig wlan0 up" after setting ssid
Back to top
View user's profile Send private message
edward_scott
Apprentice
Apprentice


Joined: 17 Jan 2006
Posts: 165

PostPosted: Sat Dec 09, 2006 3:49 am    Post subject: Reply with quote

the iwpriv commands all complained:

Quote:
The command set_encr_mode needs exactly 1 argument(s)...


I tried adding arguments, but then it didn't provide any output or seem to have any effect at all.

I was preivously using ndiswrapper 1.25 and wireless-tools-28. I tried upgrading to ndiswrapper 1.30. no change. I tried upgrading to wireless-tools-29_pre10. still no change.

I thought about switching to wpa_supplicant, but it turns out that it is dependant on severl x11 libraries that are not installed, and are being blocked by some x11 libraries that *are* installed. sorting that out without an internet connection will be a nightmare, so I passed on that option. if anyone else can help me out with wireless-tools here, I am desperately in need!
Back to top
View user's profile Send private message
no_hope
Guru
Guru


Joined: 23 Jun 2003
Posts: 482

PostPosted: Sat Dec 09, 2006 1:43 pm    Post subject: Reply with quote

You should be able to get around package blocking by running
Code:
USE="-qt3 -qt4" emerge -av wpa_supplicant

this should install wpa_supplicant without X support

edit: also try re-emerging ndiswrapper with debug USE flag:
Code:
USE="debug" emerge -av ndiswrapper

That may generate extra debugging info in /var/log/ and dmesg


Last edited by no_hope on Sat Dec 09, 2006 1:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
no_hope
Guru
Guru


Joined: 23 Jun 2003
Posts: 482

PostPosted: Sat Dec 09, 2006 1:50 pm    Post subject: Reply with quote

http://ndiswrapper.sourceforge.net/mediawiki/index.php/Installation has some instructions on how to set up keys. They recommend using "restricted" option. Maybe you should try that

Make sure you enter commands in the right order. I've ran into situations in the past where ssid had to be set before the card was brought up or it wouldn't associate. Stupid things like those are driver specific.
Back to top
View user's profile Send private message
edward_scott
Apprentice
Apprentice


Joined: 17 Jan 2006
Posts: 165

PostPosted: Sat Dec 09, 2006 7:22 pm    Post subject: Reply with quote

no luck. everything seems to work fine, except the line 'iwconfig wlan0 key restricted XXXXXXXX'. no matter how I format the argument, I always get an error about an invalid argument. the once exception, I have found, is if I try
Code:
iwconfig wlan0 key restricted 0123-4567-89
that works without a problem, and when I then restart /etc/init.d/net.wlan0 it doesn't complain -- it tries to connect to the wireless network. It fails of course, since the key is incorrect, but still it fails.

so I am wondering, why on earth does every other call to 'iwconfig wlan0 key ...' complain about invalid arguments? even when I am copying them straight from the man page?

also, I have noticed, that when I call 'iwconfig wlan0 essid ESSID', the output of iwconfig wlan0 always says ESSID:off/any. This seems to be the same regardless of whether wlan0 is down or up.

I'll do some more research on this later on today. hopefully that will yield something.
Back to top
View user's profile Send private message
no_hope
Guru
Guru


Joined: 23 Jun 2003
Posts: 482

PostPosted: Sun Dec 10, 2006 4:10 am    Post subject: Reply with quote

edward_scott wrote:
so I am wondering, why on earth does every other call to 'iwconfig wlan0 key ...' complain about invalid arguments? even when I am copying them straight from the man page?


I believe iwconfig is just a wrapper around ioctls, a convenient way of sending commands to the driver. When you issue an iwconfig command, it just sends that info to the driver. iwconfig can only do very basic checks and probably doesn't do much enforcement in terms of format or value restrictions. In your case it is the driver that rejects the data, not iwconfig.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum