WiFi Direct p2p association process

Vinayak Rao vinayakrao
Wed Feb 11 11:10:13 PST 2015


Hi All

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).

For e.g

Device 1:
-------
wpa_cli -p/var/run/p2p0 -ip2p0  p2p_find

Device 2:
-------
wpa_cli -p/var/run/p2p0 -ip2p0  p2p_find

Device 1 & 2:
-------------
wpa_cli -p/var/run/p2p0 -ip2p0  p2p_peers

After some time Device 2 is seen on Device 1 and vice versa and we stop the
search.

At this point of time either device can initiate the process.

Now lets says, device 2 issue command
-------------------------------------
wpa_cli -p/var/run/p2p0 -ip2p0 p2p_connect MAC_ADDRESS_DEVICE_1 8_DIGIT_PIN
display join


How the device 1 knows that device 2 has
1/ Initiated the WFD command
2/ WFD method is PIN

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?

in device 2

while ( either_user_yet_to_initates_connection OR
other_device_yet_to_initate_connection)
{
(what needs to be done here) --> if (
has_other_device_initiated_the_wfd_association_process) {
        if (is_pin) {
                use_pin
        } else {
                use_push
        }
    } else (has_user_expects_to_initate_the_process) {
        generate_pin_OR_use_push_based_on_capability
    }
 }

I am looking for an command
"has_other_device_initiated_the_wfd_association_process" in the above
snippet of code.

Probably I don't understand something that very basic, easy and must have
been documented, which I missed but I do appreciate any
pointers/documents/suggestion.

I searched through Google and went through bunch of HostAP messages but
couldn't find the answer.

thanks in advance.

Regards
Vinayak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20150211/edebcea4/attachment.htm>



More information about the Hostap mailing list