How to issue wps_pbc command to the right p2p interface

Andrea Chittano andrea.chittano
Fri Oct 2 01:39:12 PDT 2015


Hi all,
I would like to know if it is possible to issue the wps_pbc command to a p2p interface, from the wpa_cli prompt that has been used to create it.
I'll try to show you an example.I'm working with 3 devices:-2 Android non-rooted devices (I'll call them device1 and device2)-1 tp link wifi card using chipset atheros installed on a Linux machine (I'll call it linux).In particular I want linux to act as GO. 
This is what I've done:
1.(linux)---->open Shell_12.(linux)---->run wpa_cli_1 on Shell_1 in interactive mode through the line command ./wpa_cli3.(linux)---->execute p2p_find on prompt of the wpa_cli just launched
4.(device1)----->android p2p_discovery5.(device1)----->p2p_connect(linux) through the line command p2p_connect linux_mac pbc go_intent=0
6.(linux)----->p2p_connect(device1) on prompt of the wpa_cli just launched through the line command p2p_connect device1_mac pbc go_intent=157.<----P2P_Group _1 Created----> 
A new interface has been created: p2p-wlan0-0
8.(device2)----->p2p_connect(linux) (I know that actually this is a join request, I used "p2p_connect" here for a sake of simplicity )
The prompt of the wpa_cli launched in order to manage the first p2p_connection shows P2P_PROV_DISC_PBC_REQ.Now I need to perform the following steps in order to connect device2 to the P2P_Group_1
9.(linux)---->open Shell_210.(linux)---->run wpa_cli_2 on Shell_2  in interactive mode through the line command ./wpa_cli -i p2p-wlan0-011.(linux)---->execute wps_pbc12<---device2 joins P2P_Group_1---->

I wish to run on the prompt of the wpa_cli_1 a command to execute wps_pbs on interface p2p-wlan0-0.I mean something like that
(linux)---->execute wps_pbc p2p-wlan0-0 on the prompt of the wpa_cli_1

Do I need a global control interface?If it is, how can I configure and launch wpa_supplicant and wpa_cli to reach my goal?

Searching on this forum I found a post of a guy who had a problem similar to mine, but unfortunately  it does not solve my problem.
Thanks in advance.
Andrea 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20151002/409708d8/attachment.htm>



More information about the Hostap mailing list