How to issue wps_pbc command to the right p2p interface

Andrea Chittano andrea.chittano at hotmail.it
Wed Oct 7 07:30:11 EDT 2015




Hi,it seems that there was an error on my machine that was not caused by wpa_supplicant.
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

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_supplicantOKasd at asd:~/Desktop/wpa_supplicant-2.5/wpa_supplicant$ sudo ./wpa_cliwpa_cli v2.5Copyright (c) 2004-2015, 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>CTRL-EVENT-SCAN-STARTED <3>P2P-DEVICE-FOUND b2:df:3a:f0:77:0d p2p_dev_addr=b2:df:3a:f0:77:0d pri_dev_type=10-0050F204-5 name='W3Lab CSP (SM-P605)' config_methods=0x188 dev_capab=0x25 group_capab=0x0 vendor_elems=1 new=1<3>CTRL-EVENT-SCAN-STARTED <3>CTRL-EVENT-SCAN-STARTED <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 new=1<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>CTRL-EVENT-SCAN-STARTED <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 go_intent=6<3>P2P-FIND-STOPPED OK<3>P2P-GO-NEG-SUCCESS role=GO freq=2462 ht40=0 peer_dev=ae:22:0b:a6:8d:59 peer_iface=ae:22:0b:a6:0d:59 wps_method=PBC<3>P2P-GROUP-FORMATION-SUCCESS <3>P2P-GROUP-STARTED p2p-wlan2-0 GO ssid="DIRECT-Jb" freq=2462 passphrase="1EGhj6eH" 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:59> > IFNAME=p2p-wlan2-0 wps_pbcUNKNOWN COMMAND> 

Note:I modified the source code of the wpa_cli in order to let the wpa_cli to send the p2p connect command to the wpa_supplicant automatically once it receives the <3>P2P-GO-NEG-REQUEST notification.
Do you know why it seems wpa_supplicant do not use p2p configuration file?With regard to "IFNAME=p2p-wlan2-0 wps_pbc unknown command" problem, do I need to add some new patch to wpa_cli.c file?
Thanks

> Date: Tue, 6 Oct 2015 13:12:41 +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 Tue, Oct 06, 2015 at 11:17:02AM +0200, Andrea Chittano wrote:
> > Let's suppose I want to use a global control interface, which is the right procedure (included the right way to set the configuration files) that I have to follow?
> > I mean, I would like to use the following p2p.conf file (located in /etc/ folder):
> > ctrl_interface=/var/run/wpa_supplicantap_scan=1device_name=P2P-Testdriver_param=use_p2p_group_interface=1p2p_go_intent=15
> > If I use the following set of commands, linux crashes once it notices the first p2p group owner negotiation request: -- wpa_supplicant -g /var/run/wpa_supplicant-global -c /etc/p2p.conf
> > -- wpa_cli -g /var/run/wpa_supplicant-global interface_add wlan0 "" nl80211 /var/run/wpa_supplicant
> 
> Could you please clarify what exactly you mean with "linux crashing"?
> Please post a wpa_supplicant debug log showing this.
> 
> -- 
> 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/20151007/81bd6943/attachment.htm>


More information about the HostAP mailing list