WPA_CLI: Difficulty switching from 1connection to another

George S. Lockwood gslockwood
Tue Aug 8 17:01:38 PDT 2006


As requested here is a log of a case of it not connecting to a network after
a connection is established.  In fact this is trying to connect to the very
same network that it was connected to just before.  Sorry couldn't get all
the console msgs but you can see that the connection is authenticated.

Please note: I've added the time to the console msgs, and yes I see that
sometimes it get written twice, not sure why at this moment, but that is not
my concern just now.


Steps:

   1.  wpa_supplicant loads a config file with not ap_scan var and valid
   network variable settings for a network called FeatherSecure.

   2.  through wpa_cli I send a ap_scan=2 command. (because it is
   hidden).

   3. through wpa_cli I send a scan command.

   4.  through wpa_cli I send select_network "FeatherSecure" command.

     I wait for the connection to be established

   5. Then through wpa_cli I send a disconnect command.

   6. through wpa_cli I send another ap_scan=2 command.

   7. through wpa_cli I send another scan command.

   8. through wpa_cli I send another select_network "FeatherSecure"
   command

   9. At this point it just sits there.



console msgs:


16:41:52: WPA: Sending EAPOL-Key 2/2
16:41:52: WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 03 11 00 20 00
00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 0
0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
0 00 00 00 00 00 00 00 00 ab 6c 72 6b 74 28 48 88 22 b3 db c7 4e 65 65 77 00
00
16:41:52: WPA: Key negotiation completed with 00:0d:97:00:48:0f [PTK=TKIP
GTK=TKIP]
16:41:52: CTRL_IFACE monitor send 127.0.0.1:2797
16:41:52: Cancelling authentication timeout
16:41:52: State: GROUP_HANDSHAKE -> COMPLETED
16:41:52: CTRL-EVENT-CONNECTED - Connection to 00:0d:97:00:48:0f completed
(auth) [id=0 id_str=]
16:41:52: CTRL_IFACE monitor send 127.0.0.1:2797
16:41:52: EAPOL: External notification - portValid=1
16:41:52: EAPOL: SUPP_PAE entering state AUTHENTICATED
16:42:19: EAPOL: startWhen --> 0
16:42:21: EAPOL: authWhile --> 0
RX ctrl_iface - hexdump_ascii(len=10):
     44 49 53 43 4f 4e 4e 45 43 54                     DISCONNECT
16:42:21: State: COMPLETED -> DISCONNECTED
16:42:21: 16:42:21: NDIS: Set OID 0d010102 - hexdump(len=36): [REMOVED]
16:42:22: MSNdis_StatusMediaDisconnect
16:42:22:   InstanceName: 'Intel(R) PRO/Wireless 2200BG Network Connection
#2'
16:42:22: __func__ not defined: oid=0xd010101 len (6) failed
16:42:22: 16:42:22: NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
16:42:22: 16:42:22: NDIS: Set OID 0d010114 - hexdump(len=4): [REMOVED]
16:42:22: __func__ not defined: oid=0xd010101 len (6) failed
16:42:22: 16:42:22: NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
16:42:22: 16:42:22: NDIS: Set OID 0d010114 - hexdump(len=4): [REMOVED]
16:42:22: __func__ not defined: oid=0xd010101 len (6) failed
16:42:22: 16:42:22: NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
16:42:22: 16:42:22: NDIS: Set OID 0d010114 - hexdump(len=4): [REMOVED]
16:42:22: __func__ not defined: oid=0xd010101 len (6) failed
16:42:22: 16:42:22: NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
16:42:22: 16:42:22: NDIS: Set OID 0d010114 - hexdump(len=4): [REMOVED]
16:42:22: 16:42:22: NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
16:42:22: EAPOL: External notification - portEnabled=0
16:42:22: EAPOL: SUPP_PAE entering state DISCONNECTED
16:42:22: EAPOL: SUPP_BE entering state INITIALIZE
16:42:22: EAP: EAP entering state DISABLED
16:42:22: EAPOL: External notification - portValid=0
16:42:22: NDIS: received event data - hexdump(len=55): 01 00 00 00 32 49 6e
74 65 6c 28 52 29 20 50 52 4f 2f 57 69 72 65 6c 65 73 73
 20 32 32 30 30 42 47 20 4e 65 74 77 6f 72 6b 20 43 6f 6e 6e 65 63 74 69 6f
6e 20 23 32
16:42:22: NDIS: event - type 1
NDIS: event InstanceName - hexdump_ascii(len=50):
     49 6e 74 65 6c 28 52 29 20 50 52 4f 2f 57 69 72   Intel(R) PRO/Wir
     65 6c 65 73 73 20 32 32 30 30 42 47 20 4e 65 74   eless 2200BG Net
     77 6f 72 6b 20 43 6f 6e 6e 65 63 74 69 6f 6e 20   work Connection
     23 32                                             #2
