<div dir="ltr">Hi Jouni<br><br>Thanks for your valuable input. I really don't want to run wpa_cli in interactive mode so my question would be how can we capture those control interface events (or how & where to register) . The Module directly talks to wpa supplicant interface and not through wpa_cli but I am not able to figure out how to register and capture those control interface events. As a peer <br><br>Any documents or pointers would be great. Sorry if I missed any documents/references but If there are no such document, I would like to draft one document with those steps (provided by your inputs) and share across for future references.<br><br>Please note that I do not mean to get free design inputs or code implementation, I am just trying to out the event registration method.<br><br>Regards<br>Vinayak<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 12, 2015 at 4:40 AM, Jouni Malinen <span dir="ltr"><<a href="mailto:j@w1.fi" target="_blank">j@w1.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Feb 11, 2015 at 11:10:13AM -0800, Vinayak Rao wrote:<br>
> Device 1:<br>
<span class="">> wpa_cli -p/var/run/p2p0 -ip2p0 p2p_find<br>
><br>
> Device 2:<br>
</span>> wpa_cli -p/var/run/p2p0 -ip2p0 p2p_find<br>
<span class=""><br>
> At this point of time either device can initiate the process.<br>
><br>
> Now lets says, device 2 issue command<br>
> -------------------------------------<br>
> wpa_cli -p/var/run/p2p0 -ip2p0 p2p_connect MAC_ADDRESS_DEVICE_1 8_DIGIT_PIN<br>
> display join<br>
<br>
</span>That would not be a valid command in this sequence. The "join" parameter<br>
would imply that the peer is already operating a group.<br>
<span class=""><br>
> How the device 1 knows that device 2 has<br>
> 1/ Initiated the WFD command<br>
> 2/ WFD method is PIN<br>
<br>
</span>If you were to remove that " join" part from the end (and not stop<br>
p2p_find or p2p_listen on peer), the command would initiate GO<br>
negotiation and that show up as a P2P-GO-NEG-REQUEST event on the peer.<br>
That event includes dev_passwd_id=<value> parameter that indicates which<br>
config method is being requested.<br>
<span class=""><br>
> I understand that there is some thing called events. My question is can we<br>
> use wpa cli to capture the EVENTS, if yes which command? If no, then what /<br>
> how shall we know that device 1 has initiated ? Do we need to run wpa_cli<br>
> in interactive mode?<br>
<br>
</span>If you run wpa_cli in interactive mode, you'll see that event there (no<br>
commands needed for that; wpa_cli registers automatically to receive<br>
events and it will print them in stdout). That's fine for manual testing<br>
purposes, but I'd assume most cases would use some upper layer component<br>
to register directly to receiving wpa_supplicant control interface<br>
events and reacting to them rather than doing this through wpa_cli.<br>
<span class=""><font color="#888888"><br>
--<br>
Jouni Malinen PGP id EFC895FA<br>
_______________________________________________<br>
HostAP mailing list<br>
<a href="mailto:HostAP@lists.shmoo.com">HostAP@lists.shmoo.com</a><br>
<a href="http://lists.shmoo.com/mailman/listinfo/hostap" target="_blank">http://lists.shmoo.com/mailman/listinfo/hostap</a><br>
</font></span></blockquote></div><br></div></div>