View previous topic :: View next topic |
Author |
Message |
Codo Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/19887300524369dc132ed03.jpg)
Joined: 17 May 2004 Posts: 271
|
Posted: Sat Nov 27, 2004 12:43 pm Post subject: WPA - Gurus wanted |
|
|
Change: Changed subject!
Hello Everybody!
I am starting this thread for two reasons: to fix my problem and to find out what happens, so everybody can find this info later, so any gurus out there!!!
Config:
WG511 v3 "Made in China" with ndiswrapper v0.11 and winbloze drivers from the box
NETGEAR Wireless ADSL Modem / Router / Firewall blablabla
Neighbour has 3com router
wpa_supplicant v0.2.5
baselayout 1.11.6-r1
gcc 3.4.3
/etc/conf.d/net <--- Empty
/etc/conf.d/wireless <--- Empty
/etc/wpa_supplicant.conf
Code: | ctrl_interface=/var/run/wpa_supplicant
network={
ssid="My Network"
psk="MySecretPassword"
proto=WPA
key_mgmt=WPA-PSK
} |
So far so good. Now, I want to make clear that the card WORKS! In fact, it is very stable. I am writing this using the card, but here is where the problem starts.
To make it work, what I do is:
1. make sure ndiswrapper is unloaded
2. Code: | $ wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf |
3. Very quickly run wpa_cli
4. In wpa_cli, there is a message like "Authentication will time out in 10 seconds..."
5. Very quickly, on another terminal Code: | ifconfig wlan0 up
dhcpcd wlan0 |
If I am lucky, the timings will be ok and the link will go up. If I don't follow this order, or if the timing is not right, everything dies and I have to start all over again.
If I use /etc/init.d/net.wlan0 start it will die for sure. I think part of the problem lies in the fact that the net.lo script will try to setup the wireless and setup some ESSID, but the ESSID has been negotiated already, and trying to do anything with ESSID, etc... will kill the card. Maybe I am wrong...
Well, the ideal would be to have wpa_supplicant and net.wlan0 on the default runlevel. Any ideas how to fix this timing issues / fix initscripts / etc?
Thanks.
Last edited by Codo on Mon Nov 29, 2004 11:52 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Nov 29, 2004 10:09 am Post subject: |
|
|
In /etc/conf.d/net
Code: |
modules=( "!iwconfig" )
|
This should be documented in /etc/conf.d/net.example |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Codo Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/19887300524369dc132ed03.jpg)
Joined: 17 May 2004 Posts: 271
|
Posted: Mon Nov 29, 2004 10:51 am Post subject: |
|
|
Aha! I agree totally with you, this will solve the issue about killing the card, but /net/init.d/net.wlan0 will try to bring wlan0 up.
By the way, I have found that it is not necessary to
As I understand it, it is already up, am I wrong? I think the only thing missing would be a
Am I right?
And, what will happen if you go out of range, and then you are in range with another DHCP server... is dhcpcd able to handle this? Would it be necessary to trigger a renegotiation with the new server? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Nov 29, 2004 12:56 pm Post subject: |
|
|
Codo wrote: | Aha! I agree totally with you, this will solve the issue about killing the card, but /net/init.d/net.wlan0 will try to bring wlan0 up. |
Isn't this the desired behaviour? If not, what is?
Quote: |
And, what will happen if you go out of range, and then you are in range with another DHCP server... is dhcpcd able to handle this? Would it be necessary to trigger a renegotiation with the new server? |
DHCP doesn't handle this directly ....
wpa_supplicant may start/stop the net.xxx script when it associates/de-associates with an AP. This handles the DHCP restart. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Codo Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/19887300524369dc132ed03.jpg)
Joined: 17 May 2004 Posts: 271
|
Posted: Mon Nov 29, 2004 1:09 pm Post subject: |
|
|
UberLord wrote: |
Isn't this the desired behaviour? If not, what is?
|
Yes, but /etc/init.d/wpa_supplicant has already brought up the interface, so /etc/init.d/net.lo should avoid bringing it up again and only configure it in case you want DHCP, or fixed IP, etc...
UberLord wrote: |
wpa_supplicant may start/stop the net.xxx script when it associates/de-associates with an AP. This handles the DHCP restart. |
Maybe wpa_supplicant can call
Code: | /etc/init.d/net.wlan0 start / stop | on the specified interface if the above behaviour is supported by /etc/init.d/net.lo (not bringing up the interface, as it is already up), although I can imagine you would like this behaviour with DHCP only... agree?? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Nov 29, 2004 1:33 pm Post subject: |
|
|
Note: I don't use wpa_supplicant as my hardware doesn't support it.
Is there a problem with issuing iconfig ethx up when it's already up? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Codo Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/19887300524369dc132ed03.jpg)
Joined: 17 May 2004 Posts: 271
|
Posted: Mon Nov 29, 2004 3:23 pm Post subject: |
|
|
UberLord wrote: | Note: I don't use wpa_supplicant as my hardware doesn't support it. |
You can use wpa_supplicant with WEP, I think, if you want to do some testing...
UberLord wrote: | Is there a problem with issuing ifconfig ethx up when it's already up? |
I'm now at the office, but as soon as I go back home I'll confirm this. I think it kills the card and becomes unusable. I remember commenting out ifconfig {$IFACE} up in /etc/init.d/wpa_supplicant. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Nov 29, 2004 6:17 pm Post subject: |
|
|
FYI I cannot get wpa_supplicant + WEP working at all with my prism54 card. I've tried both the -Dprism54 and -Dwext options, but prism54 cannot set the wep key and wext cannot associate :/
Please ensure that this is not what you're getting |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Codo Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/19887300524369dc132ed03.jpg)
Joined: 17 May 2004 Posts: 271
|
Posted: Mon Nov 29, 2004 9:43 pm Post subject: |
|
|
Ok, I think I have found something very interesting indeed.
1. in /etc/init.d/wpa_supplicant I commented out Code: | ifconfig ${IFACE} up |
2. My /etc/conf.d/wpa_supplicant Code: | # List of interfaces
INTERFACES="wlan0"
# Common arguments to all wpa_supplicant instances
ARGS="-Dndiswrapper"
# Interface specific arguments
# ARGS_wlan0="" |
3. I have added wpa_supplicant to the default runlevel
4. I have REMOVED any net.wlan0 from any runlevel...
5. My /etc/conf.d/wireless: Code: | modules=( "!iwconfig" ) |
reboot...
And wpa_supplicant brings up everything, even the script...: Code: | $ /etc/init.d/status
* status: started |
Code: | # rc-update show | grep "net\."
net.eth0 |
net.lo | boot
net.ppp0 |
net.wlan0 | |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|