Here are the logs.
I don't know if there is 4-way handshake in each direction, I don't
have logs on computer side, I use GUI. I tried to use the same
wpa_supplicant-rsn.conf on my computer and start it with wpa_supplicant,
but nothing happen... Embedded device does not react at all.
I found something new (and strange). I took a second embedded device,
set the same wpa_supplicant-rsn.conf except the passwords (I set 2
different passwords), and I use the same command line:
wpa_supplicant -dd -i mlan0 -c /etc/wpa_supplicant-rsn.conf -D
nl80211,wext
Result, the two devices join and ping! When I start the second device,
no logs appear on the first device...
How is it possible psk is not taken into account?
Vincent
Le 2016-06-10 18:18, Raymond Hayes a écrit :
> I don't see the log files, but, for WPA2-PSK for IBSS (there is no
> WPA-PSK for IBSS, only WPA-NONE), there should be 2 4-way handshakes,
> one in each direction. Have you verified that your computer supports
> this? If you pair 2 instances of your computer, do you see 2
> successful 4-way handshakes in the logs?
>
> Ray
>
> On Fri, Jun 10, 2016 at 8:37 AM, Vincent CESSON
> <[email protected]> wrote:
>
>> Dear all,
>>
>> I need to set a secured Adhoc network using WPA or WPA2 on my
>> embedded device (linux 3.10, mwifiex backported 4.1.1, wpa_supplicant
>> 2.5 (with CONFIG_IBSS_RSN=y), hostap 2.5). I tried the following
>> configs:
>>
>> WPA-NONE:
>> I start a WPA-NONE Adhoc with wpa_supplicant on the embedded device
>> (see wpa_supplicant-wpa-none.conf + wpa_supplicant-wpa-none.log). Then
>> from my computer (Ubuntu 14.04), I managed to join the network and
>> ping the device without setting any password! The connection is not
>> secured.
>>
>> WPA-PSK:
>> I also tried WPA-RSN (see wpa_supplicant-rsn.conf +
>> wpa_supplicant-rsn.log). As you can see in log file, the
>> 4Way-Handshake is completed. But after some seconds, the log shows a
>> timeout and an authentication failure. The device and my computer are
>> connected to the same network and they share the same BSS, but ping
>> always fails. Note that if I set a bad password on computer side, the
>> handshake never completes.
>>
>> dmesg does not show any error.
>> WEP works fine.
>>
>> Any idea of what could be wrong?
>>
>> Thank you,
>> Vincent
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-wireless" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> [1]
>
>
>
> Links:
> ------
> [1] http://vger.kernel.org/majordomo-info.html
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:[email protected]]
>> Sent: Monday, June 13, 2016 7:09 PM
>> To: Amitkumar Karwar
>> Cc: Raymond Hayes; [email protected]
>> 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
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...
Vincent
Le 2016-06-13 15:23, Amitkumar Karwar a écrit :
> Hi Vincent,
>
>> From: [email protected] [mailto:linux-wireless-
>> [email protected]] On Behalf Of Vincent CESSON
>> Sent: Monday, June 13, 2016 1:52 PM
>> To: Raymond Hayes
>> Cc: [email protected]
>> Subject: Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC
>>
>> Here are the logs.
>>
>> I don't know if there is 4-way handshake in each direction, I don't
>> have
>> logs on computer side, I use GUI. I tried to use the same
>> wpa_supplicant-rsn.conf on my computer and start it with
>> wpa_supplicant,
>> but nothing happen... Embedded device does not react at all.
>>
>> I found something new (and strange). I took a second embedded device,
>> set the same wpa_supplicant-rsn.conf except the passwords (I set 2
>> different passwords), and I use the same command line:
>> wpa_supplicant -dd -i mlan0 -c /etc/wpa_supplicant-rsn.conf -D
>> nl80211,wext Result, the two devices join and ping! When I start the
>> second device, no logs appear on the first device...
>> How is it possible psk is not taken into account?
>>
>
> Thanks for reporting the problem. We will try this at our end and
> check the issue.
>
> Regards,
> Amitkumar
SGkgVmluY2VudCwNCg0KPiBGcm9tOiBsaW51eC13aXJlbGVzcy1vd25lckB2Z2VyLmtlcm5lbC5v
cmcgW21haWx0bzpsaW51eC13aXJlbGVzcy0NCj4gb3duZXJAdmdlci5rZXJuZWwub3JnXSBPbiBC
ZWhhbGYgT2YgVmluY2VudCBDRVNTT04NCj4gU2VudDogTW9uZGF5LCBKdW5lIDEzLCAyMDE2IDE6
NTIgUE0NCj4gVG86IFJheW1vbmQgSGF5ZXMNCj4gQ2M6IGxpbnV4LXdpcmVsZXNzQHZnZXIua2Vy
bmVsLm9yZw0KPiBTdWJqZWN0OiBSZTogbXdpZmlleCt3cGFfc3VwcGxpY2FudCBjYW5ub3Qgc2V0
IHVwIFdQQS9XUEEyIEFESE9DDQo+IA0KPiBIZXJlIGFyZSB0aGUgbG9ncy4NCj4gDQo+IEkgZG9u
J3Qga25vdyBpZiB0aGVyZSBpcyA0LXdheSBoYW5kc2hha2UgaW4gZWFjaCBkaXJlY3Rpb24sIEkg
ZG9uJ3QgaGF2ZQ0KPiBsb2dzIG9uIGNvbXB1dGVyIHNpZGUsIEkgdXNlIEdVSS4gSSB0cmllZCB0
byB1c2UgdGhlIHNhbWUNCj4gd3BhX3N1cHBsaWNhbnQtcnNuLmNvbmYgb24gbXkgY29tcHV0ZXIg
YW5kIHN0YXJ0IGl0IHdpdGggd3BhX3N1cHBsaWNhbnQsDQo+IGJ1dCBub3RoaW5nIGhhcHBlbi4u
LiBFbWJlZGR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DQo+IFN1YmplY3Q6IFJFOiBtd2lmaWV4K3dwYV9zdXBwbGljYW50IGNh
bm5vdCBzZXQgdXAgV1BBL1dQQTIgQURIT0MNCj4gDQo+IEFib3V0IHRoZSBzdHJhbmdlIGJlaGF2
aW91ciB3aXRoIHRoZSB0d28gZGV2aWNlcyBjb25uZWN0aW5nIGRlc3BpdGUgdGhlDQo+IGJhZCBw
YXNzd29yZHMsIEkgbWFkZSBhIGxpdHRsZSBtaXN0YWtlOiBvbiB0aGUgZGV2aWNlIDIsIHdwYV9z
dXBwbGljYW50DQo+IHdhcyBub3QgYnVpbHQgd2l0aCBvcHRpb24gQ09ORklHX0lCU1NfUlNOPXku
IEJ1dCBzdGlsbCwgZGV2aWNlIDEgc2hvdWxkDQo+IG5vdCBhY2NlcHQgZGV2aWNlIDIuLi4NCj4g
DQo+IE5vdGUgdGhhdCB3aXRoIG9wdGlvbiBDT05GSUdfSUJTU19SU049eSBlbmFibGVkIG9uIGJv
dGggZGV2aWNlcywgV1BBLVBTSw0KPiBjb25uZWN0aW9uIGRvZXMgbm90IHdvcmssIGV2ZW4gd2l0
aCB0aGUgcmlnaHQgcGFzc3dvcmQuLi4NCj4gDQoNCkkgc2VlLiBQbGVhc2Ugc2hhcmUgdGhlIHdw
YV9zdXBwbGljYW50IGxvZ3Mgd2l0aCBDT05GSUdfSUJTU19SU049eSBlbmFibGVkIGZvciBhbmFs
eXNpcy4NCg0KUmVnYXJkcywNCkFtaXRrdW1hcg0K
>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 <[email protected]> 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:[email protected]]
>>> Sent: Monday, June 13, 2016 7:09 PM
>>> To: Amitkumar Karwar
>>> Cc: Raymond Hayes; [email protected]
>>> 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