Discussion:
ap_scan=2 problem?
YenJung Chang
2005-03-03 02:41:14 UTC
Permalink
Hi, List and Jouni,

I tested wpa_supplicant with ap_scan=1 and ap_scan=2, and it seems
there is some problem on ap_scan=2.

The testing steps on ap_scan=1 and ap_scan=2 are same:
1. $ wpa_supplicant.conf -i ath0 -c/etc/wpa_supplicant.conf -d > supp1.log
2. $ wpa_cli status (make sure the connection is created)
3. $ wpa_cli reassociate ( force wpa_supplicant to reassociate)
4. $ wpa_cli status (check is it connected?)

The connection with ap_scan=1 is re-created successfully, but failed
with ap_scan=2.

Following is my wpa_supplicant.conf
==============================================
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1
network={
ssid="*spencer*"
key_mgmt=NONE
}
==============================================

and attached supp1.log is the log when tested ap_scan=1 and supp2.log
is ap_scan=2.
Is it meaning there is some problem on ap_scan=2?

ps.
There is another stranger behavior on ap_scan=2. The connection to AP
is hard to create
if the wpa_supplicant commad is "wpa_supplicant -i ath0 -c
/etc/wpa_supplicant.conf -d",
but the connection is created successfuly if the command is
"wpa_supplicant -i ath0 -c /etc/wpa_supplicant.conf -d > /tmp/supp2.log".
The only difference is that the output log is redirected to a file.
I have no idea what cause that. And I can not post the failed log, bcz
it would not fail when I redirect the log to a file. :S.

Regards,
Spencer.
YenJung Chang
2005-03-03 03:02:27 UTC
Permalink
Post by YenJung Chang
Hi, List and Jouni,
I tested wpa_supplicant with ap_scan=1 and ap_scan=2, and it seems
there is some problem on ap_scan=2.
1. $ wpa_supplicant.conf -i ath0 -c/etc/wpa_supplicant.conf -d > supp1.log
2. $ wpa_cli status (make sure the connection is created)
3. $ wpa_cli reassociate ( force wpa_supplicant to reassociate)
4. $ wpa_cli status (check is it connected?)
The connection with ap_scan=1 is re-created successfully, but failed
with ap_scan=2.
Following is my wpa_supplicant.conf
==============================================
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1
network={
ssid="*spencer*"
key_mgmt=NONE
}
==============================================
and attached supp1.log is the log when tested ap_scan=1 and supp2.log
is ap_scan=2.
Is it meaning there is some problem on ap_scan=2?
ps.
There is another stranger behavior on ap_scan=2. The connection to AP
is hard to create
if the wpa_supplicant commad is "wpa_supplicant -i ath0 -c
/etc/wpa_supplicant.conf -d",
but the connection is created successfuly if the command is
"wpa_supplicant -i ath0 -c /etc/wpa_supplicant.conf -d > /tmp/supp2.log".
The only difference is that the output log is redirected to a file.
I have no idea what cause that. And I can not post the failed log, bcz
it would not fail when I redirect the log to a file. :S.
One thing missed. The used driver is Madwifi.
Jouni Malinen
2005-03-03 04:18:00 UTC
Permalink
Post by YenJung Chang
I tested wpa_supplicant with ap_scan=1 and ap_scan=2, and it seems
there is some problem on ap_scan=2.
1. $ wpa_supplicant.conf -i ath0 -c/etc/wpa_supplicant.conf -d > supp1.log
I don't think the current madwifi driver and interface code for that in
wpa_supplicant support ap_scan=2.
--
Jouni Malinen PGP id EFC895FA
YenJung Chang
2005-03-03 05:54:46 UTC
Permalink
Post by Jouni Malinen
Post by YenJung Chang
I tested wpa_supplicant with ap_scan=1 and ap_scan=2, and it seems
there is some problem on ap_scan=2.
1. $ wpa_supplicant.conf -i ath0 -c/etc/wpa_supplicant.conf -d > supp1.log
I don't think the current madwifi driver and interface code for that in
wpa_supplicant support ap_scan=2.
--
Jouni Malinen PGP id EFC895FA
_______________________________________________
HostAP mailing list
http://lists.shmoo.com/mailman/listinfo/hostap
What I am curious is the connection to AP could be created
successfully with ap_scan=2 at first time, but it failed after
"wpa_cli reassoicate".
Does it make sense?

