<div class="gmail_quote"><div class="HOEnZb"><div class="h5">Hi,<br><div class="gmail_quote">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:<br>
<br><b>Hostapd:</b><br><br>Using interface ap1 with hwaddr 02:dd:1d:a7:2c:ec and ssid 'jkm-test-SIM'<br>
ap1: RADIUS Authentication server <a href="http://127.0.0.1:1812" target="_blank">127.0.0.1:1812</a><br>ap1: STA 02:40:61:c2:f3:b7 IEEE 802.11: associated<br>ap1: STA 02:40:61:c2:f3:b7 WPA: event 1 notification<br>ap1: STA 02:40:61:c2:f3:b7 WPA: start authentication<br>
ap1: STA 02:40:61:c2:f3:b7 IEEE 802.11: disassociated<br>AP-STA-DISCONNECTED 02:40:61:c2:f3:b7<br>ap1: STA 02:40:61:c2:f3:b7 WPA: event 2 notification<br>ap1: STA 02:40:61:c2:f3:b7 IEEE 802.11: associated<br>ap1: STA 02:40:61:c2:f3:b7 WPA: event 1 notification<br>
ap1: STA 02:40:61:c2:f3:b7 WPA: start authentication<br>ap1: STA 02:40:61:c2:f3:b7 IEEE 802.11: disassociated<br><b><br>wpa_supplicant:</b><br><br>user@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<br>
<br>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'<br>
<br>ctrl_interface='DIR=/var/run/wpa_supplicant'<br>driver_param='test_socket=/tmp/Test/ap1'<br>Priority group 0<br> id=0 ssid='jkm-test-SIM'<br>wpa_driver_test_set_param: param='test_socket=/tmp/Test/ap1'<br>
wpa_driver_test_get_mac_addr<br>Own MAC address: 02:40:61:c2:f3:b7<br>wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=0 set_tx=0<br> addr=ff:ff:ff:ff:ff:ff<br>wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=1 set_tx=0<br>
addr=ff:ff:ff:ff:ff:ff<br>wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=2 set_tx=0<br> addr=ff:ff:ff:ff:ff:ff<br>wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=3 set_tx=0<br> addr=ff:ff:ff:ff:ff:ff<br>
RSN: flushing PMKID list in the driver<br>Setting scan request: 0 sec 100000 usec<br>EAPOL: SUPP_PAE entering state DISCONNECTED<br>EAPOL: Supplicant port status: Unauthorized<br>EAPOL: KEY_RX entering state NO_KEY_RECEIVE<br>
EAPOL: SUPP_BE entering state INITIALIZE<br>EAP: EAP entering state DISABLED<br>EAPOL: Supplicant port status: Unauthorized<br>EAPOL: Supplicant port status: Unauthorized<br>Added interface sta1<br>State: DISCONNECTED -> SCANNING<br>
Starting AP scan for wildcard SSID<br>wpa_driver_test_scan: priv=0xcac550<br>Scan SSID - hexdump(len=0): [NULL]<br>Scan extra IE(s) - hexdump(len=0): [NULL]<br>test_driver: received 108 bytes<br>test_driver: SCANRESP 02:dd:1d:a7:2c:ec 6a6b6d2d746573742d53494d dd160050f20101000050f20201000050f20201000050f201 PRIVACY<br>
EAPOL: disable timer tick<br>EAPOL: Supplicant port status: Unauthorized<br>Scan timeout - try to get results<br>BSS: Start scan result update 1<br>BSS: Add new id 0 BSSID 02:dd:1d:a7:2c:ec SSID 'jkm-test-SIM'<br>
New scan results available<br>Selecting BSS from priority group 0<br>Try to find WPA-enabled AP<br>0: 02:dd:1d:a7:2c:ec ssid='jkm-test-SIM' wpa_ie_len=22 rsn_ie_len=0 caps=0x10<br> selected based on WPA IE<br> selected WPA AP 02:dd:1d:a7:2c:ec ssid='jkm-test-SIM'<br>
Trying to associate with 02:dd:1d:a7:2c:ec (SSID='jkm-test-SIM' freq=0 MHz)<br>Cancelling scan request<br>WPA: clearing own WPA/RSN IE<br>Automatic auth_alg selection: 0x1<br>WPA: using IEEE 802.11i/D3.0<br>WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 1 proto 1<br>
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<br>WPA: clearing AP RSN IE<br>WPA: using GTK TKIP<br>WPA: using PTK TKIP<br>WPA: using KEY_MGMT 802.1X<br>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<br>
No keys have been configured - skip key clearing<br>State: SCANNING -> ASSOCIATING<br>wpa_driver_test_associate: priv=0xcac550 freq=0 pairwise_suite=2 group_suite=2 key_mgmt_suite=0 auth_alg=1 mode=0<br> bssid=02:dd:1d:a7:2c:ec<br>
ssid - hexdump_ascii(len=12):<br> 6a 6b 6d 2d 74 65 73 74 2d 53 49 4d jkm-test-SIM <br> 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<br>Setting authentication timeout: 10 sec 0 usec<br>
EAPOL: External notification - EAP success=0<br>EAPOL: Supplicant port status: Unauthorized<br>EAPOL: External notification - EAP fail=0<br>EAPOL: Supplicant port status: Unauthorized<br>EAPOL: External notification - portControl=Auto<br>
EAPOL: Supplicant port status: Unauthorized<br>test_driver: received 29 bytes<br>State: ASSOCIATING -> ASSOCIATED<br>Associated to a new BSS: BSSID=02:dd:1d:a7:2c:ec<br>No keys have been configured - skip key clearing<br>
Associated with 02:dd:1d:a7:2c:ec<br>WPA: Association event - clear replay counter<br>WPA: Clear old PTK<br>EAPOL: External notification - portEnabled=0<br>EAPOL: Supplicant port status: Unauthorized<br>EAPOL: External notification - portValid=0<br>
EAPOL: Supplicant port status: Unauthorized<br>EAPOL: External notification - portEnabled=1<br>EAPOL: SUPP_PAE entering state CONNECTING<br>EAPOL: enable timer tick<br>EAPOL: SUPP_BE entering state IDLE<br>EAP: EAP entering state INITIALIZE<br>
EAP: EAP entering state IDLE<br>Setting authentication timeout: 10 sec 0 usec<br>Cancelling scan request<br>EAPOL: startWhen --> 0<br>EAPOL: SUPP_PAE entering state CONNECTING<br>EAPOL: txStart<br>TX EAPOL: dst=02:dd:1d:a7:2c:ec<br>
Authentication with 02:dd:1d:a7:2c:ec timed out.<br>Added BSSID 02:dd:1d:a7:2c:ec into blacklist<br>wpa_driver_test_disassociate addr=02:dd:1d:a7:2c:ec reason_code=3<br>Disassociation notification<br>Setting scan request: 0 sec 100000 usec<br>
BSSID 02:dd:1d:a7:2c:ec blacklist count incremented to 2<br>CTRL-EVENT-DISCONNECTED bssid=02:dd:1d:a7:2c:ec reason=0<br>Disconnect event - remove keys<br>wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=0 set_tx=0<br>
addr=ff:ff:ff:ff:ff:ff<br>wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=1 set_tx=0<br> addr=ff:ff:ff:ff:ff:ff<br>wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=2 set_tx=0<br> addr=ff:ff:ff:ff:ff:ff<br>
wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=3 set_tx=0<br> addr=ff:ff:ff:ff:ff:ff<br>wpa_driver_test_set_key: ifname=sta1 priv=0xcac550 alg=0 key_idx=0 set_tx=0<br> addr=02:dd:1d:a7:2c:ec<br>wpa_driver_test_mlme_setprotection: protect_type=0 key_type=1<br>
wpa_driver_test_mlme_setprotection: addr=02:dd:1d:a7:2c:ec<br>State: ASSOCIATED -> DISCONNECTED<br>EAPOL: External notification - portEnabled=0<br>EAPOL: SUPP_PAE entering state DISCONNECTED<br>EAPOL: Supplicant port status: Unauthorized<br>
EAPOL: SUPP_BE entering state INITIALIZE<br>EAP: EAP entering state DISABLED<br>EAPOL: Supplicant port status: Unauthorized<br>EAPOL: External notification - portValid=0<br>EAPOL: Supplicant port status: Unauthorized<br>
No keys have been configured - skip key clearing<br>
State: DISCONNECTED -> DISCONNECTED<br>EAPOL: External notification - portEnabled=0<br>EAPOL: Supplicant port status: Unauthorized<br>EAPOL: External notification - portValid=0<br>EAPOL: Supplicant port status: Unauthorized<br>
Setting scan request: 0 sec 0 usec<br><br><b><br>My .config file for wpa_supplicant is:</b><br><br>#CONFIG_DRIVER_WEXT=y<br>CONFIG_DRIVER_TEST=y<br>CONFIG_IEEE8021X_EAPOL=y<br>CONFIG_CTRL_IFACE=unix<br>#CONFIG_PCSC=y <br>
CONFIG_SIM_HARDCODED=y <br>
CONFIG_EAP_SIM=y<br><b><br>My test_simD.conf at wpa_supplicant is:</b><br><br>ctrl_interface=DIR=/var/run/wpa_supplicant<br><br>driver_param=test_socket=/tmp/Test/ap1<br><br>network={<br> ssid="jkm-test-SIM"<br>
key_mgmt=WPA-EAP<br> eap=SIM<br> identity="14041......"<br>}<br><b><br>My .config file at hostapd is:</b><br><br>#CONFIG_DRIVER_HOSTAP=y<br><br><br>CONFIG_DRIVER_TEST=y<br><br># Integrated EAP server<br>
CONFIG_EAP=y<br><br># EAP-SIM for the integrated EAP server<br>CONFIG_EAP_SIM=y<br><br><br># RADIUS authentication server. This provides access to the integrated EAP<br># server from external hosts using RADIUS.<br>CONFIG_RADIUS_SERVER=y<br>
<br><b>My test_simD.conf at hostapd is:</b><br><br>interface=ap1<br>driver=test<br>logger_stdout=-1<br>logger_stdout_level=0<br>#debug=2<br>dump_file=/tmp/hostapd.dump<br><br>test_socket=/tmp/Test/ap1<br>ssid=jkm-test-SIM<br>
<br><i>hw_mode=g<br>channel=1</i><br><br>wpa=1<br>wpa_key_mgmt=WPA-EAP<br>wpa_pairwise=TKIP<br><br>ctrl_interface=/var/run/hostapd<br><br>eap_server=1<br>eap_user_file=/etc/hostapd.eap_user<br>eap_sim_db=unix:/tmp/hlr_auc_gw.sock<br>
own_ip_addr=127.0.0.1<br><br># RADIUS authentication server<br>auth_server_addr=127.0.0.1<br>auth_server_port=1812<br>auth_server_shared_secret=secret<br><br>radius_server_clients=/etc/hostapd.radius_clients<br>radius_server_auth_port=1812<br>
<br><br><br>Note here I have added <i>hw_mode=g, channel=1 and disabled debug=2 because with that, hostapd was giving error for test driver initialization.<br><br>Am I doing something wrong here.<br>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.<br>
Any hint to use test driver between wpa_supplicant and hostapd will be appreciated.<br><br>BR,<br>Aamer Chaudry<br>Researcher/Developer,<br>Novalyst IT AG,<br>Germany<br></i>
</div><br>
</div></div></div><br>