RE: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-07-21 Thread Amitkumar Karwar
> From: Luana Borgia [mailto:luanaborgia1...@gmail.com]
> Sent: Thursday, July 21, 2016 6:05 PM
> To: Amitkumar Karwar
> Cc: Nestor Machno; linux-wireless@vger.kernel.org
> Subject: Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC
> 
> Hi Amitkumar,
> if I understood correctly you are working to solve the issue related to
> ibss-rsn (wpa2 in adhoc), I'm I right?
> What about the alternative WPA mechanism with wpa-none instead? Fix it
> shouldn't be simpler than RSN?

Makes sense. It would be useful to have successful case log for comparison and 
further debugging.
Is it possible for you (or someone else) capture the wpa_supplicant's 
successful case logs using other vendor's chipset?
We tried with Intel devices. It worked using GUI on windows machine, but didn't 
work using wpa_supplicant.

Regards,
Amitkumar
N�r��yb�X��ǧv�^�)޺{.n�+{��*ޕ�,�{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�mzZ+�ݢj"��!�i

Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-07-21 Thread Luana Borgia
Hi Amitkumar,
if I understood correctly you are working to solve the issue related
to ibss-rsn (wpa2 in adhoc), I'm I right?
What about the alternative WPA mechanism with wpa-none instead? Fix it
shouldn't be simpler than RSN?

Thanks for update and
best regards.
Luana

2016-07-21 11:05 GMT+02:00 Amitkumar Karwar <akar...@marvell.com>:
> Hi Luana,
>
>> From: Luana Borgia [mailto:luanaborgia1...@gmail.com]
>> Sent: Wednesday, July 20, 2016 6:53 PM
>> To: Amitkumar Karwar
>> Cc: Nestor Machno; linux-wireless@vger.kernel.org
>> Subject: Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC
>>
>> Hi Amitkumar,
>> any news about this issue? I've the same problem also..
>>
>> Security a part, we can't leave the WIFI open or just with WEP because
>> we get too many not trusted connection that consume a lot of our
>> bandwidth
>>
>
> We are still working on this. With some driver changes, we are able to RSN IE 
> in transmitted frames, but 4 way handshake doesn't occur.
>
> Regards,
> Amitkumar
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-07-21 Thread Amitkumar Karwar
Hi Luana,

> From: Luana Borgia [mailto:luanaborgia1...@gmail.com]
> Sent: Wednesday, July 20, 2016 6:53 PM
> To: Amitkumar Karwar
> Cc: Nestor Machno; linux-wireless@vger.kernel.org
> Subject: Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC
> 
> Hi Amitkumar,
> any news about this issue? I've the same problem also..
> 
> Security a part, we can't leave the WIFI open or just with WEP because
> we get too many not trusted connection that consume a lot of our
> bandwidth
> 

We are still working on this. With some driver changes, we are able to RSN IE 
in transmitted frames, but 4 way handshake doesn't occur.

Regards,
Amitkumar


Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-07-21 Thread Nestor Machno
Luana,
as confirmed by Marvell this is a firmware issue and the firmware is
not free/open so only Marvell is able to fix it.
At the moment the latest firmware available is still the 15.68.7.p5, aka p5.
http://git.marvell.com/?p=mwifiex-firmware.git;a=tree;f=mrvl;hb=HEAD
Unfortunately in this case the community can't give you support..

Regards
Nestor

2016-07-20 15:23 GMT+02:00 Luana Borgia :
> Hi Amitkumar,
> any news about this issue? I've the same problem also..
>
> Security a part, we can't leave the WIFI open or just with WEP because
> we get too many not trusted connection that consume a lot of our
> bandwidth
>
> Thanks, regards
> Luana
>
> 2016-07-08 11:15 GMT+02:00 Amitkumar Karwar :

>> Yes. This is a bug in our firmware. ADHOC in WPA/WPA2 security is broken. We 
>> have asked firmware experts to look into this. As we have a mid-year 
>> shutdown this week, they will be able to check the problem next week only. 
>> However ADHOC in open mode should work as expected
>>
>>
>> Regards,
>> Amitkumar
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-07-20 Thread Luana Borgia
Hi Amitkumar,
any news about this issue? I've the same problem also..

Security a part, we can't leave the WIFI open or just with WEP because
we get too many not trusted connection that consume a lot of our
bandwidth

Thanks, regards
Luana

2016-07-08 11:15 GMT+02:00 Amitkumar Karwar :
>> From: linux-wireless-ow...@vger.kernel.org [mailto:linux-wireless-
>> ow...@vger.kernel.org] On Behalf Of Nestor Machno
>> Sent: Thursday, July 07, 2016 6:07 AM
>> To: linux-wireless@vger.kernel.org
>> Subject: Fwd: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC
>>
>> Hi All,
>> Amitkumar, can you confirm if this this is a bug or today is fixed?
>
> Yes. This is a bug in our firmware. ADHOC in WPA/WPA2 security is broken. We 
> have asked firmware experts to look into this. As we have a mid-year shutdown 
> this week, they will be able to check the problem next week only. However 
> ADHOC in open mode should work as expected
>
>>
>> Vincent, I had also faced similar issue on Surface Pro 2 with backports
>> from 4.1... So here few question:
>>
>> * I saw in 1st post that you where working to make work the
>> wpa_supplicant with mixed configuration for adhoc (wpa-none + wpa-ibss),
>> but also in recent post that you focus mostly on debugging wpa-ibss. I
>> suggest to focus your test on one wpa mode and I think wpa-none better
>> because it's easier..
>> * Why you are not testing the latest backport from upstream kernel? as
>> you can know Marvell is focus most to fix open issue on current stable
>> release, I saw from commit that recently they fix something about WPA on
>> mixflex, see
>> https://backports.wiki.kernel.org/index.php/Documentation/compat-
>> drivers/hacking
>> * Would be good information to know if you tested also on backport 3.x,
>> did you?  I know mwifiex's WPA stack changed a lot from 3.x kernel.
>> * To support you more, could you enable debug info and provide full log
>> of your setup? .config? patch? anything else?
>> * Can you share us your hacked backport?
>> * Lat question Vincent, are you working for AIRBUS, ACTIA or THALES ?
>> :)
>>
>> Best Regards
>> Nestor
>>
>> On Mon, Jun 13, 2016 at 7:42 AM, Vincent CESSON
>>  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.
>> >
>
> Regards,
> Amitkumar
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-07-08 Thread Amitkumar Karwar
> From: linux-wireless-ow...@vger.kernel.org [mailto:linux-wireless-
> ow...@vger.kernel.org] On Behalf Of Nestor Machno
> Sent: Thursday, July 07, 2016 6:07 AM
> To: linux-wireless@vger.kernel.org
> Subject: Fwd: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC
> 
> Hi All,
> Amitkumar, can you confirm if this this is a bug or today is fixed?

Yes. This is a bug in our firmware. ADHOC in WPA/WPA2 security is broken. We 
have asked firmware experts to look into this. As we have a mid-year shutdown 
this week, they will be able to check the problem next week only. However ADHOC 
in open mode should work as expected

> 
> Vincent, I had also faced similar issue on Surface Pro 2 with backports
> from 4.1... So here few question:
> 
> * I saw in 1st post that you where working to make work the
> wpa_supplicant with mixed configuration for adhoc (wpa-none + wpa-ibss),
> but also in recent post that you focus mostly on debugging wpa-ibss. I
> suggest to focus your test on one wpa mode and I think wpa-none better
> because it's easier..
> * Why you are not testing the latest backport from upstream kernel? as
> you can know Marvell is focus most to fix open issue on current stable
> release, I saw from commit that recently they fix something about WPA on
> mixflex, see
> https://backports.wiki.kernel.org/index.php/Documentation/compat-
> drivers/hacking
> * Would be good information to know if you tested also on backport 3.x,
> did you?  I know mwifiex's WPA stack changed a lot from 3.x kernel.
> * To support you more, could you enable debug info and provide full log
> of your setup? .config? patch? anything else?
> * Can you share us your hacked backport?
> * Lat question Vincent, are you working for AIRBUS, ACTIA or THALES ?
> :)
> 
> Best Regards
> Nestor
> 
> On Mon, Jun 13, 2016 at 7:42 AM, Vincent CESSON
>  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.
> >

Regards,
Amitkumar


Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-06-15 Thread Raymond Hayes
I'm not sure what to tell you.  Did you look into the GTK installation
failure?  For WPA-PSK, there's 1 4-way handshake and the STA installs
1 PTK and 1 GTK.  For WPA2-PSK for IBSS, there are 2 4-way handshakes
and the STA installs 1 PTK and 2 GTKs.  If the peer's GTK isn't
installed, the STA won't be able to decrypt the peer's broadcast
frames.  Do you have a sniff of the failure?  What's failing?  Does it
work if you use static IP addresses and static ARP entries?

Ray

On Wed, Jun 15, 2016 at 7:17 AM, Vincent CESSON <vincent.ces...@smile.fr> wrote:
> 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.ces...@smile.fr>
>> 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.ces...@smile.fr> 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.ces...@smile.fr]
>>>>>>> Sent: Monday, June 13, 2016 7:09 PM
>>>>>>> To: Amitkumar Karwar
>>>>>>> Cc: Raymond Hayes; linux-wireless@vger.kernel.org
>>>>>>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-06-15 Thread Vincent CESSON
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.ces...@smile.fr> 
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.ces...@smile.fr> 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.ces...@smile.fr]
Sent: Monday, June 13, 2016 7:09 PM
To: Amitkumar Karwar
Cc: Raymond Hayes; linux-wireless@vger.kernel.org
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,
Amitkumarssid=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=0xfff1 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=0xfffe 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 

Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-06-15 Thread Vincent CESSON

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.ces...@smile.fr> 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.ces...@smile.fr]
Sent: Monday, June 13, 2016 7:09 PM
To: Amitkumar Karwar
Cc: Raymond Hayes; linux-wireless@vger.kernel.org
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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-06-13 Thread Raymond Hayes
>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.ces...@smile.fr> 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.ces...@smile.fr]
>>> Sent: Monday, June 13, 2016 7:09 PM
>>> To: Amitkumar Karwar
>>> Cc: Raymond Hayes; linux-wireless@vger.kernel.org
>>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-06-13 Thread Vincent CESSON

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.ces...@smile.fr]
Sent: Monday, June 13, 2016 7:09 PM
To: Amitkumar Karwar
Cc: Raymond Hayes; linux-wireless@vger.kernel.org
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,
Amitkumarroot@pcm-mx6quad:~# cat /etc/wpa_supplicant-rsn.conf 
ctrl_interface=DIR=/run/wpa_supplicant #GROUP=wheel
# use 'ap_scan=2' on all devices connected to the network
ap_scan=2
network={
ssid="suppl_wpa_adhoc_vce"
mode=1
frequency=2432
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="password"
}
root@pcm-mx6quad:~# wpa_supplicant -dd -i mlan0 -c /etc/wpa_supplicant-rsn.conf 
-D nl80211,wext
wpa_supplicant v2.5
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'mlan0' conf '/etc/wpa_supplicant-rsn.conf' driver 
'nl80211,wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant-rsn.conf' -> 
'/etc/wpa_supplicant-rsn.conf'
Reading configuration file '/etc/wpa_supplicant-rsn.conf'
ctrl_interface='DIR=/run/wpa_supplicant'
ap_scan=2
Line: 4 - start of a new network block
ssid - hexdump_ascii(len=19):
 73 75 70 70 6c 5f 77 70 61 5f 61 64 68 6f 63 5f   suppl_wpa_adhoc_
 76 63 65  vce 
