<div dir="ltr">Hi All<br><br>I am working on WiFi-Direct (WFD) on Linux based (non android) MIPS platform using wpa supplicant. When we are using wpa supplicant to establish WFD connection using two devices, I want to know how once device knows that other device has initiated WFD association process and which protocol (Push or pin).<br><br>For e.g<br><br>Device 1:<br>-------<br>wpa_cli -p/var/run/p2p0 -ip2p0  p2p_find<br><br>Device 2:<br>-------<br>wpa_cli -p/var/run/p2p0 -ip2p0  p2p_find<br><br>Device 1 &amp; 2:<br>-------------<br>wpa_cli -p/var/run/p2p0 -ip2p0  p2p_peers<br><br>After some time Device 2 is seen on Device 1 and vice versa and we stop the search.<br><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 display join<br><br><br>How the device 1 knows that device 2 has <br>1/ Initiated the WFD command<br>2/ WFD method is PIN<br><br>I understand that there is some thing called events. My question is can we use wpa cli to capture the EVENTS, if yes which command? If no, then what / how shall we know that device 1 has initiated ? Do we need to run wpa_cli in interactive mode?<br><br>in device 2<br><br>while ( either_user_yet_to_initates_connection OR other_device_yet_to_initate_connection) <br>{<br>(what needs to be done here) --&gt; if ( has_other_device_initiated_the_wfd_association_process) {<br>        if (is_pin) {<br>                use_pin<br>        } else {<br>                use_push<br>        }<br>    } else (has_user_expects_to_initate_the_process) {<br>        generate_pin_OR_use_push_based_on_capability<br>    }<br> }   <br>    <br>I am looking for an command &quot;has_other_device_initiated_the_wfd_association_process&quot; in the above snippet of code.<br><br>Probably I don&#39;t understand something that very basic, easy and must have been documented, which I missed but I do appreciate any pointers/documents/suggestion.<br><br>I searched through Google and went through bunch of HostAP messages but couldn&#39;t find the answer.<br><br>thanks in advance.<br><br>Regards<br>Vinayak<br></div>