<div dir="ltr"><div>Hi,</div><div><br></div><div>I am trying EAP-SIM authentication with the bulit in wpa_supplicant of ubuntu 14.04 Linux.</div><div>The version of wpa_supplicant is v2.1.</div><div><br></div><div>wap_supplicant succesfully gets the IMSI of the 3G SIM card but fails to authenticate.</div><div><br></div><div>EAP-SIM: GSM authentication algorithm<br>SCARD: GSM auth - RAND - hexdump(len=16): d4 d1 a5 f7 e7 dd 08 37 b9 ac 2b 4a bd bd 1d 48<br>SCARD: scard_transmit: send - hexdump(len=22): 00 88 00 80 11 10 d4 d1 a5 f7 e7 dd 08 37 b9 ac 2b 4a bd bd 1d 48<br>SCARD: scard_transmit: recv - hexdump(len=2): 61 0e<br>SCARD: scard_transmit: send - hexdump(len=5): a0 c0 00 00 0e<br>SCARD: scard_transmit: recv - hexdump(len=2): 6e 00<br>SCARD: unexpected data length for USIM auth (len=2, expected 16)<br>EAP-SIM: GSM SIM authentication could not be completed</div><div><br></div><div>1. wpa_supplicant first sends a command with "00 88" prefix, which is a correct 3G authentication command.</div><div>2. The card replies an error "61" with lengh "0e" (14 bites).</div><div>3. wpa_supplicant then sends a second command to ask for that 14 byte error, with "a0 c0" prefix, which is a 2G authentication command.</div><div>4. The card replies "6e 00" which means that the Class Byte in the command is incorrect.</div><div>5. wpa-supplicat complains that a 16- byte message is expected instead of 2.</div><div><br></div><div>Why wpa-supplicat sends a 2G command "a0 c0"?</div><div><br></div><div>I also try with a 2G SIM.  Also get problem:</div><div><br></div><div>TX EAPOL: dst=00:13:92:85:74:82<br>TX EAPOL - hexdump(len=60): 01 00 00 38 02 00 00 38 01 31 34 35 34 31 36 31 31 30 33 30 30 36 37 39 38 40 77 6c 61 6e 2e 6d 6e 63 31 36 31 2e 6d 63 63 34 35 34 2e 33 67 70 70 6e 65 74 77 6f 72 6b 2e 6f 72 67<br>EAPOL: SUPP_BE entering state RECEIVE<br>nl80211: Event message available<br>nl80211: Drv Event 46 (NL80211_CMD_CONNECT) received for wlan0<br>nl80211: Ignore connect event (cmd=46) when using userspace SME<br>wlan0: RX EAPOL from 00:13:92:85:74:82<br>RX EAPOL - hexdump(len=10): 02 00 00 06 01 01 00 06 19 20<br>EAPOL: Received EAP-Packet frame<br>EAPOL: SUPP_BE entering state REQUEST<br>EAPOL: getSuppRsp<br>EAP: EAP entering state RECEIVED<br>EAP: Received EAP-Request id=1 method=25 vendor=0 vendorMethod=0<br>EAP: EAP entering state GET_METHOD<br>EAP: configuration does not allow: vendor 0 method 25<br>EAP: vendor 0 method 25 not allowed<br>wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=25 -> NAK<br>EAP: Status notification: refuse proposed method (param=PEAP)<br>EAP: Building EAP-Nak (requested type 25 vendor=0 method=0 not allowed)<br>EAP: allowed methods - hexdump(len=1): 12<br>EAP: EAP entering state SEND_RESPONSE<br>EAP: EAP entering state IDLE<br>EAPOL: SUPP_BE entering state RESPONSE<br>EAPOL: txSuppRsp<br>TX EAPOL: dst=00:13:92:85:74:82<br>TX EAPOL - hexdump(len=10): 01 00 00 06 02 01 00 06 03 12<br>EAPOL: SUPP_BE entering state RECEIVE<br>EAPOL: startWhen --> 0<br>wlan0: RX EAPOL from 00:13:92:85:74:82<br>RX EAPOL - hexdump(len=8): 02 00 00 04 04 01 00 04<br>EAPOL: Received EAP-Packet frame<br>EAPOL: SUPP_BE entering state REQUEST<br>EAPOL: getSuppRsp<br>EAP: EAP entering state RECEIVED<br>EAP: Received EAP-Failure<br>EAP: Status notification: completion (param=failure)<br>EAP: EAP entering state FAILURE<br>wlan0: CTRL-EVENT-EAP-FAILURE EAP authentication failed<br>EAPOL: SUPP_PAE entering state HELD<br>EAPOL: Supplicant port status: Unauthorized<br>nl80211: Set supplicant port unauthorized for 00:13:92:85:74:82<br>EAPOL: SUPP_BE entering state RECEIVE<br>EAPOL: SUPP_BE entering state FAIL<br>EAPOL: SUPP_BE entering state IDLE<br>EAPOL authentication completed - result=FAILURE</div><div><br></div><div>Thank you.<br></div></div>