mode=1 (0x1)
frequency=2432 (0x980)
proto: 0x3
key_mgmt: 0x2
pairwise: 0x18
group: 0x18
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='suppl_wpa_adhoc_vce'
rfkill: initial event: idx=2 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=3 type=1 op=0 soft=0 hard=0
nl80211: TDLS supported
nl80211: TDLS external setup
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supports Probe Response offload in AP mode
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support 
detected
nl80211: interface mlan0 in phy phy1
nl80211: Set mode ifindex 11 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0x1fbae98
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1fbae98 
match=06
nl80211: Register frame command failed (type=208): ret=-114 (Operation already 
in progress)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1fbae98 
match=0a07
nl80211: Register frame command failed (type=208): ret=-114 (Operation already 
in progress)
nl80211: Register frame match - hexdump(len=2): 0a 07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1fbae98 
match=0a11
nl80211: Register frame command failed (type=208): ret=-114 (Operation already 
in progress)
nl80211: Register frame match - hexdump(len=2): 0a 11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1fbae98 
match=1101
nl80211: Register frame command failed (type=208): ret=-114 (Operation already 
in progress)
nl80211: Register frame match - hexdump(len=2): 11 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1fbae98 
match=1102
nl80211: Register frame command failed (type=208): ret=-114 (Operation already 
in progress)
nl80211: Register frame match - hexdump(len=2): 11 02
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1fbae98 
match=0505
nl80211: Register frame command failed (type=208): ret=-114 (Operation already 
in progress)
nl80211: Register frame match - hexdump(len=2): 05 05
nl80211: Failed to register Action frame processing - ignore for now
netlink: Operstate: ifindex=11 linkmode=1 (userspace-control), operstate=5 
(IF_OPER_DORMANT)
nl80211: driver param='(null)'
Add interface mlan0 to a new radio phy1
nl80211: Regulatory information - country=FR (DFS-ETSI)
nl80211: 2402-2482 @ 40 MHz 20 mBm
nl80211: 5170-5250 @ 80 MHz 20 mBm
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS)
nl80211: 5490-5710 @ 160 MHz 27 mBm (DFS)
nl80211: 57000-66000 @ 2160 MHz 40 mBm
nl80211: Ad

