testing p2p using mac80211_hwsim

Jouni Malinen j
Sun Jan 29 11:16:18 PST 2012


On Sun, Jan 29, 2012 at 09:39:09AM -0800, Zahraa Salah wrote:
> Can give me more details about the test setup?

I'm normally using this type of setup:

Load mac80211_hwsim and start two copies of wpa_supplicant (wlan0 and
wlan1 netdevs) with the following configuration file:

ctrl_interface=DIR=/var/run/wpa_supplicant

Run "wpa_cli -i wlan0" and "wpa_cli -i wlan1" in separate terminals and
run P2P operations in them.

In other words, nothing that special here..

> Now Im running 2 instances of the supplicant but they cant discover each
> other when I give them the command p2p_find from wpa_cli 
> 
> They just remain scanning

Which kernel/mac80211 version are you using? Anything remotely recent
should have that working fine.

wpa_cli output looks like this in a simple group formation test:

wlan0:

> p2p_find
OK
<3>P2P-DEVICE-FOUND 02:00:00:00:01:00 p2p_dev_addr=02:00:00:00:01:00
pri_dev_type=0-00000000-0 name='' config_methods=0x108 dev_capab=0x23
group_capab=0x0
> p2p_connect 02:00:00:00:01:00 pbc
OK
<3>P2P-FIND-STOPPED 
<3>P2P-GO-NEG-SUCCESS 
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE-PBC 
<3>SME: Trying to authenticate with 02:00:00:00:01:00 (SSID='DIRECT-TY'
freq=2412 MHz)
<3>Trying to associate with 02:00:00:00:01:00 (SSID='DIRECT-TY'
freq=2412 MHz)
<3>Associated with 02:00:00:00:01:00
<3>CTRL-EVENT-EAP-STARTED EAP authentication started
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1
<3>CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected
<3>WPS-CRED-RECEIVED 
<3>WPS-SUCCESS 
<3>P2P-GROUP-FORMATION-SUCCESS 
<3>CTRL-EVENT-EAP-FAILURE EAP authentication failed
<3>CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=3
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE 
<3>SME: Trying to authenticate with 02:00:00:00:01:00 (SSID='DIRECT-TY'
freq=2412 MHz)
<3>Trying to associate with 02:00:00:00:01:00 (SSID='DIRECT-TY'
freq=2412 MHz)
<3>Associated with 02:00:00:00:01:00
<3>WPA: Key negotiation completed with 02:00:00:00:01:00 [PTK=CCMP
GTK=CCMP]
<3>CTRL-EVENT-CONNECTED - Connection to 02:00:00:00:01:00 completed
(auth) [id=3 id_str=]
<3>P2P-GROUP-STARTED wlan0 client ssid="DIRECT-TY" freq=2412
psk=8dd80ff10053e03740984183e0473c3de68bc5fab0f27a829f43a8cb772903fa
go_dev_addr=02:00:00:00:01:00
<3>WPA: Key negotiation completed with 02:00:00:00:01:00 [PTK=CCMP
GTK=CCMP]


wlan1:

> p2p_find 
OK
<3>P2P-DEVICE-FOUND 02:00:00:00:00:00 p2p_dev_addr=02:00:00:00:00:00
pri_dev_type=0-00000000-0 name='' config_methods=0x108 dev_capab=0x23
group_capab=0x0
<3>P2P-GO-NEG-REQUEST 02:00:00:00:00:00 dev_passwd_id=4
> p2p_connect 02:00:00:00:00:00 pbc
OK
<3>P2P-FIND-STOPPED 
<3>P2P-GO-NEG-SUCCESS 
<3>CTRL-EVENT-CONNECTED - Connection to 02:00:00:00:01:00 completed
(auth) [id=3 id_str=]
<3>WPS-ENROLLEE-SEEN 02:00:00:00:00:00
362db47b-a53a-5191-88fb-5458b986b2e4 0-00000000-0 0x2149 4 1 []
<3>CTRL-EVENT-EAP-STARTED 02:00:00:00:00:00
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254
<3>WPS-REG-SUCCESS 02:00:00:00:00:00
362db47b-a53a-5191-88fb-5458b986b2e4
<3>P2P-GROUP-FORMATION-SUCCESS 
<3>P2P-GROUP-STARTED wlan1 GO ssid="DIRECT-TY" freq=2412
passphrase="3svOiTQO" go_dev_addr=02:00:00:00:01:00
<3>WPS-SUCCESS 
<3>CTRL-EVENT-EAP-FAILURE 02:00:00:00:00:00
<3>WPS-ENROLLEE-SEEN 02:00:00:00:00:00
362db47b-a53a-5191-88fb-5458b986b2e4 0-00000000-0 0x2149 0 0 []
<3>AP-STA-CONNECTED 02:00:00:00:00:00 p2p_dev_addr=02:00:00:00:00:00

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list