View previous topic :: View next topic |
Author |
Message |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Tue Apr 08, 2008 11:40 am Post subject: [WPA_SUPPLICANT] WEP key problem with Iwl3945 [SOLVED] |
|
|
Hi, I'm using right now wireless-tool to connect to my router. I use a WEP key and everything is fine.
I have the kernel 2.6.24-Gentoo-r4 with the iwl3945 inside the kernel.
So, I want to try the wpa_supplicant with a wep_key.
I have this inside my /etc/conf.d/net
Code: |
sylvain@gentootux ~ $ cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
#WPA_SUPPLICANT
##modules=( "wpa_supplicant" )
##wpa_supplicant_wlan0_="-Dwext"
##config_wlan0=( "dhcp" )
#Wireless tools
dns_domain_lo="homenetwork"
config_eth0="dhcp"
dhcpcd_eth0="-N"
config_gentoonet=( "dhcp" )
key_gentoonet="307b09e7e3979a1f4988afdb82 enc open"
preferred_aps=( "gentoonet" )
#preup()
#{
# if [[ ${IFACE} = "eth1" ]]; then
# sleep 3
# fi
# return 0
# }
sylvain@gentootux ~ $
|
Here's my /etc/wpa_supplicant/wpa_supplicant.conf
Code: |
sylvain@gentootux ~ $ cat /etc/wpa_supplicant/wpa_supplicant.conf
# This is a network block that connects to any unsecured access point.
# We give it a low priority so any defined blocks are preferred.
network={
key_mgmt=NONE
priority=-9999999
}
network={
ssid="gentoonet"
key_mgmt=NONE
wep_key0="specialkey"
wep_tx_keyidx=0
priority=5
}
|
If I comment my Wireless tool section and I actived my WPA_SUPPLICANT config, I cannot connect to my IP.
Also, if I run this as root or as user I have this :
Code: |
[root@gentootux ~]# wpa_gui
The gui comes up and then I get this:
Failed to open control connection to wpa_supplicant.
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
PING failed - trying to reconnect
|
How can I debug this thing ?
Last edited by d2_racing on Wed Apr 09, 2008 8:49 pm; edited 3 times in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
loisl Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/8728771204390423a906d7.jpg)
Joined: 18 Apr 2004 Posts: 167 Location: Egelsbach
|
Posted: Tue Apr 08, 2008 12:02 pm Post subject: |
|
|
Hai,
it costed me many nerves to get this running ... maybe I can save some of Yours
I suppose You have emerged the firmware for Your iwl3945
My findings are that 1st the hardware based scan of SSID's does not work with the iwlwifi drivers (don't ask me why), and 2nd the wlan0 interface has to be explicitly set to up before wpa_supplicant starts.
Here is my wpa_supplicant.conf Code: | update_config=1
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
eapol_version=2
ap_scan=0
fast_reauth=1
network={
ssid="the SSID"
proto=WPA2
key_mgmt=WPA-PSK
group=TKIP
pairwise=TKIP CCMP
psk="nixdiefingers"
}
|
The important entry is ap_scan=0. You can find a commented wpa_supplicant.conf in /usr/share/doc.
My /etc/conf.d/net reads as follows Code: | modules=( "dhcpcd" "!iwconfig" "wpa_supplicant" )
dns_domain="maus.homelinux.net"
dns_search="maus.homelinux.net"
dns_servers="192.168.100.210 192.168.100.200 217.237.150.33"
dns_options=( "timeout 1" "rotate" )
config_eth0=( "dhcp" )
dhcpcd_eth0="-t 30 -L -H"
wpa_supplicant_wlan0="-Dwext"
#Comment this out otherwise a restart of wlan0 is not possible!
#associate_timeout_wlan0=90
config_wlan0=( "dhcp" )
dhcpcd_wlan0="-t 30 -L -H"
preup() {
if [[ ${IFACE} = "wlan0" ]]; then
ebegin "set interface to up"
ifconfig ${IFACE} up
eend
ebegin "set rate to auto"
iwconfig ${IFACE} rate auto
eend
fi
return 0
}
|
Hope this helps a bit
Last edited by loisl on Tue Apr 08, 2008 12:10 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Tue Apr 08, 2008 12:09 pm Post subject: |
|
|
I will try that tonight. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Tue Apr 08, 2008 11:56 pm Post subject: |
|
|
I have the same result. Is there any log files or something that I could check to see what is going on ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Apr 09, 2008 12:45 am Post subject: |
|
|
New information :
Code: |
/etc/init.d/net.wlan0 start
* Starting wlan0
* Starting wpa_supplicant on wlan0 ...
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported [ ok ]th param 5 value 0x1 -
* Starting wpa_cli on wlan0 ... [ ok ]
* Backgrounding ...
wlan0: Initial auth_alg=0
wlan0: authenticate with AP 00:17:9a:21:f8:28
wlan0: privacy configuration mismatch and mixed-cell disabled - disassociate
wlan0: Initial auth_alg=0
wlan0: authenticate with AP 00:1a:70:62:40:88
wlan0: Initial auth_alg=0
wlan0: authenticate with AP 00:1a:70:62:40:88
wlan0: authenticate with AP 00:1a:70:62:40:88
wlan0: authenticate with AP 00:1a:70:62:40:88
wlan0: authentication with AP 00:1a:70:62:40:88 timed out
wlan0: authentication frame received from 00:1a:70:62:40:88, but not in authenticate state - ignored
wlan0: authentication frame received from 00:1a:70:62:40:88, but not in authenticate state - ignored
wlan0: authentication frame received from 00:1a:70:62:40:88, but not in authenticate state - ignored
wlan0: authentication frame received from 00:1a:70:62:40:88, but not in authenticate state - ignored
wlan0: authentication frame received from 00:1a:70:62:40:88, but not in authenticate state - ignored
wlan0: authentication frame received from 00:1a:70:62:40:88, but not in authenticate state - ignored
ADDRCONF(NETDEV_UP): wlan0: link is not ready
wlan0: Initial auth_alg=0
wlan0: authenticate with AP 00:1a:70:62:40:88
wlan0: RX authentication from 00:1a:70:62:40:88 (alg=0 transaction=2 status=0)
wlan0: authenticated
wlan0: associate with AP 00:1a:70:62:40:88
wlan0: authentication frame received from 00:1a:70:62:40:88, but not in authenticate state - ignored
wlan0: RX AssocResp from 00:1a:70:62:40:88 (capab=0x411 status=0 aid=1)
wlan0: associated
ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
wlan0: no IPv6 routers present
wlan0: disassociate(reason=3)
wlan0: Initial auth_alg=0
wlan0: authenticate with AP 00:1a:70:62:40:88
wlan0: RX authentication from 00:1a:70:62:40:88 (alg=0 transaction=2 status=0)
wlan0: authenticated
wlan0: associate with AP 00:1a:70:62:40:88
wlan0: RX AssocResp from 00:1a:70:62:40:88 (capab=0x411 status=0 aid=1)
wlan0: associated
ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
gentootux ~ # ifconfig -a
irda0 Lien encap:IrLAP HWaddr 00:00:00:00
NOARP MTU:2048 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:8
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
lo Lien encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
sit0 Lien encap:IPv6-dans-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
wlan0 Lien encap:Ethernet HWaddr 00:1B:77:4F:4B:1A
adr inet6: fe80::21b:77ff:fe4f:4b1a/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:0 (0.0 b) TX bytes:2736 (2.6 Kb)
wmaster0 Lien encap:UNSPEC HWaddr 00-1B-77-4F-4B-1A-C0-09-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
|
It seems that I can associate my routeur, but I cannot have a IP adress ??? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Apr 09, 2008 1:44 am Post subject: |
|
|
I tried also the WPA2 Personnal with no luck :
Code: |
cat /etc/conf.d/net
#WPA_SUPPLICANT
##modules=( "wpa_supplicant" )
##wpa_supplicant_wlan0_="-Dwext"
##config_wlan0=( "dhcp" )
cat /etc/wpa_supplicant/wpa_supplicant.conf
#ctrl_interface=/var/run/wpa_supplicant
#ctrl_interface_group=wheel
#ap_scan=0
#update_config=1
network={
ssid="gentoonet"
psk="3zr2xbg7gentoo"
proto=WPA2
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
priority=5
}
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Apr 09, 2008 1:55 am Post subject: |
|
|
What am I doing wrong ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Apr 09, 2008 2:36 am Post subject: |
|
|
It drive me insane, I can connect to my network with wlassistant. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Apr 09, 2008 2:47 am Post subject: |
|
|
In fact, look at my wpa_cli after a connection with wassistant
Code: |
gentootux ~ # wpa_cli status
Selected interface 'wlan0'
bssid=00:1a:70:62:40:88
ssid=gentoonet
id=0
pairwise_cipher=CCMP
group_cipher=TKIP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.168.1.102
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Apr 09, 2008 2:52 am Post subject: |
|
|
My new config WPA2 file
Code: |
cat /etc/wpa_supplicant/wpa_supplicant.conf
#ctrl_interface=/var/run/wpa_supplicant
#ctrl_interface_group=wheel
ap_scan=0
#update_config=1
network={
ssid="gentoonet"
psk="3zr2xbg7gentoo"
proto=WPA2
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
priority=5
}
|
Code: |
gentootux ~ # cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
#WPA_SUPPLICANT
modules=( "wpa_supplicant" )
wpa_supplicant_wlan0_="-Dwext"
config_wlan0=( "dhcp" )
##dhcpcd_wlan0="-t 30 -L - H"
#Wireless tools
##dns_domain_lo="homenetwork"
##config_eth0="dhcp"
##dhcpcd_eth0="-N"
##config_gentoonet=( "dhcp" )
##key_gentoonet="307b09e7e3979a1f4988afdb83 enc open"
##preferred_aps=( "gentoonet" )
#preup()
#{
# if [[ ${IFACE} = "eth1" ]]; then
# sleep 3
# fi
# return 0
# }
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jcat Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/8613556479655c309323.jpg)
Joined: 26 May 2006 Posts: 1337
|
Posted: Wed Apr 09, 2008 12:57 pm Post subject: |
|
|
I use iwl3945 with wpa_supplicant, but I've not got my laptop with me. If I get a chance later I'll post my config here for comparison.
Once thing I've noticed with the module that's included in the 2.6.24 kernel is that if you stop net.wlan0 (my WiFi interface) then you need to reload the kernel mod before starting it, otherwise the module just seems to bomb out.
Cheers,
jcat |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Apr 09, 2008 2:08 pm Post subject: |
|
|
In fact, I saw that last night with my testing. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
loisl Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/8728771204390423a906d7.jpg)
Joined: 18 Apr 2004 Posts: 167 Location: Egelsbach
|
Posted: Wed Apr 09, 2008 7:56 pm Post subject: |
|
|
jcat wrote: |
Once thing I've noticed with the module that's included in the 2.6.24 kernel is that if you stop net.wlan0 (my WiFi interface) then you need to reload the kernel mod before starting it, otherwise the module just seems to bomb out. |
This was the case for mine as well, then I had a closer look to error mesages I got when I did a /etc/init.d/net.wlan restart. I had to coment out associate_timeout_wlan0 in /etc/conf.d/net. But I have a iwl4965, not a iwl3945 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
loisl Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/8728771204390423a906d7.jpg)
Joined: 18 Apr 2004 Posts: 167 Location: Egelsbach
|
Posted: Wed Apr 09, 2008 8:01 pm Post subject: |
|
|
d2_racing wrote: | Code: |
gentootux ~ # cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
#WPA_SUPPLICANT
modules=( "wpa_supplicant" )
|
|
What makes me suspicious is that "dhchcd" is missing in Your modules statement. The modules statement is a bash variable assignment and overides all defaults. So maybe without the "dhcpcd" baselayout may not know, how to run the/which DHCP deamon for the interface. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jeanfrancis Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_brainslug.gif)
Joined: 17 Dec 2005 Posts: 1482 Location: Québec, Canada
|
Posted: Wed Apr 09, 2008 8:05 pm Post subject: |
|
|
One of the problems here is the wpa_supplicant configuration file, it specifies group=CCMP, and wpa_cli, once connected, says group_cipher=TKIP ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d2_racing Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1190120345458c61e31ec3c.jpg)
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Apr 09, 2008 8:49 pm Post subject: |
|
|
I changed my routeur to AES and everything is fine.
Great
Solved ! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|