Possible to reconnect to AP without restarting wpa_supplicant when using usb interface

Johan kungjohan at gmail.com
Thu Nov 10 03:24:35 EST 2011


>
> The internal ifindex copy should be updated when the interface comes
> back. Which driver and which kernel version are you using?
>
I have tested two different kernels(2.6.32-34 and ) with two different
network adapters on the latest stable version of wpa_supplicant-0.7.3.
Attaching supplicant log output of this


Kernel: 2.6.32-34-generic Ubuntu 10.04
wpa_supplicant-0.7.3
Cisco Aironet PC-card adapter seems to be using ath5k driver

Log after removal and insertion:


RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan1' added
l2_packet_receive - recvfrom: Network is down
RTM_DELLINK, IFLA_IFNAME: Interface 'wlan1' removed
Configured interface was removed.
State: COMPLETED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 1->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan1' added
Configured interface was added.
ioctl[SIOCGIFINDEX]: No such device
Failed to initialize the driver after interface was added.
Wireless event: cmd=0x8b15 len=24
Wireless event: new AP: 00:00:00:00:00:00
Disassociation notification
Added BSSID 00:00:00:00:00:00 into blacklist
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f
63 74 72 6c 5f 31 30 38 30 37 2d 32 00
Disconnect event - remove keys
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such device
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
ioctl[SIOCSIWENCODE]: No such device
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such device
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
ioctl[SIOCSIWENCODE]: No such device
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such device
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
ioctl[SIOCSIWENCODE]: No such device
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such device
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
ioctl[SIOCSIWENCODE]: No such device
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such device
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
ioctl[SIOCSIWENCODE]: No such device
State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
Ignore event for foreign ifindex 14
Ignore event for foreign ifindex 14
Ignore event for foreign ifindex 14
Ignore event for foreign ifindex 14
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
RX ctrl_iface - hexdump_ascii(len=11):
     52 45 43 4f 4e 46 49 47 55 52 45                  RECONFIGURE
Reading configuration file '/home/johe/supplicant_test/wpa_supplicant.conf'
ctrl_interface='DIR=/var/run/wpa_supplicant'
Line: 4 - start of a new network block
ssid - hexdump_ascii(len=6):
     4e 61 6e 6f 46 47                                 NanoFG
PSK (ASCII passphrase) - hexdump_ascii(len=8):
     61 64 67 6a 6d 70 74 77                           adgjmptw
proto: 0x2
key_mgmt: 0x2
PSK (from passphrase) - hexdump(len=32): 89 92 29 7c f5 70 b3 d6 e7 be
63 a8 58 cc 5e b1 89 bf e1 25 e5 13 ba a1 23 4c 30 c8 9a 7e 5e 36
Priority group 0
   id=0 ssid='NanoFG'
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
Setting scan request: 0 sec 0 usec
Reconfiguration completed
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 30 seconds
Ignore event for foreign ifindex 14
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
Scan timeout - try to get results
Received 0 bytes of scan results (0 BSSes)
BSS: Start scan result update 2
New scan results available
CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f
63 74 72 6c 5f 31 30 38 30 37 2d 32 00
Selecting BSS from priority group 0
Try to find WPA-enabled AP
Try to find non-WPA AP
No APs found - clear blacklist and try again
Removed BSSID 00:00:00:00:00:00 from blacklist (clear)
Selecting BSS from priority group 0
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable network found
Setting scan request: 5 sec 0 usec
RX ctrl_iface - hexdump_ascii(len=4):


3.0.0-12-generic (Ubuntu 11.10)
wpa_supplicant-0.7.3
D-Link DWA-140 Usb adapter uses rt2800usb,rt2x00usb driver
===============================================================

Log after removal and insertion:


RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan2' added
l2_packet_receive - recvfrom: Network is down
RTM_DELLINK, IFLA_IFNAME: Interface 'wlan2' removed
Configured interface was removed.
State: COMPLETED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 1->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan2' added
Configured interface was added.
ioctl[SIOCGIFINDEX]: No such device
Failed to initialize the driver after interface was added.
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Disassociation notification
Added BSSID 00:00:00:00:00:00 into blacklist
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f
63 74 72 6c 5f 31 36 34 30 39 2d 32 00
Disconnect event - remove keys
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such device
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
ioctl[SIOCSIWENCODE]: No such device
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such device
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
ioctl[SIOCSIWENCODE]: No such device
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such device
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
ioctl[SIOCSIWENCODE]: No such device
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such device
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
ioctl[SIOCSIWENCODE]: No such device
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such device
Driver did not support SIOCSIWENCODEEXT, trying SIOCSIWENCODE
ioctl[SIOCSIWENCODE]: No such device
State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
Ignore event for foreign ifindex 20
Ignore event for foreign ifindex 20
BSS: Expire BSS 0 due to age
BSS: Remove id 0 BSSID 00:18:f8:5f:19:fa SSID 'NanoFG'
CTRL_IFACE monitor send - hexdump(len=22): 2f 74 6d 70 2f 77 70 61 5f
63 74 72 6c 5f 31 36 34 30 39 2d 32 00
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
Ignore event for foreign ifindex 20
Ignore event for foreign ifindex 20
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
RX ctrl_iface - hexdump_ascii(len=11):
     52 45 43 4f 4e 46 49 47 55 52 45                  RECONFIGURE
Reading configuration file '/home/xxxx/supplicant_test/wpa_supplicant.conf'
ctrl_interface='DIR=/var/run/wpa_supplicant'
Line: 12 - start of a new network block
ssid - hexdump_ascii(len=6):
     4e 61 6e 6f 46 47                                 NanoFG
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
proto: 0x2
key_mgmt: 0x2
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='NanoFG'
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
Setting scan request: 0 sec 0 usec
Reconfiguration completed
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 30 seconds
Ignore event for foreign ifindex 20
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING
RX ctrl_iface - hexdump_ascii(len=4):
     50 49 4e 47                                       PING








> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>


More information about the HostAP mailing list