Regards,
YJ.
YenJung Chang
2005-03-03 13:41:46 UTC
Permalink
Post by YenJung Chang
Post by Jouni Malinen
Post by YenJung Chang
I tested wpa_supplicant with ap_scan=1 and ap_scan=2, and it seems
there is some problem on ap_scan=2.
1. $ wpa_supplicant.conf -i ath0 -c/etc/wpa_supplicant.conf -d > supp1.log
I don't think the current madwifi driver and interface code for that in
wpa_supplicant support ap_scan=2.
--
Jouni Malinen PGP id EFC895FA
_______________________________________________
HostAP mailing list
http://lists.shmoo.com/mailman/listinfo/hostap
What I am curious is the connection to AP could be created
successfully with ap_scan=2 at first time, but it failed after
"wpa_cli reassoicate".
Does it make sense?
Regards,
YJ.
After suveyed the Madwifi source code, I guess the roaming parameter
set to madwifi when ap_scan=2 should be 1, not 0.
Because Madwifi would not start its state machine of authentication
and association after set essid if the roaming parameter is not 1.
I modified the parameter as following:

--- driver_madwifi.c
+++ driver_madwifi.c
@@ -309,7 +309,7 @@
* roaming */
/* FIX: this does not seem to work; would probably need to
* change something in the driver */
- if (set80211param(drv, IEEE80211_PARAM_ROAMING, 0, 1) < 0)
+ if (set80211param(drv, IEEE80211_PARAM_ROAMING, 1, 1) < 0)
ret = -1;

I tried it without security and it seems work well. But I have no idea
if the modification has any side effect.
Any comment?

Regards,
YJ.
YenJung Chang
2005-03-08 01:38:41 UTC
Permalink
Post by YenJung Chang
Post by YenJung Chang
Post by Jouni Malinen
Post by YenJung Chang
I tested wpa_supplicant with ap_scan=1 and ap_scan=2, and it seems
there is some problem on ap_scan=2.
1. $ wpa_supplicant.conf -i ath0 -c/etc/wpa_supplicant.conf -d > supp1.log
I don't think the current madwifi driver and interface code for that in
wpa_supplicant support ap_scan=2.
--
Jouni Malinen PGP id EFC895FA
_______________________________________________
HostAP mailing list
http://lists.shmoo.com/mailman/listinfo/hostap
What I am curious is the connection to AP could be created
successfully with ap_scan=2 at first time, but it failed after
"wpa_cli reassoicate".
Does it make sense?
Regards,
YJ.
After suveyed the Madwifi source code, I guess the roaming parameter
set to madwifi when ap_scan=2 should be 1, not 0.
Because Madwifi would not start its state machine of authentication
and association after set essid if the roaming parameter is not 1.
--- driver_madwifi.c
+++ driver_madwifi.c
@@ -309,7 +309,7 @@
* roaming */
/* FIX: this does not seem to work; would probably need to
* change something in the driver */
- if (set80211param(drv, IEEE80211_PARAM_ROAMING, 0, 1) < 0)
+ if (set80211param(drv, IEEE80211_PARAM_ROAMING, 1, 1) < 0)
ret = -1;
I tried it without security and it seems work well. But I have no idea
if the modification has any side effect.
Any comment?
Regards,
YJ.
Jouni,

You are right. I tested ap_scan=2 with above patch few days.
It still has some problem on it. Madwifi does not support ap_scan=2 well.

FYI.

YJ.

Shawn Adams
2005-03-03 17:23:25 UTC
Permalink
Perhaps someone can clarify some confusion on my part.

Does the latest CVS madwifi support restricted mode ?

It seems that the madwifi driver works with certain APs fine in OPEN
mode, but as soon as I try to use WEP-104, the AP is reporting that the
card is still trying to use OPEN mode.

thanks for any clarification
--
Shawn Adams
***@web.de
Loading...