2 \page dbus %wpa_supplicant D-Bus API
4 This section documents the %wpa_supplicant D-Bus API. Every D-Bus
5 interface implemented by %wpa_supplicant is described here including
6 their methods, signals, and properties with arguments, returned
7 values, and possible errors.
17 \section dbus_main fi.w1.wpa_supplicant1
19 Interface implemented by the main %wpa_supplicant D-Bus object
20 registered in the bus with fi.w1.wpa_supplicant1 name.
22 \subsection dbus_main_methods Methods
26 <h3>CreateInterface ( a{sv} : args ) --> o : interface</h3>
27 <p>Registers a wireless interface in %wpa_supplicant.</p>
32 A dictionary with arguments used to add the interface to %wpa_supplicant. The dictionary may contain the following entries:
34 <tr><th>Key</th><th>Value type</th><th>Description</th><th>Required</th>
35 <tr><td>Ifname</td><td>s</td><td>Name of the network interface to control, e.g., wlan0</td><td>Yes</td>
36 <tr><td>Bridge_ifname</td><td>s</td><td>Name of the bridge interface to control, e.g., br0</td><td>No</td>
37 <tr><td>Driver</td><td>s</td><td>Driver name which the interface uses, e.g., nl80211</td><td>No</td>
43 <dt>o : interface</dt>
44 <dd>A D-Bus path to object representing created interface</dd>
46 <h4>Possible errors</h4>
48 <dt>fi.w1.wpa_supplicant1.InterfaceExists</dt>
49 <dd>%wpa_supplicant already controls this interface.</dd>
50 <dt>fi.w1.wpa_supplicant1.UnknownError</dt>
51 <dd>Creating interface failed for an unknown reason.</dd>
52 <dt>fi.w1.wpa_supplicant1.InvalidArgs</dt>
53 <dd>Invalid entries were found in the passed argument.</dd>
58 <h3>RemoveInterface ( o : interface ) --> nothing</h3>
59 <p>Deregisters a wireless interface from %wpa_supplicant.</p>
62 <dt>o : interface</dt>
63 <dd>A D-Bus path to an object representing an interface to remove returned by CreateInterface</dd>
65 <h4>Possible errors</h4>
67 <dt>fi.w1.wpa_supplicant1.InterfaceUnknown</dt>
68 <dd>Object pointed by the path doesn't exist or doesn't represent an interface.</dd>
69 <dt>fi.w1.wpa_supplicant1.UnknownError</dt>
70 <dd>Removing interface failed for an unknown reason.</dd>
75 <h3>GetInterface ( s : ifname ) --> o : interface</h3>
76 <p>Returns a D-Bus path to an object related to an interface which %wpa_supplicant already controls.</p>
80 <dd>Name of the network interface, e.g., wlan0</dd>
84 <dt>o : interface</dt>
85 <dd>A D-Bus path to an object representing an interface</dd>
87 <h4>Possible errors</h4>
89 <dt>fi.w1.wpa_supplicant1.InterfaceUnknown</dt>
90 <dd>An interface with the passed name in not controlled by %wpa_supplicant.</dd>
91 <dt>fi.w1.wpa_supplicant1.UnknownError</dt>
92 <dd>Getting an interface object path failed for an unknown reason.</dd>
97 \subsection dbus_main_properties Properties
101 <h3>DebugParams - (ibb) - (read/write)</h3>
102 <p>A structure describing debugging properties. The structure elements are (in order): debug level (i), show timestamps (b), show keys (b).</p>
106 <h3>Interfaces - ao - (read)</h3>
107 <p>An array with paths to D-Bus objects representing controlled interfaces each.</p>
111 <h3>EapMethods - as - (read)</h3>
112 <p>An array with supported EAP methods names.</p>
116 \subsection dbus_main_signals Signals
120 <h3>InterfaceAdded ( o : interface, a{sv} : properties )</h3>
121 <p>A new interface was added to %wpa_supplicant.</p>
124 <dt>o : interface</dt>
125 <dd>A D-Bus path to an object representing the added interface</dd>
128 <dt>a{sv} : properties</dt>
129 <dd>A dictionary containing properties of added interface.</dd>
134 <h3>InterfaceRemoved ( o : interface )</h3>
135 <p>An interface was removed from %wpa_supplicant.</p>
138 <dt>o : interface</dt>
139 <dd>A D-Bus path to an object representing the removed interface</dd>
144 <h3>PropertiesChanged ( a{sv} : properties )</h3>
145 <p>Some properties have changed.</p>
148 <dt>a{sv} : properties</dt>
149 <dd>A dictionary with pairs of properties names which have changed and theirs new values. Possible dictionary keys are: "DebugParams"</dd>
155 \section dbus_interface fi.w1.wpa_supplicant1.Interface
157 Interface implemented by objects related to network interface added to
158 %wpa_supplicant, i.e., returned by
159 fi.w1.wpa_supplicant1.CreateInterface.
161 \subsection dbus_interface_methods Methods
165 <h3>Scan ( a{sv} : args ) --> nothing</h3>
166 <p>Triggers a scan.</p>
169 <dt>a{sv} : args</dt>
171 A dictionary with arguments describing scan type:
173 <tr><th>Key</th><th>Value type</th><th>Description</th><th>Required</th>
174 <tr><td>Type</td><td>s</td><td>Type of the scan. Possible values: "active", "passive"</td><td>Yes</td>
175 <tr><td>SSIDs</td><td>aay</td><td>Array of SSIDs to scan for (applies only if scan type is active)</td><td>No</td>
176 <tr><td>IEs</td><td>aay</td><td>Information elements to used in active scan (applies only if scan type is active)</td><td>No</td>
177 <tr><td>Channels</td><td>a(uu)</td><td>Array of frequencies to scan in form of (center, width) in MHz.</td><td>No</td>
181 <h4>Possible errors</h4>
183 <dt>fi.w1.wpa_supplicant1.InvalidArgs</dt>
184 <dd>Invalid entries were found in the passed argument.</dd>
189 <h3>Disconnect ( ) --> nothing</h3>
190 <p>Disassociates the interface from current network.</p>
191 <h4>Possible errors</h4>
193 <dt>fi.w1.wpa_supplicant1.Interface.NotConnected</dt>
194 <dd>Interface is not connected to any network.</dd>
199 <h3>AddNetwork ( a{sv} : args ) --> o : network</h3>
200 <p>Adds a new network to the interface.</p>
203 <dt>a{sv} : args</dt>
204 <dd>A dictionary with network configuration. Dictionary entries are equivalent to entries in the "network" block in %wpa_supplicant configuration file. Entry values should be appropriate type to the entry, e.g., an entry with key "frequency" should have value type int.</dd>
209 <dd>A D-Bus path to an object representing a configured network</dd>
211 <h4>Possible errors</h4>
213 <dt>fi.w1.wpa_supplicant1.InvalidArgs</dt>
214 <dd>Invalid entries were found in the passed argument.</dd>
215 <dt>fi.w1.wpa_supplicant1.UnknownError</dt>
216 <dd>Adding network failed for an unknown reason.</dd>
221 <h3>RemoveNetwork ( o : network ) --> nothing</h3>
222 <p>Removes a configured network from the interface.</p>
226 <dd>A D-Bus path to an object representing a configured network returned by fi.w1.wpa_supplicant1.Interface.AddNetwork</dd>
228 <h4>Possible errors</h4>
230 <dt>fi.w1.wpa_supplicant1.Interface.NetworkUnknown</dt>
231 <dd>A passed path doesn't point to any network object.</dd>
232 <dt>fi.w1.wpa_supplicant1.InvalidArgs</dt>
233 <dd>A passed path doesn't point to any network object.</dd>
234 <dt>fi.w1.wpa_supplicant1.UnknownError</dt>
235 <dd>Removing network failed for an unknown reason.</dd>
240 <h3>SelectNetwork ( o : network ) --> nothing</h3>
241 <p>Attempt association with a configured network.</p>
245 <dd>A D-Bus path to an object representing a configured network returned by fi.w1.wpa_supplicant1.Interface.AddNetwork</dd>
247 <h4>Possible errors</h4>
249 <dt>fi.w1.wpa_supplicant1.Interface.NetworkUnknown</dt>
250 <dd>A passed path doesn't point to any network object.</dd>
251 <dt>fi.w1.wpa_supplicant1.InvalidArgs</dt>
252 <dd>A passed path doesn't point to any network object.</dd>
257 <h3>AddBlob ( s : name, ay : data ) --> nothing</h3>
258 <p>Adds a blob to the interface.</p>
262 <dd>A name of a blob</dd>
266 <h4>Possible errors</h4>
268 <dt>fi.w1.wpa_supplicant1.Interface.BlobExists</dt>
269 <dd>A blob with the specified name already exists.</dd>
274 <h3>RemoveBlob ( s : name ) --> nothing</h3>
275 <p>Removes the blob from the interface.</p>
279 <dd>A name of the blob to remove</dd>
281 <h4>Possible errors</h4>
283 <dt>fi.w1.wpa_supplicant1.Interface.BlobUnknown</dt>
284 <dd>A blob with the specified name doesn't exist.</dd>
289 <h3>GetBlob ( s : name ) --> ay : data</h3>
290 <p>Returns the blob data of a previously added blob.</p>
294 <dd>A name of the blob</dd>
301 <h4>Possible errors</h4>
303 <dt>fi.w1.wpa_supplicant1.Interface.BlobUnknown</dt>
304 <dd>A blob with the specified name doesn't exist.</dd>
309 \subsection dbus_interface_properties Properties
313 <h3>Capabilities - a{sv} - (read)</h3>
314 <p>Capabilities of the interface. Dictionary contains following entries:</p>
316 <tr><th>Key</th><th>Value type</th><th>Description</th>
317 <tr><td>Pairwise</td><td>as</td><td>Possible array elements: "ccmp", "tkip", "none"</td>
318 <tr><td>Group</td><td>as</td><td>Possible array elements: "ccmp", "tkip", "wep104", "wep40"</td>
319 <tr><td>KeyMgmt</td><td>as</td><td>Possible array elements: "wpa-psk", "wpa-eap", "ieee8021x", "wpa-none", "wps", "none"</td>
320 <tr><td>Protocol</td><td>as</td><td>Possible array elements: "rsn", "wpa"</td>
321 <tr><td>AuthAlg</td><td>as</td><td>Possible array elements: "open", "shared", "leap"</td>
322 <tr><td>Scan</td><td>as</td><td>Possible array elements: "active", "passive", "ssid"</td>
323 <tr><td>Modes</td><td>as</td><td>Possible array elements: "infrastructure", "ad-hoc", "ap"</td>
328 <h3>State - s - (read)</h3>
329 <p>A state of the interface. Possible values are: return "disconnected", "inactive", "scanning", "authenticating", "associating", "associated", "4way_handshake", "group_handshake", "completed","unknown".</p>
333 <h3>Scanning - b - (read)</h3>
334 <p>Determines if the interface is already scanning or not</p>
338 <h3>ApScan - u - (read/write)</h3>
339 <p>Identical to ap_scan entry in %wpa_supplicant configuration file. Possible values are 0, 1 or 2.</p>
343 <h3>Ifname - s - (read)</h3>
344 <p>Name of network interface controlled by the interface, e.g., wlan0.</p>
348 <h3>BridgeIfname - s - (read)</h3>
349 <p>Name of bridge network interface controlled by the interface, e.g., br0.</p>
353 <h3>Driver - s - (read)</h3>
354 <p>Name of driver used by the interface, e.g., nl80211.</p>
358 <h3>CurrentBSS - o - (read)</h3>
359 <p>Path to D-Bus object representing BSS which %wpa_supplicant is associated with, or "/" if is not associated at all.</p>
363 <h3>CurrentNetwork - o - (read)</h3>
364 <p>Path to D-Bus object representing configured network which %wpa_supplicant uses at the moment, or "/" if doesn't use any.</p>
368 <h3>Blobs - as - (read)</h3>
369 <p>List of blobs names added to the Interface.</p>
373 <h3>BSSs - ao - (read)</h3>
374 <p>List of D-Bus objects paths representing BSSs known to the interface, i.e., scan results.</p>
378 <h3>Networks - ao - (read)</h3>
379 <p>List of D-Bus objects paths representing configured networks.</p>
383 \subsection dbus_interface_signals Signals
387 <h3>ScanDone ( b : success )</h3>
388 <p>Scanning finished. </p>
392 <dd>Determines if scanning was successful. If so, results are available.</dd>
397 <h3>StateChanged ( s : newState, s : oldState )</h3>
398 <p>Interface state has changed.</p>
401 <dt>s : newState</dt>
402 <dd>A state which the interface goes to</dd>
403 <dt>s : oldState</dt>
404 <dd>A state which the interface goes from</dd>
409 <h3>BSSAdded ( o : BSS, a{sv} : properties )</h3>
410 <p>Interface became aware of a new BSS.</p>
414 <dd>A D-Bus path to an object representing the new BSS.</dd>
417 <dt>a{sv} : properties</dt>
418 <dd>A dictionary containing properties of added BSS.</dd>
423 <h3>BSSRemoved ( o : BSS )</h3>
424 <p>BSS disappeared.</p>
428 <dd>A D-Bus path to an object representing the BSS.</dd>
433 <h3>BlobAdded ( s : blobName )</h3>
434 <p>A new blob has been added to the interface.</p>
437 <dt>s : blobName</dt>
438 <dd>A name of the added blob.</dd>
443 <h3>BlobRemoved ( s : blobName )</h3>
444 <p>A blob has been removed from the interface.</p>
447 <dt>s : blobName</dt>
448 <dd>A name of the removed blob.</dd>
453 <h3>NetworkAdded ( o : network, a{sv} : properties )</h3>
454 <p>A new network has been added to the interface.</p>
458 <dd>A D-Bus path to an object representing the added network.</dd>
461 <dt>a{sv} : properties</dt>
462 <dd>A dictionary containing properties of added network.</dd>
467 <h3>NetworkRemoved ( o : network )</h3>
468 <p>The network has been removed from the interface.</p>
472 <dd>A D-Bus path to an object representing the removed network.</dd>
477 <h3>NetworkSelected ( o : network )</h3>
478 <p>The network has been selected.</p>
482 <dd>A D-Bus path to an object representing the selected network.</dd>
487 <h3>PropertiesChanged ( a{sv} : properties )</h3>
488 <p>Some properties have changed.</p>
491 <dt>a{sv} : properties</dt>
492 <dd>A dictionary with pairs of properties names which have changed and theirs new values. Possible dictionary keys are: "ApScan", "Scanning", "CurrentBSS", "CurrentNetwork"</dd>
498 \section dbus_wps fi.w1.wpa_supplicant1.Interface.WPS
500 Interface implemented by objects related to network interface added to
501 &wpa_supplicant, i.e., returned by fi.w1.wpa_supplicant1.CreateInterface.
503 \subsection dbus_wps_methods Methods
507 <h3>Start ( a{sv} : args ) --> a{sv} : output</h3>
508 <p>Starts WPS configuration.</p>
511 <dt>a{sv} : args</dt>
513 A dictionary with arguments used to start WPS configuration. The dictionary may contain the following entries:
515 <tr><th>Key</th><th>Value type</th><th>Description</th><th>Required</th>
516 <tr><td>Role</td><td>s</td><td>The device's role. Possible values are "enrollee" and "registrar".</td><td>Yes</td>
517 <tr><td>Type</td><td>s</td><td>WPS authentication type. Applies only for enrollee role. Possible values are "pin" and "pbc".</td><td>Yes, for enrollee role; otherwise no</td>
518 <tr><td>Pin</td><td>s</td><td>WPS Pin.</td><td>Yes, for registrar role; otherwise optional</td>
519 <tr><td>Bssid</td><td>ay</td><td></td><td>No</td>
525 <dt>a{sv} : output</dt>
528 <tr><th>Key</th><th>Value type</th><th>Description</th><th>Required</th>
529 <tr><td>Pin</td><td>s</td><td>Newly generated PIN, if not specified for enrollee role and pin authentication type.</td><td>No</td>
533 <h4>Possible errors</h4>
535 <dt>fi.w1.wpa_supplicant1.UnknownError</dt>
536 <dd>Starting WPS configuration failed for an unknown reason.</dd>
537 <dt>fi.w1.wpa_supplicant1.InvalidArgs</dt>
538 <dd>Invalid entries were found in the passed argument.</dd>
543 \subsection dbus_wps_properties Properties
547 <h3>ProcessCredentials - b - (read/write)</h3>
548 <p>Determines if the interface will process the credentials (credentials_processed configuration file parameter).</p>
552 \subsection dbus_wps_signals Signals
556 <h3>Event ( s : name, a{sv} : args )</h3>
557 <p>WPS event occurred.</p>
561 <dd>Event type. Possible values are: "success, "fail" and "m2d"</dd>
562 <dt>a{sv} : args</dt>
564 Event arguments. Empty for success event, one entry ( "msg" : i ) for fail event and following entries for m2d event:
566 <tr><th>config_methods</th><th>Value type</th>
567 <tr><td>manufacturer</td><td>q</td>
568 <tr><td>model_name</td><td>ay</td>
569 <tr><td>model_number</td><td>ay</td>
570 <tr><td>serial_number</td><td>ay</td>
571 <tr><td>dev_name</td><td>ay</td>
572 <tr><td>primary_dev_type</td><td>ay</td>
573 <tr><td>config_error</td><td>q</td>
574 <tr><td>dev_password_id</td><td>q</td>
581 <h3>Credentials ( a{sv} : credentials )</h3>
582 <p>WPS credentials. Dictionary contains:</p>
584 <tr><th>Key</th><th>Value type</th><th>Description</th>
585 <tr><td>BSSID</td><td>ay</td><td></td>
586 <tr><td>SSID</td><td>s</td><td></td>
587 <tr><td>AuthType</td><td>as</td><td>Possible array elements: "open", "shared", "wpa-psk", "wpa-eap", "wpa2-eap", "wpa2-psk"</td>
588 <tr><td>EncrType</td><td>as</td><td>Possible array elements: "none", "wep", "tkip", "aes"</td>
589 <tr><td>Key</td><td>ay</td><td>Key data</td>
590 <tr><td>KeyIndex</td><td>u</td><td>Key index</td>
595 <h3>PropertiesChanged ( a{sv} : properties )</h3>
596 <p>Some properties have changed.</p>
599 <dt>a{sv} : properties</dt>
600 <dd>A dictionary with pairs of properties names which have changed and theirs new values. Possible dictionary keys are: "ProcessCredentials"</dd>
606 \section dbus_bss fi.w1.wpa_supplicant1.Interface.BSS
608 Interface implemented by objects representing a scanned BSSs, i.e.,
611 \subsection dbus_bss_properties Properties
615 <h3>BSSID - ay - (read)</h3>
616 <p>BSSID of the BSS.</p>
619 <h3>SSID - ay - (read)</h3>
620 <p>SSID of the BSS.</p>
623 <h3>WPAIE - ay - (read)</h3>
624 <p>WPA information element of the BSS. The second byte contain number of bytes following it.</p>
627 <h3>RSNIE - ay - (read)</h3>
628 <p>RSN information element of the BSS. The second byte contain number of bytes following it.</p>
631 <h3>WPSIE - ay - (read)</h3>
632 <p>WPS information element of the BSS. The second byte contain number of bytes following it.</p>
635 <h3>Privacy - b - (read)</h3>
636 <p>Indicates if BSS supports privacy.</p>
639 <h3>Mode - s - (read)</h3>
640 <p>Describes mode of the BSS. Possible values are: "ad-hoc" and "infrastructure".</p>
643 <h3>Frequency - q - (read)</h3>
644 <p>Frequency of the BSS in MHz.</p>
647 <h3>MaxRate - q - (read)</h3>
648 <p>Maximal data rate of the BSS in bits per second.</p>
651 <h3>Signal - n - (read)</h3>
652 <p>Signal strength of the BSS.</p>
657 \section dbus_network fi.w1.wpa_supplicant1.Interface.Network
659 Interface implemented by objects representing configured networks,
660 i.e., returned by fi.w1.wpa_supplicant1.Interface.AddNetwork.
662 \subsection dbus_network_properties Properties
666 <h3>Enabled - b - (read/write)</h3>
667 <p>Determines if the configured network is enabled or not.</p>
671 <h3>Properties - a{sv} - (read)</h3>
672 <p>Properties of the configured network. Dictionary contains entries from "network" block of %wpa_supplicant configuration file. All values are string type, e.g., frequency is "2437", not 2437.
676 \subsection dbus_network_signals Signals
680 <h3>PropertiesChanged ( a{sv} : properties )</h3>
681 <p>Some properties have changed.</p>
684 <dt>a{sv} : properties</dt>
685 <dd>A dictionary with pairs of properties names which have changed and theirs new values. Possible dictionary keys are: "Enabled"</dd>