<div dir="ltr">Hi Jouni<br><br>Thanks for your valuable input. I really don&#39;t want to run wpa_cli in interactive mode so my question would be how can we capture those control interface events (or how &amp; 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">&lt;<a href="mailto:j@w1.fi" target="_blank">j@w1.fi</a>&gt;</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>
&gt; Device 1:<br>
<span class="">&gt; wpa_cli -p/var/run/p2p0 -ip2p0  p2p_find<br>
&gt;<br>
&gt; Device 2:<br>
</span>&gt; wpa_cli -p/var/run/p2p0 -ip2p0  p2p_find<br>
<span class=""><br>
&gt; At this point of time either device can initiate the process.<br>
&gt;<br>
&gt; Now lets says, device 2 issue command<br>
&gt; -------------------------------------<br>
&gt; wpa_cli -p/var/run/p2p0 -ip2p0 p2p_connect MAC_ADDRESS_DEVICE_1 8_DIGIT_PIN<br>
&gt; display join<br>
<br>
</span>That would not be a valid command in this sequence. The &quot;join&quot; parameter<br>
would imply that the peer is already operating a group.<br>
<span class=""><br>
&gt; How the device 1 knows that device 2 has<br>
&gt; 1/ Initiated the WFD command<br>
&gt; 2/ WFD method is PIN<br>
<br>
</span>If you were to remove that &quot; join&quot; 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=&lt;value&gt; parameter that indicates which<br>
config method is being requested.<br>
<span class=""><br>
&gt; I understand that there is some thing called events. My question is can we<br>
&gt; use wpa cli to capture the EVENTS, if yes which command? If no, then what /<br>
&gt; how shall we know that device 1 has initiated ? Do we need to run wpa_cli<br>
&gt; in interactive mode?<br>
<br>
</span>If you run wpa_cli in interactive mode, you&#39;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&#39;s fine for manual testing<br>
purposes, but I&#39;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>