wpa_supplicant and WPS config methods vs P2P config methods

Atul Joshi jatul at qti.qualcomm.com
Mon Sep 7 10:32:58 EDT 2015


On Fri, Aug 28, 2015 at 10:06:50AM +0000, Atul Joshi wrote:

> Wpa supplicant has a CLI command SET config_methods to set WPS config methods but the config methods within P2P device info attribute are taken from p2p_supplicant.conf this can lead to discrepancy in config method advertisement.

> Is there  a CLI command to set config method in P2P device info attribute?



Could you please provide more details on which field in which frame does not get updated? I verified that "SET config_methods <methods>" command updates P2P Device Info attribute and the config_methods P2P peer value did report the updated value in device discovery. I have executed following commands



Excerpts of the supplicant logs (I am using wpa_supplicant 2.4)

1441633762.090168: wlan3: Control interface command 'SET device_type 10-0050F204-4'

1441633762.090200: CTRL_IFACE SET 'device_type'='10-0050F204-4'

1441633762.090289: wlan3: Control interface command 'SET config_methods pbc'

1441633762.090304: CTRL_IFACE SET 'config_methods'='pbc'

1441633762.090312: config_methods='pbc'

.

.

.

1441633801.138872: wlan3: Control interface command 'P2P_GROUP_ADD freq=2412'

1441633801.138886: P2P: Stop any on-going P2P FIND

1441633801.138895: P2P: Stopping find

1441633801.138913: P2P: Clear timeout (state=SEARCH)

1441633801.138917: P2P-FIND-STOPPED

1441633801.138929: CTRL_IFACE monitor sent successfully to /tmp/wpa_ctrl_5749-3\x00

1441633801.138935: P2P: State SEARCH -> IDLE

1441633801.138940: P2P: Clear timeout (state=IDLE)

1441633801.138945: P2P: Clear drv_in_listen (2412)


beacon_ies - hexdump(len=77): 7f 08 04 00 00 00 00 00 00 40 dd 2d 00 50 f2 04 10 4a 00 01 10 10 44 00 01 02 10 49 00 06 00 37 2a 00 01 20 10 11 00 05 43 53 52 47 4f 10 54 00 08 00 0a 00 50 f2 04 00 04 dd 12 50 6f 9a 09 02 02 00 25 89 03 06 00 00 02 5b 03 12 50
1441633801.223853: nl80211: proberesp_ies - hexdump(len=160): 7f 08 04 00 00 00 00 00 00 40 dd 6c 00 50 f2 04 10 4a 00 01 10 10 44 00 01 02 10 3b 00 01 03 10 47 00 10 00 50 f2 12 34 56 78 90 12 34 56 78 90 12 34 56 10 21 00 01 20 10 23 00 09 4d 6f 72 70 68 65 75 73 32 10 24 00 01 20 10 42 00 05 31 32 33 34 35 10 54 00 08 00 0a 00 50 f2 04 00 04 10 11 00 05 43 53 52 47 4f 10 08 00 02 00 00 10 49 00 06 00 37 2a 00 01 20 dd 26 50 6f 9a 09 02 02 00 25 89 0d 1a 00 00 02 5b 03 12 50 11 88 00 0a 00 50 f2 04 00 04 00 10 11 00 05 43 53 52 47 4f

Here we can see that 0d 1a 00 00 02 5b 03 12 50 11 88  last 2 octets are config methods.
Also I can see that irrespective of which methods are configured, we process Provision Discovery Request from peer, by comparing with  hardcoded config methods

In file p2p_pd.c in function  p2p_process_prov_disc_req we compare
                if (!(msg.wps_config_methods &
                      (WPS_CONFIG_DISPLAY | WPS_CONFIG_KEYPAD |
                       WPS_CONFIG_PUSHBUTTON | WPS_CONFIG_P2PS))) {
                                p2p_dbg(p2p, "Unsupported Config Methods in Provision Discovery Request");
                                goto out;
                }

Thus for P2P case, we always consider all P2P config methods supported.

Thanks
atul

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20150907/1cc3f60d/attachment.htm>


More information about the HostAP mailing list