Using test driver on wpa_supplicant & hostapd for EAP-SIM testing (sending 3rd time)

Chaudry Chaudry novalystitag
Tue Sep 4 06:53:43 PDT 2012


Hi,
I am trying to configure wpa_supplicant and hostapd with "driver=test" for
EAP-SIM functionality. I am getting issues when WPA authentication started.
Below is the logs:

*Hostapd:*

Using interface ap1 with hwaddr 02:dd:1d:a7:2c:ec and ssid 'jkm-test-SIM'
ap1: RADIUS Authentication server 127.0.0.1:1812
ap1: STA 02:40:61:c2:f3:b7 IEEE 802.11: associated
ap1: STA 02:40:61:c2:f3:b7 WPA: event 1 notification
ap1: STA 02:40:61:c2:f3:b7 WPA: start authentication
ap1: STA 02:40:61:c2:f3:b7 IEEE 802.11: disassociated
AP-STA-DISCONNECTED 02:40:61:c2:f3:b7
ap1: STA 02:40:61:c2:f3:b7 WPA: event 2 notification
ap1: STA 02:40:61:c2:f3:b7 IEEE 802.11: associated
ap1: STA 02:40:61:c2:f3:b7 WPA: event 1 notification
ap1: STA 02:40:61:c2:f3:b7 WPA: start authentication
ap1: STA 02:40:61:c2:f3:b7 IEEE 802.11: disassociated
*
wpa_supplicant:*

user at user-Precision-T1650:~/UE/wpa_supplicant-0.7.3/wpa_supplicant$ sudo
./wpa_supplicant -Dtest
-c/home/user/UE/wpa_supplicant-0.7.3/wpa_supplicant/test_simD.conf -ista1 -d

Initializing interface 'sta1' conf
'/home/user/UE/wpa_supplicant-0.7.3/wpa_supplicant/test_simD.conf' driver
'test' ctrl_interface 'N/A' bridge 'N/A'Configuration file
'/home/user/UE/wpa_supplicant-0.7.3/wpa_supplicant/test_simD.conf' ->
'/home/user/UE/wpa_supplicant-0.7.3/wpa_supplicant/test_simD.conf'

ctrl_interface='DIR=/var/run/wpa_supplicant'
driver_param='test_socket=/tmp/Test/ap1'
Priority group 0
   id=0 ssid='jkm-test-SIM'
wpa_driver_test_set_param: param='test_socket=/tmp/Test/ap1'
wpa_driver_test_get_mac_addr
Own MAC address: 02:40:61:c2:f3:b7
wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=0 set_tx=0
   addr=ff:ff:ff:ff:ff:ff
wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=1 set_tx=0
   addr=ff:ff:ff:ff:ff:ff
wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=2 set_tx=0
   addr=ff:ff:ff:ff:ff:ff
wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=3 set_tx=0
   addr=ff:ff:ff:ff:ff:ff
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: Supplicant port status: Unauthorized
EAPOL: Supplicant port status: Unauthorized
Added interface sta1
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
wpa_driver_test_scan: priv=0xcac550
Scan SSID - hexdump(len=0): [NULL]
Scan extra IE(s) - hexdump(len=0): [NULL]
test_driver: received 108 bytes
test_driver: SCANRESP 02:dd:1d:a7:2c:ec 6a6b6d2d746573742d53494d
dd160050f20101000050f20201000050f20201000050f201 PRIVACY
EAPOL: disable timer tick
EAPOL: Supplicant port status: Unauthorized
Scan timeout - try to get results
BSS: Start scan result update 1
BSS: Add new id 0 BSSID 02:dd:1d:a7:2c:ec SSID 'jkm-test-SIM'
New scan results available
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 02:dd:1d:a7:2c:ec ssid='jkm-test-SIM' wpa_ie_len=22 rsn_ie_len=0
caps=0x10
   selected based on WPA IE
   selected WPA AP 02:dd:1d:a7:2c:ec ssid='jkm-test-SIM'