RE: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-06-13 Thread Amitkumar Karwar
Hi Vincent,

> From: Vincent CESSON [mailto:vincent.ces...@smile.fr]
> Sent: Monday, June 13, 2016 7:09 PM
> To: Amitkumar Karwar
> Cc: Raymond Hayes; linux-wireless@vger.kernel.org
> 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
N�r��yb�X��ǧv�^�)޺{.n�+{��*ޕ�,�{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�mzZ+�ݢj"��!�i

RE: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-06-13 Thread Vincent CESSON
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: linux-wireless-ow...@vger.kernel.org [mailto:linux-wireless-
ow...@vger.kernel.org] On Behalf Of Vincent CESSON
Sent: Monday, June 13, 2016 1:52 PM
To: Raymond Hayes
Cc: linux-wireless@vger.kernel.org
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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-06-13 Thread Amitkumar Karwar
Hi Vincent,

> From: linux-wireless-ow...@vger.kernel.org [mailto:linux-wireless-
> ow...@vger.kernel.org] On Behalf Of Vincent CESSON
> Sent: Monday, June 13, 2016 1:52 PM
> To: Raymond Hayes
> Cc: linux-wireless@vger.kernel.org
> 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


Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

2016-06-13 Thread Vincent CESSON

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 
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html 
[1]




Links:
--
[1] http://vger.kernel.org/majordomo-info.htmlctrl_interface=DIR=/run/wpa_supplicant #GROUP=wheel
# use 'ap_scan=2' on all devices connected to the network
ap_scan=2
network={
ssid="suppl_wpa_adhoc_vce"
mode=1
frequency=2432
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="password"
}

root@pcm-mx6quad:~# wpa_supplicant -ddd -i mlan0 -c 
/etc/wpa_supplicant-rsn.conf -D nl80211,wext
wpa_supplicant v2.5
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'mlan0' conf '/etc/wpa_supplicant-adhoc.conf' driver 
'nl80211,wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant-adhoc.conf' -> 
'/etc/wpa_supplicant-adhoc.conf'
Reading configuration file '/etc/wpa_supplicant-adhoc.conf'
ctrl_interface='DIR=/run/wpa_supplicant'
ap_scan=2
Line: 4 - start of a new network block
ssid - hexdump_ascii(len=19):
 73 75 70 70 6c 5f 77 70 61 5f 61 64 68 6f 63 5f   suppl_wpa_adhoc_
 76 63 65  vce 
mode=1 (0x1)
frequency=2432 (0x980)
proto: 0x3
key_mgmt: 0x2
pairwise: 0x18
group: 0x18
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='suppl_wpa_adhoc_vce'
rfkill: initial event: idx=8 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=9 type=1 op=0 soft=0 hard=0
nl80211: TDLS supported
nl80211: TDLS external setup
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supports Probe Response offload in AP mode
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support 
detected
nl80211: interface mlan0 in phy phy0
nl80211: Set mode ifindex 17 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0x28ae98
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x28ae98 
match=06
nl80211: Register frame command failed (type=208): ret=-114 (Operation already 
in progress)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x28ae98 
match=0a07
nl80211: Register frame command failed (type=208): ret=-114 (Operation already 
in progress)
nl80211: Register frame match - hexdump(len=2): 0a 07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)