16:42:22: NDIS: Media Disconnect Event
16:42:22: Added BSSID 00:0d:97:00:48:0f into blacklist
16:42:22: State: DISCONNECTED -> DISCONNECTED
16:42:22: EAPOL: External notification - portEnabled=0
16:42:22: EAPOL: External notification - portValid=0
16:42:22: CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
16:42:22: CTRL_IFACE monitor send 127.0.0.1:2797
16:42:22: __func__ not defined: oid=0xd010101 len (6) failed
16:42:22: 16:42:22: NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
16:42:22: 16:42:22: NDIS: Set OID 0d010114 - hexdump(len=4): [REMOVED]
16:42:22: __func__ not defined: oid=0xd010101 len (6) failed
16:42:22: 16:42:22: NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
16:42:22: 16:42:22: NDIS: Set OID 0d010114 - hexdump(len=4): [REMOVED]
16:42:22: __func__ not defined: oid=0xd010101 len (6) failed
16:42:22: 16:42:22: NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
16:42:22: 16:42:22: NDIS: Set OID 0d010114 - hexdump(len=4): [REMOVED]
16:42:22: __func__ not defined: oid=0xd010101 len (6) failed
16:42:22: 16:42:22: NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]
16:42:22: 16:42:22: NDIS: Set OID 0d010114 - hexdump(len=4): [REMOVED]
16:42:22: 16:42:22: NDIS: Set OID 0d01011e - hexdump(len=16): [REMOVED]


now another select_network of the same network


RX ctrl_iface - hexdump_ascii(len=9):
     41 50 5f 53 43 41 4e 20 32                        AP_SCAN 2
RX ctrl_iface - hexdump_ascii(len=4):
     53 43 41 4e                                       SCAN
16:42:30: Setting scan request: 0 sec 0 usec
16:42:50: EAPOL: idleWhile --> 0
RX ctrl_iface - hexdump_ascii(len=28):
     53 45 4c 45 43 54 5f 4e 45 54 57 4f 52 4b 20 46   SELECT_NETWORK F
     65 61 74 68 65 72 53 65 63 75 72 65               eatherSecure
16:44:45: CTRL_IFACE: SELECT_NETWORK id=0
16:44:45: Setting scan request: 0 sec 0 usec


Hope this helps you determine what I'm not doing or what is missing.


george



On 8/5/06, George S. Lockwood <gslockwood at gmail.com> wrote:
>
> I can get you a log and a list of commands, but not until Monday am
> Pacific Standard Time.
>
> In the meantime, I just sent you a synopsis of what I'm wanting to
> achieve.  Perhaps you can add comments / correct my steps.
>
> Or just provide the proper sequence of commands to accomplish my highlevel
> goal (please see below).
>
>
> Highlevel
> My hopes are to send a series of commands to the supplicant in order to
> connect to a number of different networks with a countless number of
> identities and passwords (I'll take care of the other security variables
> such as eap and phase, etc).
>
> Hopefully this makes sense.
>
> Tell you what, if you could send me the proper sequence of commands list.
> I'll try it out to the 'T' and send you the log that comes from it (if
> doesn't work).  That way you are in charge and really know how to examine
> the logged results.
>
> sound reasonable?
>
> as always thanks so much!!
>
> george
>
>
> On 8/5/06, Jouni Malinen <jkmaline at cc.hut.fi > wrote:
> >
> > On Fri, Aug 04, 2006 at 07:40:49AM -0700, George S. Lockwood wrote:
> > >   3. I can successfully enable on of the networks and get it to
> > >   connect.  I believe I do the following:
> > >      1. list the networks
> > >      2. enable the one I want
> > >      3. select the one I want (not sure the difference between enable
> > >      and select)
> > >      4. reassociate.
> >
> > Enabling a network will only enable one of the networks without changing
> > ocnfiguration for other networks. Selecting a network enables the
> > selected network and disables all other networks.
> >
> > >   5. Trying to repeat the substeps of Step 3. to connect to a
> > different
> > >   network (or the same again) doesn't establish the connection.
> >
> > Please send the full set of commands you tried and include description
> > on which command did not work in the way you expected. I would also like
> > to see the debug log from wpa_supplicant (with -dd on command line) for
> > this case. It should be possible to use select_network to switch between
> >
> > configured networks and this should not require restarting of either
> > wpa_supplicant or wpa_cli.
> >
> > --
> > Jouni Malinen                                            PGP id EFC895FA
> > _______________________________________________
> > HostAP mailing list
> > HostAP at shmoo.com
> > http://lists.shmoo.com/mailman/listinfo/hostap
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20060808/a286cf50/attachment.htm 



More information about the Hostap mailing list