WiFi Direct p2p association process
Vinayak Rao
vinayakrao
Thu Feb 12 10:55:37 PST 2015
Hi Jouni
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
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.
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.
Regards
Vinayak
On Thu, Feb 12, 2015 at 4:40 AM, Jouni Malinen <j at w1.fi> wrote:
> On Wed, Feb 11, 2015 at 11:10:13AM -0800, Vinayak Rao wrote:
> > Device 1:
> > wpa_cli -p/var/run/p2p0 -ip2p0 p2p_find
> >
> > Device 2:
> > wpa_cli -p/var/run/p2p0 -ip2p0 p2p_find
>
> > 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
>
> That would not be a valid command in this sequence. The "join" parameter
> would imply that the peer is already operating a group.
>
> > How the device 1 knows that device 2 has
> > 1/ Initiated the WFD command
> > 2/ WFD method is PIN
>
> If you were to remove that " join" part from the end (and not stop
> p2p_find or p2p_listen on peer), the command would initiate GO
> negotiation and that show up as a P2P-GO-NEG-REQUEST event on the peer.
> That event includes dev_passwd_id=<value> parameter that indicates which
> config method is being requested.
>
> > 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?
>
> If you run wpa_cli in interactive mode, you'll see that event there (no
> commands needed for that; wpa_cli registers automatically to receive
> events and it will print them in stdout). That's fine for manual testing
> purposes, but I'd assume most cases would use some upper layer component
> to register directly to receiving wpa_supplicant control interface
> events and reacting to them rather than doing this through wpa_cli.
>
> --
> Jouni Malinen PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20150212/902aa77d/attachment.htm>
More information about the Hostap
mailing list