5 Interface net.connman.Agent
6 Object path freely definable
10 This method gets called when the service daemon
11 unregisters the agent. An agent can use it to do
12 cleanup tasks. There is no need to unregister the
13 agent, because when this method gets called it has
14 already been unregistered.
16 void ReportError(object service, string error)
18 This method gets called when an error has to be
21 A special return value can be used to trigger a
22 retry of the failed transaction.
24 Possible Errors: net.connman.Agent.Error.Retry
26 dict RequestInput(object service, dict fields)
28 This method gets called when trying to connect to
29 a service and some extra input is required. For
30 example a passphrase or the name of a hidden network.
32 The return value should be a dictionary where the
33 keys are the field names and the values are the
34 actual fields. Alternatively an error indicating that
35 the request got canceled can be returned.
37 Most common return field names are "Name" and of
40 The dictionary arguments contains field names with
41 their input parameters.
43 Possible Errors: net.connman.Agent.Error.Canceled
47 This method gets called to indicate that the agent
48 request failed before a reply was returned.
52 The name of a network. This field will be requested
53 when trying to connect to a hidden network.
57 This field is an alternative to "Name" for WiFi
58 networks and can be used to return the exact binary
59 representation of a network name.
61 Normally returning the "Name" field is the better
66 Identity (username) for EAP authentication methods.
70 The passphrase for authentication. For example a WEP
71 key, a PSK passphrase or a passphrase for EAP
72 authentication methods.
76 This field requests the use of WPS to get associated.
77 This is an alternate choice against Passphrase when
78 requested service supports WPS. The reply can contain
79 either empty pin, if user wants to use push-button
80 method, or a pin code if user wants to use the pin
85 Contains the type of a field. For example "psk", "wep"
86 "passphrase", "response", "ssid", "wpspin" or plain
91 Contains the requirement option. Valid values are
92 "mandatory", "optional" or "alternate".
94 The "alternate" value specifies that this field can be
95 returned as an alternative to another one. An example
96 would be the network name or SSID.
98 All "mandatory" fields must be returned, while the
99 "optional" can be returned if available.
101 array{string} Alternates
103 Contains the list of alternate field names this
104 field can be represented by.
106 Examples Requesting a passphrase for WPA2 network
108 RequestInput("/service1",
109 { "Passphrase" : { "Type" : "psk",
110 "Requirement" : "mandatory"
113 ==> { "Passphrase" : "secret123" }
115 Requesting name for hidden network
117 RequestInput("/service2",
118 { "Name" : { "Type" : "string",
119 "Requirement" : "mandatory",
120 "Alternates" : [ "SSID" ]
122 "SSID" : { "Type" : "ssid",
123 "Requirement" : "alternate"
126 ==> { "Name" : "My hidden network" }
128 Requesting a passphrase for a WPA2 network with WPS alternative:
130 RequestInput("/service3",
131 { "Passphrase" : { "Type" : "psk",
132 "Requirement" : "mandatory",
133 "Alternates" : [ "WPS" ]
135 "WPS" : { "Type" : "wpspin",
136 "Requirement" : "alternate"
140 ==> { "WPS" : "123456" }
142 Requesting passphrase for a WPA-Enterprise network:
144 RequestInput("/service4",
145 { "Identity" : { "Type" : "string",
146 "Requirement" : "mandatory"
148 "Passphrase" : { "Type" : "passphrase",
149 "Requirement" : "mandatory"
153 ==> { "Identity" : "alice", "Passphrase": "secret123" }
155 Requesting challenge response for a WPA-Enterprise network:
157 RequestInput("/service4",
158 { "Identity" : { "Type" : "string",
159 "Requirement" : "mandatory"
161 "Passphrase" : { "Type" : "response",
162 "Requirement" : "mandatory"
166 ==> { "Identity" : "bob", "Passphrase": "secret123" }