NOTE: this page is for archival only, see the note at the end of the page.

P2P howto

prerequisites

In order to test P2P, you need:

  • a current wireless-testing kernel (or compat-wireless equivalent)
  • wpa_supplicant from the hostap git branch:

    git clone git://w1.fi/srv/git/hostap.git
  • an Atheros ath9k device
  • OR an ar9170 USB device (with carl9170 driver!)
  • (OR another device that has a mac80211 driver, but these are known to work, iwlwifi does not currently work)

Make sure to always update them together, since work is still going into both that needs to be synchronised.

Note that (depending on the driver?) P2P might still use CCK bitrates which is contrary to what the spec says, but it's good enough for functional testing.

wpa_supplicant

Use this config file for compiling:

CONFIG_DRIVER_NL80211=y

# optional, depending on libnl version you want to use:
# CONFIG_LIBNL20=y

CONFIG_CTRL_IFACE=y

CONFIG_WPS=y
CONFIG_WPS2=y

CONFIG_P2P=y
CONFIG_AP=y

running

Start wpa_supplicant with this config file:

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

device_name=my-AR9280-p2p
device_type=1-0050F204-1

# If you need to modify the group owner intent, 0-15, the higher
# number indicates preference to become the GO
#p2p_go_intent=15

# optional, can be useful for monitoring, forces
# wpa_supplicant to use only channel 1 rather than
# 1, 6 and 11:
#p2p_listen_reg_class=81
#p2p_listen_channel=1
#p2p_oper_reg_class=81
#p2p_oper_channel=1

like this:

./wpa_supplicant -Dnl80211 -c /path/to/p2p.conf -i wlan0 -dt

Then start ./wpa_cli and use the various p2p_* commands, for example:

p2p_find
[wait for peer to be found]
p2p_connect <peer-mac-addr> pbc go_intent=<0..15>

(or you can use pin of course.)


This is a static dump of the wiki, taken after locking it in January 2015. The new wiki is at https://wireless.wiki.kernel.org/.
versions of this page: last, v5, v4, v3, v2, v1