I set a successful AP network with WPA-PSK (see conf and log attached).
As you can see on log, the message "Could not set station
48:45:20:3b:31:75 flags for kernel driver" appears too, but the
connection is OK.
Le 2016-06-15 13:35, Raymond Hayes a écrit :
The logs were from wpa_supplicant so I suggest starting there; but
the problem could be on either side, so you'll probably have to look
into mwiflex too.
Ray
On Wednesday, June 15, 2016, Vincent CESSON <vincent.cesson@xxxxxxxx>
wrote:
Hi Raymond,
Who is trying to mark the peer authorized? Should I look into mwifiex
driver? cfg80211.ko? libnl? wpa_supplicant? I am a bit lost among all
these elements.
Vincent
Le 2016-06-14 02:30, Raymond Hayes a écrit :
From the RSN log, the dual 4-way handshakes succeeded, but the GTK
was
not installed:
nl80211: set_key failed; err=-22 Invalid argument)
and it looks like there was a problem marking the peer authorized:
AUTH: 48:45:20:3b:31:75 authorizing port
Could not set station 48:45:20:3b:31:75 flags for kernel driver
(errno=11)
Ray
On Mon, Jun 13, 2016 at 7:42 AM, Vincent CESSON
<vincent.cesson@xxxxxxxx> wrote:
Hi Amitkumar,
Here are the wpa_supplicant logs (with CONFIG_IBSS_RSN=y enabled)
from the
two devices. Beside wpa_supplicant, I manually set IPs 192.168.1.xy
with
command "ifconfig mlan0 192.168.1.xy" and then I try to ping each
other,
without success.
Vincent
Le 2016-06-13 15:40, Amitkumar Karwar a écrit :
Hi Vincent,
From: Vincent CESSON [mailto:vincent.cesson@xxxxxxxx]
Sent: Monday, June 13, 2016 7:09 PM
To: Amitkumar Karwar
Cc: Raymond Hayes; linux-wireless@xxxxxxxxxxxxxxx
Subject: RE: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC
About the strange behaviour with the two devices connecting
despite the
bad passwords, I made a little mistake: on the device 2,
wpa_supplicant
was not built with option CONFIG_IBSS_RSN=y. But still, device 1
should
not accept device 2...
Note that with option CONFIG_IBSS_RSN=y enabled on both devices,
WPA-PSK
connection does not work, even with the right password...
I see. Please share the wpa_supplicant logs with CONFIG_IBSS_RSN=y
enabled for analysis.
Regards,
Amitkumar
ssid=test_pcm_wpa2_vce
interface=uap0
driver=nl80211
hw_mode=a
channel=48
ieee80211n=1
wmm_enabled=1
wpa=2
wpa_passphrase=password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
nl80211: Event message available
nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for uap0
nl80211: New station 48:45:20:3b:31:75
nl80211: Assoc Req IEs - hexdump(len=98): 00 11 74 65 73 74 5f 70 63 6d 5f 77 70 61 32 5f 76 63 65 01 08 0c 12 18 24 30 48 60 6c 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 2d 1a ad 11 17 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 08 04 00 00 00 01 00 00 40 dd 07 00 50 f2 02 00 01 00
uap0: Event ASSOC (0) received
uap0: STA 48:45:20:3b:31:75 IEEE 802.11: associated
STA included RSN IE in (Re)AssocReq
New STA
nl80211: Set STA flags - ifname=uap0 addr=48:45:20:3b:31:75 total_flags=0x0 flags_or=0x0 flags_and=0xfffffff1 authorized=0
uap0: STA 48:45:20:3b:31:75 WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=10 (uap0) alg=0 addr=0x12424a0 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=48:45:20:3b:31:75
IEEE 802.1X: Ignore STA - 802.1X not enabled or forced for WPS
uap0: STA 48:45:20:3b:31:75 WPA: start authentication
WPA: 48:45:20:3b:31:75 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=10 (uap0) alg=0 addr=0x12424a0 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=48:45:20:3b:31:75
nl80211: Set STA flags - ifname=uap0 addr=48:45:20:3b:31:75 total_flags=0x0 flags_or=0x0 flags_and=0xfffffffe authorized=0
uap0: STA 48:45:20:3b:31:75 IEEE 802.1X: unauthorizing port
Could not set station 48:45:20:3b:31:75 flags for kernel driver (errno=11).
WPA: 48:45:20:3b:31:75 WPA_PTK_GROUP entering state IDLE
WPA: 48:45:20:3b:31:75 WPA_PTK entering state AUTHENTICATION
WPA: 48:45:20:3b:31:75 WPA_PTK entering state AUTHENTICATION2
WPA: Re-initialize GMK/Counter on first station
Get randomness: len=32 entropy=5
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
wpa_driver_nl80211_set_key: ifindex=10 (uap0) alg=3 addr=0x878b0 key_idx=1 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
broadcast key
Get randomness: len=32 entropy=0
WPA: Assign ANonce - hexdump(len=32): 95 46 c5 a0 c7 08 81 2a ae 45 a3 d4 d6 63 05 e6 d4 b7 f2 ea dc 35 d5 77 5a 83 8b 6e be e8 6a 2a
WPA: 48:45:20:3b:31:75 WPA_PTK entering state INITPSK
Searching a PSK for 48:45:20:3b:31:75 prev_psk=(nil)
Searching a PSK for 48:45:20:3b:31:75 prev_psk=(nil)
WPA: 48:45:20:3b:31:75 WPA_PTK entering state PTKSTART
uap0: STA 48:45:20:3b:31:75 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=1 kde_len=0 keyidx=0 encr=0)
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
WPA: Use EAPOL-Key timeout of 100 ms (retry counter 1)
RTM_NEWLINK: ifi_index=10 ifname=uap0 operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
uap0: Event EAPOL_TX_STATUS (38) received
IEEE 802.1X: 48:45:20:3b:31:75 TX status - version=2 type=3 length=95 - ack=1
WPA: EAPOL-Key TX status for STA 48:45:20:3b:31:75 ack=1
WPA: Increase initial EAPOL-Key 1/4 timeout by 1000 ms because of acknowledged frame
uap0: Event EAPOL_RX (24) received
IEEE 802.1X: 121 bytes from 48:45:20:3b:31:75
IEEE 802.1X: version=1 type=3 length=117
WPA: Received EAPOL-Key from 48:45:20:3b:31:75 key_info=0x10a type=2 key_data_length=22
WPA: Received Key Nonce - hexdump(len=32): 48 83 ef 94 32 5a 9a 4b ed 24 11 fa af c7 84 05 57 c2 3d df 52 7d 23 97 8f 39 10 22 f9 e8 64 93
WPA: Received Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
uap0: STA 48:45:20:3b:31:75 WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: 48:45:20:3b:31:75 WPA_PTK entering state PTKCALCNEGOTIATING
Searching a PSK for 48:45:20:3b:31:75 prev_psk=(nil)
WPA: PTK derivation - A1=98:f1:70:6f:93:f6 A2=48:45:20:3b:31:75
WPA: Nonce1 - hexdump(len=32): 95 46 c5 a0 c7 08 81 2a ae 45 a3 d4 d6 63 05 e6 d4 b7 f2 ea dc 35 d5 77 5a 83 8b 6e be e8 6a 2a
WPA: Nonce2 - hexdump(len=32): 48 83 ef 94 32 5a 9a 4b ed 24 11 fa af c7 84 05 57 c2 3d df 52 7d 23 97 8f 39 10 22 f9 e8 64 93
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: KCK - hexdump(len=16): [REMOVED]
WPA: KEK - hexdump(len=16): [REMOVED]
WPA: TK - hexdump(len=16): [REMOVED]
WPA: 48:45:20:3b:31:75 WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: 48:45:20:3b:31:75 WPA_PTK entering state PTKINITNEGOTIATING
uap0: STA 48:45:20:3b:31:75 WPA: sending 3/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=1 kde_len=46 keyidx=1 encr=1)
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
Plaintext EAPOL-Key Key Data - hexdump(len=56): [REMOVED]
WPA: Use EAPOL-Key timeout of 100 ms (retry counter 1)
uap0: Event EAPOL_TX_STATUS (38) received
IEEE 802.1X: 48:45:20:3b:31:75 TX status - version=2 type=3 length=151 - ack=1
WPA: EAPOL-Key TX status for STA 48:45:20:3b:31:75 ack=1
uap0: Event EAPOL_RX (24) received
IEEE 802.1X: 99 bytes from 48:45:20:3b:31:75
IEEE 802.1X: version=1 type=3 length=95
WPA: Received EAPOL-Key from 48:45:20:3b:31:75 key_info=0x30a type=2 key_data_length=0
WPA: Received Key Nonce - hexdump(len=32): 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
WPA: Received Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
uap0: STA 48:45:20:3b:31:75 WPA: received EAPOL-Key frame (4/4 Pairwise)
WPA: 48:45:20:3b:31:75 WPA_PTK entering state PTKINITDONE
wpa_driver_nl80211_set_key: ifindex=10 (uap0) alg=3 addr=0x12424a0 key_idx=0 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
addr=48:45:20:3b:31:75
uap0: AP-STA-CONNECTED 48:45:20:3b:31:75
nl80211: Set STA flags - ifname=uap0 addr=48:45:20:3b:31:75 total_flags=0x1 flags_or=0x1 flags_and=0xffffffff authorized=1
uap0: STA 48:45:20:3b:31:75 IEEE 802.1X: authorizing port
Could not set station 48:45:20:3b:31:75 flags for kernel driver (errno=11).
uap0: STA 48:45:20:3b:31:75 RADIUS: starting accounting session 5529713D-00000000
uap0: STA 48:45:20:3b:31:75 WPA: pairwise key handshake completed (RSN)