How to issue wps_pbc command to the right p2p interface

Andrea Chittano andrea.chittano
Mon Oct 12 08:51:27 PDT 2015


Hi,
first of all I have to point out that versions 2.4 and 2.5 of wpa_supplicant with global control interface configuration still block my computer (I mean that I need to restart it every time my wifi card receives a GO Negotiation request).
For this reason I 've decided to use the versione 2.0 and that's what I did.
asd at asd:~/Downloads/wpa_supplicant-2.0_modified/wpa_supplicant$ sudo ./wpa_supplicant -g/var/run/wpa_supplicant-global -iwlan2 -c/etc/p2p.conf -Dnl80211 -dt -f/var/log/deb_wpa_supplican.log

asd at asd:~/Downloads/wpa_supplicant-2.0_modified/wpa_supplicant$ sudo ./wpa_cli -g/var/run/wpa_supplicant-globalwpa_cli v2.0Copyright (c) 2004-2012, Jouni Malinen <j at w1.fi> and contributors
This software may be distributed under the terms of the BSD license.See README for more details.

Selected interface 'wlan2'
Interactive mode
> p2p_findOK<3>P2P-DEVICE-FOUND ae:22:0b:a6:8d:59 p2p_dev_addr=ae:22:0b:a6:8d:59 pri_dev_type=10-0050F204-5 name='Android_281c' config_methods=0x188 dev_capab=0x25 group_capab=0x0<3>P2P-PROV-DISC-PBC-REQ ae:22:0b:a6:8d:59 p2p_dev_addr=ae:22:0b:a6:8d:59 pri_dev_type=10-0050F204-5 name='Android_281c' config_methods=0x188 dev_capab=0x25 group_capab=0x0<3>P2P-PROV-DISC-PBC-REQ ae:22:0b:a6:8d:59 p2p_dev_addr=ae:22:0b:a6:8d:59 pri_dev_type=10-0050F204-5 name='Android_281c' config_methods=0x188 dev_capab=0x25 group_capab=0x0<3>P2P-PROV-DISC-PBC-REQ ae:22:0b:a6:8d:59 p2p_dev_addr=ae:22:0b:a6:8d:59 pri_dev_type=10-0050F204-5 name='Android_281c' config_methods=0x188 dev_capab=0x25 group_capab=0x0<3>P2P-GO-NEG-REQUEST ae:22:0b:a6:8d:59 dev_passwd_id=4<3>P2P-FIND-STOPPED OK<3>P2P-GO-NEG-SUCCESS <3>P2P-GROUP-FORMATION-SUCCESS <3>P2P-GROUP-STARTED p2p-wlan2-0 GO ssid="DIRECT-iP" freq=2462 passphrase="rFHiJRhB" go_dev_addr=64:70:02:23:0c:e1 [PERSISTENT]<3>AP-STA-CONNECTED ae:22:0b:a6:0d:59 p2p_dev_addr=ae:22:0b:a6:8d:59OK/*at this point I manually launch a dhcp server to give an ip to GO's client*/ > > IFNAME=p2p-wlan2-0 wps_pbcunknown command/*and if I use raw...*/> raw IFNAME=wlan2 statusUNKNOWN COMMAND> raw IFNAME=p2p-wlan2-0 wps_pbcUNKNOWN COMMAND

Which command I have to use to let the wpa_supplicant run wps_pbc on p2p-wlan2-0 with no need to launch "./wpa_cli p2p-wlan2-0" before?

Thanks.

> Date: Mon, 12 Oct 2015 00:37:34 +0300
> From: j at w1.fi
> To: hostap at lists.shmoo.com
> Subject: Re: How to issue wps_pbc command to the right p2p interface
> 
> On Wed, Oct 07, 2015 at 01:30:11PM +0200, Andrea Chittano wrote:
> > Anyway, I followed your suggestion but I still cannot correctly execute wps-pbc.Moreover, it seems that wpa_supplicant, started as shown below, does not use the p2p configuration file that I put in /etc/ folder. I say that because the Android devices I use to connect to wi-fi card on linux machine, do not notice the wi-fi card name.The p2p configuration file contains the following information:
> > ctrl_interface=/var/run/wpa_supplicantap_scan=1device_name=P2P-Namedriver_param=use_p2p_group_interface=1p2p_go_intent=15
> > 
> > These are the steps I followed:
> > asd at asd:~/Desktop/wpa_supplicant-2.5/wpa_supplicant$ sudo ./wpa_supplicant -g/var/run/wpa_supplicant-global -c/etc/p2p.conf -dt -f/var/log/my_wpa_supplicant.log
> 
> That -c parameter without any interface (-i parameter) on the command
> line does not do anything. If you want to use a specific configuration
> file with an interface and do this from the command line, you'll need to
> include both the -c and -i parameters.
> 
> > asd at asd:~/Desktop/wpa_supplicant-2.5/wpa_supplicant$ sudo ./wpa_cli -g/run/wpa_supplicant-global interface_add wlan2 "" nl80211 /var/run/wpa_supplicant
> 
> This is adding a new interface dynamically without specifying any
> configuration file. If you want to specify a configuration file for a
> dynamically added interface, that second parameter ("") is the place to
> provide the path to the configuration file.
> 
> -- 
> 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/20151012/052fda5a/attachment.htm>



More information about the Hostap mailing list