xref: /freebsd/contrib/wpa/wpa_supplicant/README-P2P (revision f05cddf940dbfc5b657f5e9beb9de2c31e509e5b)
1*f05cddf9SRui Paulowpa_supplicant and Wi-Fi P2P
2*f05cddf9SRui Paulo============================
3*f05cddf9SRui Paulo
4*f05cddf9SRui PauloThis document describes how the Wi-Fi P2P implementation in
5*f05cddf9SRui Paulowpa_supplicant can be configured and how an external component on the
6*f05cddf9SRui Pauloclient (e.g., management GUI) is used to enable WPS enrollment and
7*f05cddf9SRui Pauloregistrar registration.
8*f05cddf9SRui Paulo
9*f05cddf9SRui Paulo
10*f05cddf9SRui PauloIntroduction to Wi-Fi P2P
11*f05cddf9SRui Paulo-------------------------
12*f05cddf9SRui Paulo
13*f05cddf9SRui PauloTODO
14*f05cddf9SRui Paulo
15*f05cddf9SRui PauloMore information about Wi-Fi P2P is available from Wi-Fi Alliance:
16*f05cddf9SRui Paulohttp://www.wi-fi.org/Wi-Fi_Direct.php
17*f05cddf9SRui Paulo
18*f05cddf9SRui Paulo
19*f05cddf9SRui Paulowpa_supplicant implementation
20*f05cddf9SRui Paulo-----------------------------
21*f05cddf9SRui Paulo
22*f05cddf9SRui PauloTODO
23*f05cddf9SRui Paulo
24*f05cddf9SRui Paulo
25*f05cddf9SRui Paulowpa_supplicant configuration
26*f05cddf9SRui Paulo----------------------------
27*f05cddf9SRui Paulo
28*f05cddf9SRui PauloWi-Fi P2P is an optional component that needs to be enabled in the
29*f05cddf9SRui Paulowpa_supplicant build configuration (.config). Here is an example
30*f05cddf9SRui Pauloconfiguration that includes Wi-Fi P2P support and Linux nl80211
31*f05cddf9SRui Paulo-based driver interface:
32*f05cddf9SRui Paulo
33*f05cddf9SRui PauloCONFIG_DRIVER_NL80211=y
34*f05cddf9SRui PauloCONFIG_CTRL_IFACE=y
35*f05cddf9SRui PauloCONFIG_P2P=y
36*f05cddf9SRui PauloCONFIG_AP=y
37*f05cddf9SRui PauloCONFIG_WPS=y
38*f05cddf9SRui Paulo
39*f05cddf9SRui Paulo
40*f05cddf9SRui PauloIn run-time configuration file (wpa_supplicant.conf), some parameters
41*f05cddf9SRui Paulofor P2P may be set. In order to make the devices easier to recognize,
42*f05cddf9SRui Paulodevice_name and device_type should be specified. For example,
43*f05cddf9SRui Paulosomething like this should be included:
44*f05cddf9SRui Paulo
45*f05cddf9SRui Pauloctrl_interface=/var/run/wpa_supplicant
46*f05cddf9SRui Paulodevice_name=My P2P Device
47*f05cddf9SRui Paulodevice_type=1-0050F204-1
48*f05cddf9SRui Paulo
49*f05cddf9SRui Paulo
50*f05cddf9SRui Paulowpa_cli
51*f05cddf9SRui Paulo-------
52*f05cddf9SRui Paulo
53*f05cddf9SRui PauloActual Wi-Fi P2P operations are requested during runtime. These can be
54*f05cddf9SRui Paulodone for example using wpa_cli (which is described below) or a GUI
55*f05cddf9SRui Paulolike wpa_gui-qt4.
56*f05cddf9SRui Paulo
57*f05cddf9SRui Paulo
58*f05cddf9SRui Paulowpa_cli starts in interactive mode if no command string is included on
59*f05cddf9SRui Paulothe command line. By default, it will select the first network interface
60*f05cddf9SRui Paulothat it can find (and that wpa_supplicant controls). If more than one
61*f05cddf9SRui Paulointerface is in use, it may be necessary to select one of the explicitly
62*f05cddf9SRui Pauloby adding -i argument on the command line (e.g., 'wpa_cli -i wlan1').
63*f05cddf9SRui Paulo
64*f05cddf9SRui PauloMost of the P2P operations are done on the main interface (e.g., the
65*f05cddf9SRui Paulointerface that is automatically added when the driver is loaded, e.g.,
66*f05cddf9SRui Paulowlan0). When using a separate virtual interface for group operations
67*f05cddf9SRui Paulo(e.g., wlan1), the control interface for that group interface may need
68*f05cddf9SRui Pauloto be used for some operations (mainly WPS activation in GO). This may
69*f05cddf9SRui Paulochange in the future so that all the needed operations could be done
70*f05cddf9SRui Pauloover the main control interface.
71*f05cddf9SRui Paulo
72*f05cddf9SRui PauloDevice Discovery
73*f05cddf9SRui Paulo
74*f05cddf9SRui Paulop2p_find [timeout in seconds] [type=<social|progressive>] \
75*f05cddf9SRui Paulo	[dev_id=<addr>] [delay=<search delay in ms>]
76*f05cddf9SRui Paulo
77*f05cddf9SRui PauloThe default behavior is to run a single full scan in the beginning and
78*f05cddf9SRui Paulothen scan only social channels. type=social will scan only social
79*f05cddf9SRui Paulochannels, i.e., it skips the initial full scan. type=progressive is
80*f05cddf9SRui Paulolike the default behavior, but it will scan through all the channels
81*f05cddf9SRui Pauloprogressively one channel at the time in the Search state rounds. This
82*f05cddf9SRui Paulowill help in finding new groups or groups missed during the initial
83*f05cddf9SRui Paulofull scan.
84*f05cddf9SRui Paulo
85*f05cddf9SRui PauloThe optional dev_id option can be used to specify a single P2P peer to
86*f05cddf9SRui Paulosearch for. The optional delay parameter can be used to request an extra
87*f05cddf9SRui Paulodelay to be used between search iterations (e.g., to free up radio
88*f05cddf9SRui Pauloresources for concurrent operations).
89*f05cddf9SRui Paulo
90*f05cddf9SRui Paulop2p_listen [timeout in seconds]
91*f05cddf9SRui Paulo
92*f05cddf9SRui PauloStart Listen-only state (become discoverable without searching for
93*f05cddf9SRui Pauloother devices). Optional parameter can be used to specify the duration
94*f05cddf9SRui Paulofor the Listen operation in seconds. This command may not be of that
95*f05cddf9SRui Paulomuch use during normal operations and is mainly designed for
96*f05cddf9SRui Paulotesting. It can also be used to keep the device discoverable without
97*f05cddf9SRui Paulohaving to maintain a group.
98*f05cddf9SRui Paulo
99*f05cddf9SRui Paulop2p_stop_find
100*f05cddf9SRui Paulo
101*f05cddf9SRui PauloStop ongoing P2P device discovery or other operation (connect, listen
102*f05cddf9SRui Paulomode).
103*f05cddf9SRui Paulo
104*f05cddf9SRui Paulop2p_flush
105*f05cddf9SRui Paulo
106*f05cddf9SRui PauloFlush P2P peer table and state.
107*f05cddf9SRui Paulo
108*f05cddf9SRui PauloGroup Formation
109*f05cddf9SRui Paulo
110*f05cddf9SRui Paulop2p_prov_disc <peer device address> <display|keypad|pbc> [join|auto]
111*f05cddf9SRui Paulo
112*f05cddf9SRui PauloSend P2P provision discovery request to the specified peer. The
113*f05cddf9SRui Pauloparameters for this command are the P2P device address of the peer and
114*f05cddf9SRui Paulothe desired configuration method. For example, "p2p_prov_disc
115*f05cddf9SRui Paulo02:01:02:03:04:05 display" would request the peer to display a PIN for
116*f05cddf9SRui Paulous and "p2p_prov_disc 02:01:02:03:04:05 keypad" would request the peer
117*f05cddf9SRui Pauloto enter a PIN that we display.
118*f05cddf9SRui Paulo
119*f05cddf9SRui PauloThe optional "join" parameter can be used to indicate that this command
120*f05cddf9SRui Paulois requesting an already running GO to prepare for a new client. This is
121*f05cddf9SRui Paulomainly used with "display" to request it to display a PIN. The "auto"
122*f05cddf9SRui Pauloparameter can be used to request wpa_supplicant to automatically figure
123*f05cddf9SRui Pauloout whether the peer device is operating as a GO and if so, use
124*f05cddf9SRui Paulojoin-a-group style PD instead of GO Negotiation style PD.
125*f05cddf9SRui Paulo
126*f05cddf9SRui Paulop2p_connect <peer device address> <pbc|pin|PIN#> [display|keypad]
127*f05cddf9SRui Paulo	[persistent|persistent=<network id>] [join|auth]
128*f05cddf9SRui Paulo	[go_intent=<0..15>] [freq=<in MHz>] [ht40] [provdisc]
129*f05cddf9SRui Paulo
130*f05cddf9SRui PauloStart P2P group formation with a discovered P2P peer. This includes
131*f05cddf9SRui Paulooptional group owner negotiation, group interface setup, provisioning,
132*f05cddf9SRui Pauloand establishing data connection.
133*f05cddf9SRui Paulo
134*f05cddf9SRui PauloThe <pbc|pin|PIN#> parameter specifies the WPS provisioning
135*f05cddf9SRui Paulomethod. "pbc" string starts pushbutton method, "pin" string start PIN
136*f05cddf9SRui Paulomethod using an automatically generated PIN (which will be returned as
137*f05cddf9SRui Paulothe command return code), PIN# means that a pre-selected PIN can be
138*f05cddf9SRui Pauloused (e.g., 12345670). [display|keypad] is used with PIN method
139*f05cddf9SRui Pauloto specify which PIN is used (display=dynamically generated random PIN
140*f05cddf9SRui Paulofrom local display, keypad=PIN entered from peer display). "persistent"
141*f05cddf9SRui Pauloparameter can be used to request a persistent group to be formed. The
142*f05cddf9SRui Paulo"persistent=<network id>" alternative can be used to pre-populate
143*f05cddf9SRui PauloSSID/passphrase configuration based on a previously used persistent
144*f05cddf9SRui Paulogroup where this device was the GO. The previously used parameters will
145*f05cddf9SRui Paulothen be used if the local end becomes the GO in GO Negotiation (which
146*f05cddf9SRui Paulocan be forced with go_intent=15).
147*f05cddf9SRui Paulo
148*f05cddf9SRui Paulo"join" indicates that this is a command to join an existing group as a
149*f05cddf9SRui Pauloclient. It skips the GO Negotiation part. This will send a Provision
150*f05cddf9SRui PauloDiscovery Request message to the target GO before associating for WPS
151*f05cddf9SRui Pauloprovisioning.
152*f05cddf9SRui Paulo
153*f05cddf9SRui Paulo"auth" indicates that the WPS parameters are authorized for the peer
154*f05cddf9SRui Paulodevice without actually starting GO Negotiation (i.e., the peer is
155*f05cddf9SRui Pauloexpected to initiate GO Negotiation). This is mainly for testing
156*f05cddf9SRui Paulopurposes.
157*f05cddf9SRui Paulo
158*f05cddf9SRui Paulo"go_intent" can be used to override the default GO Intent for this GO
159*f05cddf9SRui PauloNegotiation.
160*f05cddf9SRui Paulo
161*f05cddf9SRui Paulo"freq" can be used to set a forced operating channel (e.g., freq=2412
162*f05cddf9SRui Pauloto select 2.4 GHz channel 1).
163*f05cddf9SRui Paulo
164*f05cddf9SRui Paulo"provdisc" can be used to request a Provision Discovery exchange to be
165*f05cddf9SRui Pauloused prior to starting GO Negotiation as a workaround with some deployed
166*f05cddf9SRui PauloP2P implementations that require this to allow the user to accept the
167*f05cddf9SRui Pauloconnection.
168*f05cddf9SRui Paulo
169*f05cddf9SRui Paulop2p_group_add [persistent|persistent=<network id>] [freq=<freq in MHz>] [ht40]
170*f05cddf9SRui Paulo
171*f05cddf9SRui PauloSet up a P2P group owner manually (i.e., without group owner
172*f05cddf9SRui Paulonegotiation with a specific peer). This is also known as autonomous
173*f05cddf9SRui PauloGO. Optional persistent=<network id> can be used to specify restart of
174*f05cddf9SRui Pauloa persistent group. Optional freq=<freq in MHz> can be used to force
175*f05cddf9SRui Paulothe GO to be started on a specific frequency. Special freq=2 or freq=5
176*f05cddf9SRui Paulooptions can be used to request the best 2.4 GHz or 5 GHz band channel
177*f05cddf9SRui Pauloto be selected automatically.
178*f05cddf9SRui Paulo
179*f05cddf9SRui Paulop2p_reject <peer device address>
180*f05cddf9SRui Paulo
181*f05cddf9SRui PauloReject connection attempt from a peer (specified with a device
182*f05cddf9SRui Pauloaddress). This is a mechanism to reject a pending GO Negotiation with
183*f05cddf9SRui Pauloa peer and request to automatically block any further connection or
184*f05cddf9SRui Paulodiscovery of the peer.
185*f05cddf9SRui Paulo
186*f05cddf9SRui Paulop2p_group_remove <group interface>
187*f05cddf9SRui Paulo
188*f05cddf9SRui PauloTerminate a P2P group. If a new virtual network interface was used for
189*f05cddf9SRui Paulothe group, it will also be removed. The network interface name of the
190*f05cddf9SRui Paulogroup interface is used as a parameter for this command.
191*f05cddf9SRui Paulo
192*f05cddf9SRui Paulop2p_cancel
193*f05cddf9SRui Paulo
194*f05cddf9SRui PauloCancel an ongoing P2P group formation and joining-a-group related
195*f05cddf9SRui Paulooperation. This operations unauthorizes the specific peer device (if any
196*f05cddf9SRui Paulohad been authorized to start group formation), stops P2P find (if in
197*f05cddf9SRui Pauloprogress), stops pending operations for join-a-group, and removes the
198*f05cddf9SRui PauloP2P group interface (if one was used) that is in the WPS provisioning
199*f05cddf9SRui Paulostep. If the WPS provisioning step has been completed, the group is not
200*f05cddf9SRui Pauloterminated.
201*f05cddf9SRui Paulo
202*f05cddf9SRui PauloService Discovery
203*f05cddf9SRui Paulo
204*f05cddf9SRui Paulop2p_serv_disc_req
205*f05cddf9SRui Paulo
206*f05cddf9SRui PauloSchedule a P2P service discovery request. The parameters for this
207*f05cddf9SRui Paulocommand are the device address of the peer device (or 00:00:00:00:00:00
208*f05cddf9SRui Paulofor wildcard query that is sent to every discovered P2P peer that
209*f05cddf9SRui Paulosupports service discovery) and P2P Service Query TLV(s) as hexdump. For
210*f05cddf9SRui Pauloexample,
211*f05cddf9SRui Paulo
212*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 02000001
213*f05cddf9SRui Paulo
214*f05cddf9SRui Pauloschedules a request for listing all available services of all service
215*f05cddf9SRui Paulodiscovery protocols and requests this to be sent to all discovered
216*f05cddf9SRui Paulopeers (note: this can result in long response frames). The pending
217*f05cddf9SRui Paulorequests are sent during device discovery (see p2p_find).
218*f05cddf9SRui Paulo
219*f05cddf9SRui PauloOnly a single pending wildcard query is supported, but there can be
220*f05cddf9SRui Paulomultiple pending peer device specific queries (each will be sent in
221*f05cddf9SRui Paulosequence whenever the peer is found).
222*f05cddf9SRui Paulo
223*f05cddf9SRui PauloThis command returns an identifier for the pending query (e.g.,
224*f05cddf9SRui Paulo"1f77628") that can be used to cancel the request. Directed requests
225*f05cddf9SRui Paulowill be automatically removed when the specified peer has replied to
226*f05cddf9SRui Pauloit.
227*f05cddf9SRui Paulo
228*f05cddf9SRui PauloFor UPnP, an alternative command format can be used to specify a
229*f05cddf9SRui Paulosingle query TLV (i.e., a service discovery for a specific UPnP
230*f05cddf9SRui Pauloservice):
231*f05cddf9SRui Paulo
232*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 upnp <version hex> <ST: from M-SEARCH>
233*f05cddf9SRui Paulo
234*f05cddf9SRui PauloFor example:
235*f05cddf9SRui Paulo
236*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 upnp 10 urn:schemas-upnp-org:device:InternetGatewayDevice:1
237*f05cddf9SRui Paulo
238*f05cddf9SRui PauloAdditional examples for queries:
239*f05cddf9SRui Paulo
240*f05cddf9SRui Paulo# list of all Bonjour services
241*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 02000101
242*f05cddf9SRui Paulo
243*f05cddf9SRui Paulo# list of all UPnP services
244*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 02000201
245*f05cddf9SRui Paulo
246*f05cddf9SRui Paulo# list of all WS-Discovery services
247*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 02000301
248*f05cddf9SRui Paulo
249*f05cddf9SRui Paulo# list of all Bonjour and UPnP services
250*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 0200010102000202
251*f05cddf9SRui Paulo
252*f05cddf9SRui Paulo# Apple File Sharing over TCP
253*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 130001010b5f6166706f766572746370c00c000c01
254*f05cddf9SRui Paulo
255*f05cddf9SRui Paulo# Bonjour SSTH (supported service type hash)
256*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 05000101000000
257*f05cddf9SRui Paulo
258*f05cddf9SRui Paulo# UPnP examples
259*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 upnp 10 ssdp:all
260*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 upnp 10 upnp:rootdevice
261*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 upnp 10 urn:schemas-upnp-org:service:ContentDirectory:2
262*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 upnp 10 uuid:6859dede-8574-59ab-9332-123456789012
263*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 upnp 10 urn:schemas-upnp-org:device:InternetGatewayDevice:1
264*f05cddf9SRui Paulo
265*f05cddf9SRui Paulo# Wi-Fi Display examples
266*f05cddf9SRui Paulo# format: wifi-display <list of roles> <list of subelements>
267*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 wifi-display [source] 2,3,4,5
268*f05cddf9SRui Paulop2p_serv_disc_req 02:01:02:03:04:05 wifi-display [pri-sink] 3
269*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 wifi-display [sec-source] 2
270*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 wifi-display [source+sink] 2,3,4,5
271*f05cddf9SRui Paulop2p_serv_disc_req 00:00:00:00:00:00 wifi-display [source][pri-sink] 2,3,4,5
272*f05cddf9SRui Paulo
273*f05cddf9SRui Paulop2p_serv_disc_cancel_req <query identifier>
274*f05cddf9SRui Paulo
275*f05cddf9SRui PauloCancel a pending P2P service discovery request. This command takes a
276*f05cddf9SRui Paulosingle parameter: identifier for the pending query (the value returned
277*f05cddf9SRui Pauloby p2p_serv_disc_req, e.g., "p2p_serv_disc_cancel_req 1f77628".
278*f05cddf9SRui Paulo
279*f05cddf9SRui Paulop2p_serv_disc_resp
280*f05cddf9SRui Paulo
281*f05cddf9SRui PauloReply to a service discovery query. This command takes following
282*f05cddf9SRui Pauloparameters: frequency in MHz, destination address, dialog token,
283*f05cddf9SRui Pauloresponse TLV(s). The first three parameters are copied from the
284*f05cddf9SRui Paulorequest event. For example, "p2p_serv_disc_resp 2437 02:40:61:c2:f3:b7
285*f05cddf9SRui Paulo1 0300000101". This command is used only if external program is used
286*f05cddf9SRui Pauloto process the request (see p2p_serv_disc_external).
287*f05cddf9SRui Paulo
288*f05cddf9SRui Paulop2p_service_update
289*f05cddf9SRui Paulo
290*f05cddf9SRui PauloIndicate that local services have changed. This is used to increment
291*f05cddf9SRui Paulothe P2P service indicator value so that peers know when previously
292*f05cddf9SRui Paulocached information may have changed. This is only needed when external
293*f05cddf9SRui Pauloservice discovery processing is enabled since the commands to
294*f05cddf9SRui Paulopre-configure services for internal processing will increment the
295*f05cddf9SRui Pauloindicator automatically.
296*f05cddf9SRui Paulo
297*f05cddf9SRui Paulop2p_serv_disc_external <0|1>
298*f05cddf9SRui Paulo
299*f05cddf9SRui PauloConfigure external processing of P2P service requests: 0 (default) =
300*f05cddf9SRui Paulono external processing of requests (i.e., internal code will process
301*f05cddf9SRui Pauloeach request based on pre-configured services), 1 = external
302*f05cddf9SRui Pauloprocessing of requests (external program is responsible for replying
303*f05cddf9SRui Pauloto service discovery requests with p2p_serv_disc_resp). Please note
304*f05cddf9SRui Paulothat there is quite strict limit on how quickly the response needs to
305*f05cddf9SRui Paulobe transmitted, so use of the internal processing is strongly
306*f05cddf9SRui Paulorecommended.
307*f05cddf9SRui Paulo
308*f05cddf9SRui Paulop2p_service_add bonjour <query hexdump> <RDATA hexdump>
309*f05cddf9SRui Paulo
310*f05cddf9SRui PauloAdd a local Bonjour service for internal SD query processing.
311*f05cddf9SRui Paulo
312*f05cddf9SRui PauloExamples:
313*f05cddf9SRui Paulo
314*f05cddf9SRui Paulo# AFP Over TCP (PTR)
315*f05cddf9SRui Paulop2p_service_add bonjour 0b5f6166706f766572746370c00c000c01 074578616d706c65c027
316*f05cddf9SRui Paulo# AFP Over TCP (TXT) (RDATA=null)
317*f05cddf9SRui Paulop2p_service_add bonjour 076578616d706c650b5f6166706f766572746370c00c001001 00
318*f05cddf9SRui Paulo
319*f05cddf9SRui Paulo# IP Printing over TCP (PTR) (RDATA=MyPrinter._ipp._tcp.local.)
320*f05cddf9SRui Paulop2p_service_add bonjour 045f697070c00c000c01 094d795072696e746572c027
321*f05cddf9SRui Paulo# IP Printing over TCP (TXT) (RDATA=txtvers=1,pdl=application/postscript)
322*f05cddf9SRui Paulop2p_service_add bonjour 096d797072696e746572045f697070c00c001001 09747874766572733d311a70646c3d6170706c69636174696f6e2f706f7374736372797074
323*f05cddf9SRui Paulo
324*f05cddf9SRui Paulo# Supported Service Type Hash (SSTH)
325*f05cddf9SRui Paulop2p_service_add bonjour 000000 <32-byte bitfield as hexdump>
326*f05cddf9SRui Paulo(note: see P2P spec Annex E.4 for information on how to construct the bitfield)
327*f05cddf9SRui Paulo
328*f05cddf9SRui Paulop2p_service_del bonjour <query hexdump>
329*f05cddf9SRui Paulo
330*f05cddf9SRui PauloRemove a local Bonjour service from internal SD query processing.
331*f05cddf9SRui Paulo
332*f05cddf9SRui Paulop2p_service_add upnp <version hex> <service>
333*f05cddf9SRui Paulo
334*f05cddf9SRui PauloAdd a local UPnP service for internal SD query processing.
335*f05cddf9SRui Paulo
336*f05cddf9SRui PauloExamples:
337*f05cddf9SRui Paulo
338*f05cddf9SRui Paulop2p_service_add upnp 10 uuid:6859dede-8574-59ab-9332-123456789012::upnp:rootdevice
339*f05cddf9SRui Paulop2p_service_add upnp 10 uuid:5566d33e-9774-09ab-4822-333456785632::upnp:rootdevice
340*f05cddf9SRui Paulop2p_service_add upnp 10 uuid:1122de4e-8574-59ab-9322-333456789044::urn:schemas-upnp-org:service:ContentDirectory:2
341*f05cddf9SRui Paulop2p_service_add upnp 10 uuid:5566d33e-9774-09ab-4822-333456785632::urn:schemas-upnp-org:service:ContentDirectory:2
342*f05cddf9SRui Paulop2p_service_add upnp 10 uuid:6859dede-8574-59ab-9332-123456789012::urn:schemas-upnp-org:device:InternetGatewayDevice:1
343*f05cddf9SRui Paulo
344*f05cddf9SRui Paulop2p_service_del upnp <version hex> <service>
345*f05cddf9SRui Paulo
346*f05cddf9SRui PauloRemove a local UPnP service from internal SD query processing.
347*f05cddf9SRui Paulo
348*f05cddf9SRui Paulop2p_service_flush
349*f05cddf9SRui Paulo
350*f05cddf9SRui PauloRemove all local services from internal SD query processing.
351*f05cddf9SRui Paulo
352*f05cddf9SRui PauloInvitation
353*f05cddf9SRui Paulo
354*f05cddf9SRui Paulop2p_invite [persistent=<network id>|group=<group ifname>] [peer=address]
355*f05cddf9SRui Paulo	[go_dev_addr=address] [freq=<freq in MHz>] [ht40]
356*f05cddf9SRui Paulo
357*f05cddf9SRui PauloInvite a peer to join a group (e.g., group=wlan1) or to reinvoke a
358*f05cddf9SRui Paulopersistent group (e.g., persistent=4). If the peer device is the GO of
359*f05cddf9SRui Paulothe persistent group, the peer parameter is not needed. Otherwise it is
360*f05cddf9SRui Pauloused to specify which device to invite. go_dev_addr parameter can be
361*f05cddf9SRui Pauloused to override the GO device address for Invitation Request should
362*f05cddf9SRui Pauloit be not known for some reason (this should not be needed in most
363*f05cddf9SRui Paulocases). When reinvoking a persistent group, the GO device can specify
364*f05cddf9SRui Paulothe frequency for the group with the freq parameter.
365*f05cddf9SRui Paulo
366*f05cddf9SRui PauloGroup Operations
367*f05cddf9SRui Paulo
368*f05cddf9SRui Paulo(These are used on the group interface.)
369*f05cddf9SRui Paulo
370*f05cddf9SRui Paulowps_pin <any|address> <PIN>
371*f05cddf9SRui Paulo
372*f05cddf9SRui PauloStart WPS PIN method. This allows a single WPS Enrollee to connect to
373*f05cddf9SRui Paulothe AP/GO. This is used on the GO when a P2P client joins an existing
374*f05cddf9SRui Paulogroup. The second parameter is the address of the Enrollee or a string
375*f05cddf9SRui Paulo"any" to allow any station to use the entered PIN (which will restrict
376*f05cddf9SRui Paulothe PIN for one-time-use). PIN is the Enrollee PIN read either from a
377*f05cddf9SRui Paulolabel or display on the P2P Client/WPS Enrollee.
378*f05cddf9SRui Paulo
379*f05cddf9SRui Paulowps_pbc
380*f05cddf9SRui Paulo
381*f05cddf9SRui PauloStart WPS PBC method (i.e., push the button). This allows a single WPS
382*f05cddf9SRui PauloEnrollee to connect to the AP/GO. This is used on the GO when a P2P
383*f05cddf9SRui Pauloclient joins an existing group.
384*f05cddf9SRui Paulo
385*f05cddf9SRui Paulop2p_get_passphrase
386*f05cddf9SRui Paulo
387*f05cddf9SRui PauloGet the passphrase for a group (only available when acting as a GO).
388*f05cddf9SRui Paulo
389*f05cddf9SRui Paulop2p_presence_req [<duration> <interval>] [<duration> <interval>]
390*f05cddf9SRui Paulo
391*f05cddf9SRui PauloSend a P2P Presence Request to the GO (this is only available when
392*f05cddf9SRui Pauloacting as a P2P client). If no duration/interval pairs are given, the
393*f05cddf9SRui Paulorequest indicates that this client has no special needs for GO
394*f05cddf9SRui Paulopresence. the first parameter pair gives the preferred duration and
395*f05cddf9SRui Paulointerval values in microseconds. If the second pair is included, that
396*f05cddf9SRui Pauloindicates which value would be acceptable.
397*f05cddf9SRui Paulo
398*f05cddf9SRui PauloParameters
399*f05cddf9SRui Paulo
400*f05cddf9SRui Paulop2p_ext_listen [<period> <interval>]
401*f05cddf9SRui Paulo
402*f05cddf9SRui PauloConfigure Extended Listen Timing. If the parameters are omitted, this
403*f05cddf9SRui Paulofeature is disabled. If the parameters are included, Listen State will
404*f05cddf9SRui Paulobe entered every interval msec for at least period msec. Both values
405*f05cddf9SRui Paulohave acceptable range of 1-65535 (with interval obviously having to be
406*f05cddf9SRui Paulolarger than or equal to duration). If the P2P module is not idle at
407*f05cddf9SRui Paulothe time the Extended Listen Timing timeout occurs, the Listen State
408*f05cddf9SRui Paulooperation will be skipped.
409*f05cddf9SRui Paulo
410*f05cddf9SRui PauloThe configured values will also be advertised to other P2P Devices. The
411*f05cddf9SRui Pauloreceived values are available in the p2p_peer command output:
412*f05cddf9SRui Paulo
413*f05cddf9SRui Pauloext_listen_period=100 ext_listen_interval=5000
414*f05cddf9SRui Paulo
415*f05cddf9SRui Paulop2p_set <field> <value>
416*f05cddf9SRui Paulo
417*f05cddf9SRui PauloChange dynamic P2P parameters
418*f05cddf9SRui Paulo
419*f05cddf9SRui Paulop2p_set discoverability <0/1>
420*f05cddf9SRui Paulo
421*f05cddf9SRui PauloDisable/enable advertisement of client discoverability. This is
422*f05cddf9SRui Pauloenabled by default and this parameter is mainly used to allow testing
423*f05cddf9SRui Pauloof device discoverability.
424*f05cddf9SRui Paulo
425*f05cddf9SRui Paulop2p_set managed <0/1>
426*f05cddf9SRui Paulo
427*f05cddf9SRui PauloDisable/enable managed P2P Device operations. This is disabled by
428*f05cddf9SRui Paulodefault.
429*f05cddf9SRui Paulo
430*f05cddf9SRui Paulop2p_set listen_channel <1/6/11>
431*f05cddf9SRui Paulo
432*f05cddf9SRui PauloSet P2P Listen channel. This is mainly meant for testing purposes and
433*f05cddf9SRui Paulochanging the Listen channel during normal operations can result in
434*f05cddf9SRui Pauloprotocol failures.
435*f05cddf9SRui Paulo
436*f05cddf9SRui Paulop2p_set ssid_postfix <postfix>
437*f05cddf9SRui Paulo
438*f05cddf9SRui PauloSet postfix string to be added to the automatically generated P2P SSID
439*f05cddf9SRui Paulo(DIRECT-<two random characters>). For example, postfix of "-testing"
440*f05cddf9SRui Paulocould result in the SSID becoming DIRECT-ab-testing.
441*f05cddf9SRui Paulo
442*f05cddf9SRui Pauloset <field> <value>
443*f05cddf9SRui Paulo
444*f05cddf9SRui PauloSet global configuration parameters which may also affect P2P
445*f05cddf9SRui Paulooperations. The format on these parameters is same as is used in
446*f05cddf9SRui Paulowpa_supplicant.conf. Only the parameters listen here should be
447*f05cddf9SRui Paulochanged. Modifying other parameters may result in incorrect behavior
448*f05cddf9SRui Paulosince not all existing users of the parameters are updated.
449*f05cddf9SRui Paulo
450*f05cddf9SRui Pauloset uuid <UUID>
451*f05cddf9SRui Paulo
452*f05cddf9SRui PauloSet WPS UUID (by default, this is generated based on the MAC address).
453*f05cddf9SRui Paulo
454*f05cddf9SRui Pauloset device_name <device name>
455*f05cddf9SRui Paulo
456*f05cddf9SRui PauloSet WPS Device Name (also included in some P2P messages).
457*f05cddf9SRui Paulo
458*f05cddf9SRui Pauloset manufacturer <manufacturer>
459*f05cddf9SRui Paulo
460*f05cddf9SRui PauloSet WPS Manufacturer.
461*f05cddf9SRui Paulo
462*f05cddf9SRui Pauloset model_name <model name>
463*f05cddf9SRui Paulo
464*f05cddf9SRui PauloSet WPS Model Name.
465*f05cddf9SRui Paulo
466*f05cddf9SRui Pauloset model_number <model number>
467*f05cddf9SRui Paulo
468*f05cddf9SRui PauloSet WPS Model Number.
469*f05cddf9SRui Paulo
470*f05cddf9SRui Pauloset serial_number <serial number>
471*f05cddf9SRui Paulo
472*f05cddf9SRui PauloSet WPS Serial Number.
473*f05cddf9SRui Paulo
474*f05cddf9SRui Pauloset device_type <device type>
475*f05cddf9SRui Paulo
476*f05cddf9SRui PauloSet WPS Device Type.
477*f05cddf9SRui Paulo
478*f05cddf9SRui Pauloset os_version <OS version>
479*f05cddf9SRui Paulo
480*f05cddf9SRui PauloSet WPS OS Version.
481*f05cddf9SRui Paulo
482*f05cddf9SRui Pauloset config_methods <config methods>
483*f05cddf9SRui Paulo
484*f05cddf9SRui PauloSet WPS Configuration Methods.
485*f05cddf9SRui Paulo
486*f05cddf9SRui Pauloset sec_device_type <device type>
487*f05cddf9SRui Paulo
488*f05cddf9SRui PauloAdd a new Secondary Device Type.
489*f05cddf9SRui Paulo
490*f05cddf9SRui Pauloset p2p_go_intent <GO intent>
491*f05cddf9SRui Paulo
492*f05cddf9SRui PauloSet the default P2P GO Intent. Note: This value can be overridden in
493*f05cddf9SRui Paulop2p_connect command and as such, there should be no need to change the
494*f05cddf9SRui Paulodefault value here during normal operations.
495*f05cddf9SRui Paulo
496*f05cddf9SRui Pauloset p2p_ssid_postfix <P2P SSID postfix>
497*f05cddf9SRui Paulo
498*f05cddf9SRui PauloSet P2P SSID postfix.
499*f05cddf9SRui Paulo
500*f05cddf9SRui Pauloset persistent_reconnect <0/1>
501*f05cddf9SRui Paulo
502*f05cddf9SRui PauloDisable/enabled persistent reconnect for reinvocation of persistent
503*f05cddf9SRui Paulogroups. If enabled, invitations to reinvoke a persistent group will be
504*f05cddf9SRui Pauloaccepted without separate authorization (e.g., user interaction).
505*f05cddf9SRui Paulo
506*f05cddf9SRui Pauloset country <two character country code>
507*f05cddf9SRui Paulo
508*f05cddf9SRui PauloSet country code (this is included in some P2P messages).
509*f05cddf9SRui Paulo
510*f05cddf9SRui PauloStatus
511*f05cddf9SRui Paulo
512*f05cddf9SRui Paulop2p_peers [discovered]
513*f05cddf9SRui Paulo
514*f05cddf9SRui PauloList P2P Device Addresses of all the P2P peers we know. The optional
515*f05cddf9SRui Paulo"discovered" parameter filters out the peers that we have not fully
516*f05cddf9SRui Paulodiscovered, i.e., which we have only seen in a received Probe Request
517*f05cddf9SRui Pauloframe.
518*f05cddf9SRui Paulo
519*f05cddf9SRui Paulop2p_peer <P2P Device Address>
520*f05cddf9SRui Paulo
521*f05cddf9SRui PauloFetch information about a known P2P peer.
522*f05cddf9SRui Paulo
523*f05cddf9SRui PauloGroup Status
524*f05cddf9SRui Paulo
525*f05cddf9SRui Paulo(These are used on the group interface.)
526*f05cddf9SRui Paulo
527*f05cddf9SRui Paulostatus
528*f05cddf9SRui Paulo
529*f05cddf9SRui PauloShow status information (connection state, role, use encryption
530*f05cddf9SRui Pauloparameters, IP address, etc.).
531*f05cddf9SRui Paulo
532*f05cddf9SRui Paulosta
533*f05cddf9SRui Paulo
534*f05cddf9SRui PauloShow information about an associated station (when acting in AP/GO role).
535*f05cddf9SRui Paulo
536*f05cddf9SRui Pauloall_sta
537*f05cddf9SRui Paulo
538*f05cddf9SRui PauloLists the currently associated stations.
539*f05cddf9SRui Paulo
540*f05cddf9SRui PauloConfiguration data
541*f05cddf9SRui Paulo
542*f05cddf9SRui Paulolist_networks
543*f05cddf9SRui Paulo
544*f05cddf9SRui PauloLists the configured networks, including stored information for
545*f05cddf9SRui Paulopersistent groups. The identifier in this list is used with
546*f05cddf9SRui Paulop2p_group_add and p2p_invite to indicate which persistent group is to
547*f05cddf9SRui Paulobe reinvoked.
548*f05cddf9SRui Paulo
549*f05cddf9SRui Pauloremove_network <network id>
550*f05cddf9SRui Paulo
551*f05cddf9SRui PauloRemove a network entry from configuration.
552*f05cddf9SRui Paulo
553*f05cddf9SRui Paulo
554*f05cddf9SRui Paulowpa_cli action script
555*f05cddf9SRui Paulo---------------------
556*f05cddf9SRui Paulo
557*f05cddf9SRui PauloSee examples/p2p-action.sh
558*f05cddf9SRui Paulo
559*f05cddf9SRui PauloTODO: describe DHCP/DNS setup
560*f05cddf9SRui PauloTODO: cross-connection
561