Trying to associate with 02:dd:1d:a7:2c:ec (SSID='jkm-test-SIM' freq=0 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 1 proto 1
WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02
01 00 00 50 f2 02 01 00 00 50 f2 01
WPA: clearing AP RSN IE
WPA: using GTK TKIP
WPA: using PTK TKIP
WPA: using KEY_MGMT 802.1X
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00
50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 01
No keys have been configured - skip key clearing
State: SCANNING -> ASSOCIATING
wpa_driver_test_associate: priv=0xcac550 freq=0 pairwise_suite=2
group_suite=2 key_mgmt_suite=0 auth_alg=1 mode=0
   bssid=02:dd:1d:a7:2c:ec
   ssid - hexdump_ascii(len=12):
     6a 6b 6d 2d 74 65 73 74 2d 53 49 4d               jkm-test-SIM
   wpa_ie - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00
50 f2 02 01 00 00 50 f2 01
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP fail=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portControl=Auto
EAPOL: Supplicant port status: Unauthorized
test_driver: received 29 bytes
State: ASSOCIATING -> ASSOCIATED
Associated to a new BSS: BSSID=02:dd:1d:a7:2c:ec
No keys have been configured - skip key clearing
Associated with 02:dd:1d:a7:2c:ec
WPA: Association event - clear replay counter
WPA: Clear old PTK
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: enable timer tick
EAPOL: SUPP_BE entering state IDLE
EAP: EAP entering state INITIALIZE
EAP: EAP entering state IDLE
Setting authentication timeout: 10 sec 0 usec
Cancelling scan request
EAPOL: startWhen --> 0
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: txStart
TX EAPOL: dst=02:dd:1d:a7:2c:ec
Authentication with 02:dd:1d:a7:2c:ec timed out.
Added BSSID 02:dd:1d:a7:2c:ec into blacklist
wpa_driver_test_disassociate addr=02:dd:1d:a7:2c:ec reason_code=3
Disassociation notification
Setting scan request: 0 sec 100000 usec
BSSID 02:dd:1d:a7:2c:ec blacklist count incremented to 2
CTRL-EVENT-DISCONNECTED bssid=02:dd:1d:a7:2c:ec reason=0
Disconnect event - remove keys
wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=0 set_tx=0
   addr=ff:ff:ff:ff:ff:ff
wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=1 set_tx=0
   addr=ff:ff:ff:ff:ff:ff
wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=2 set_tx=0
   addr=ff:ff:ff:ff:ff:ff
wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=3 set_tx=0
   addr=ff:ff:ff:ff:ff:ff
wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=0 set_tx=0
   addr=02:dd:1d:a7:2c:ec
wpa_driver_test_mlme_setprotection: protect_type=0 key_type=1
wpa_driver_test_mlme_setprotection: addr=02:dd:1d:a7:2c:ec
State: ASSOCIATED -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
No keys have been configured - skip key clearing
State: DISCONNECTED -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
Setting scan request: 0 sec 0 usec

*
My .config file for wpa_supplicant is:*

#CONFIG_DRIVER_WEXT=y
CONFIG_DRIVER_TEST=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_CTRL_IFACE=unix
#CONFIG_PCSC=y
CONFIG_SIM_HARDCODED=y
CONFIG_EAP_SIM=y
*
My test_simD.conf at wpa_supplicant is:*

ctrl_interface=DIR=/var/run/wpa_supplicant

driver_param=test_socket=/tmp/Test/ap1

network={
    ssid="jkm-test-SIM"
    key_mgmt=WPA-EAP
    eap=SIM
    identity="14041......"
}
*
My .config file at hostapd is:*

#CONFIG_DRIVER_HOSTAP=y


CONFIG_DRIVER_TEST=y

# Integrated EAP server
CONFIG_EAP=y

# EAP-SIM for the integrated EAP server
CONFIG_EAP_SIM=y


# RADIUS authentication server. This provides access to the integrated EAP
# server from external hosts using RADIUS.
CONFIG_RADIUS_SERVER=y

*My test_simD.conf at hostapd is:*

interface=ap1
driver=test
logger_stdout=-1
logger_stdout_level=0
#debug=2
dump_file=/tmp/hostapd.dump

test_socket=/tmp/Test/ap1
ssid=jkm-test-SIM

*hw_mode=g
channel=1*

wpa=1
wpa_key_mgmt=WPA-EAP
wpa_pairwise=TKIP

ctrl_interface=/var/run/hostapd

eap_server=1
eap_user_file=/etc/hostapd.eap_user
eap_sim_db=unix:/tmp/hlr_auc_gw.sock
own_ip_addr=127.0.0.1

# RADIUS authentication server
auth_server_addr=127.0.0.1
auth_server_port=1812
auth_server_shared_secret=secret

radius_server_clients=/etc/hostapd.radius_clients
radius_server_auth_port=1812



Note here I have added *hw_mode=g, channel=1 and disabled debug=2 because
with that, hostapd was giving error for test driver initialization.

Am I doing something wrong here.
My wpa_supplicant and hostapd works fine with the real AP and stuff for
EAP-SIM. But I want to test the wpa_supplicant and hostapd without any
hardware for development purposes.
Any hint to use test driver between wpa_supplicant and hostapd will be
appreciated.

BR,
Aamer Chaudry
Researcher/Developer,
Novalyst IT AG,
Germany
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20120904/73cf5c31/attachment-0001.htm 



More information about the Hostap mailing list