===============
Service unique name
-Interface org.moblin.connman.Agent
+Interface net.connman.Agent
Object path freely definable
Methods void Release()
A special return value can be used to trigger a
retry of the failed transaction.
- Possible Errors: [service].Error.Retry
+ Possible Errors: net.connman.Agent.Error.Retry
- string RequestPassphrase(object service)
+ dict RequestInput(object service, dict fields)
This method gets called when trying to connect to
- a service and a passphrase is missing.
+ a service and some extra input is required. For
+ example a passphrase or the name of a hidden network.
- The return value should be the passphrase string or
- an error indicating that the request got cannceled.
+ The return value should be a dictionary where the
+ keys are the field names and the values are the
+ actual fields. Alternatively an error indicating that
+ the request got canceled can be returned.
- Possible Errors: [service].Error.Canceled
+ Most common return field names are "Name" and of
+ course "Passphrase".
+
+ The dictionary arguments contains field names with
+ their input parameters.
+
+ Possible Errors: net.connman.Agent.Error.Canceled
void Cancel()
This method gets called to indicate that the agent
request failed before a reply was returned.
+
+Fields string Name
+
+ The name of a network. This field will be requested
+ when trying to connect to a hidden network.
+
+ array{byte} SSID
+
+ This field is an alternative to "Name" for WiFi
+ networks and can be used to return the exact binary
+ representation of a network name.
+
+ Normally returning the "Name" field is the better
+ option here.
+
+ string Identity
+
+ Identity (username) for EAP authentication methods.
+
+ string Passphrase
+
+ The passphrase for authentication. For example a WEP
+ key, a PSK passphrase or a passphrase for EAP
+ authentication methods.
+
+ string WPS
+
+ This field requests the use of WPS to get associated.
+ This is an alternate choice against Passphrase when
+ requested service supports WPS. The reply can contain
+ either empty pin, if user wants to use push-button
+ method, or a pin code if user wants to use the pin
+ method.
+
+ string Username
+
+ Username for WISPr authentication. This field will be
+ requested when connecting to a WISPr-enabled hotspot.
+
+ string Password
+
+ Password for WISPr authentication. This field will be
+ requested when connecting to a WISPr-enabled hotspot.
+
+Arguments string Type
+
+ Contains the type of a field. For example "psk", "wep"
+ "passphrase", "response", "ssid", "wpspin" or plain
+ "string".
+
+ string Requirement
+
+ Contains the requirement option. Valid values are
+ "mandatory", "optional" or "alternate".
+
+ The "alternate" value specifies that this field can be
+ returned as an alternative to another one. An example
+ would be the network name or SSID.
+
+ All "mandatory" fields must be returned, while the
+ "optional" can be returned if available.
+
+ array{string} Alternates
+
+ Contains the list of alternate field names this
+ field can be represented by.
+
+Examples Requesting a passphrase for WPA2 network
+
+ RequestInput("/service1",
+ { "Passphrase" : { "Type" : "psk",
+ "Requirement" : "mandatory"
+ }
+ }
+ ==> { "Passphrase" : "secret123" }
+
+ Requesting name for hidden network
+
+ RequestInput("/service2",
+ { "Name" : { "Type" : "string",
+ "Requirement" : "mandatory",
+ "Alternates" : [ "SSID" ]
+ },
+ "SSID" : { "Type" : "ssid",
+ "Requirement" : "alternate"
+ }
+ }
+ ==> { "Name" : "My hidden network" }
+
+ Requesting a passphrase for a WPA2 network with WPS alternative:
+
+ RequestInput("/service3",
+ { "Passphrase" : { "Type" : "psk",
+ "Requirement" : "mandatory",
+ "Alternates" : [ "WPS" ]
+ },
+ "WPS" : { "Type" : "wpspin",
+ "Requirement" : "alternate"
+ }
+ }
+
+ ==> { "WPS" : "123456" }
+
+ Requesting passphrase for a WPA-Enterprise network:
+
+ RequestInput("/service4",
+ { "Identity" : { "Type" : "string",
+ "Requirement" : "mandatory"
+ },
+ "Passphrase" : { "Type" : "passphrase",
+ "Requirement" : "mandatory"
+ }
+ }
+
+ ==> { "Identity" : "alice", "Passphrase": "secret123" }
+
+ Requesting challenge response for a WPA-Enterprise network:
+
+ RequestInput("/service4",
+ { "Identity" : { "Type" : "string",
+ "Requirement" : "mandatory"
+ },
+ "Passphrase" : { "Type" : "response",
+ "Requirement" : "mandatory"
+ }
+ }
+
+ ==> { "Identity" : "bob", "Passphrase": "secret123" }
+
+ Requesting username and password for a WISPr-enabled hotspot:
+
+ RequestInput("/service5",
+ { "Username" : { "Type" : "string",
+ "Requirement" : "mandatory"
+ },
+ "Password" : { "Type" : "passphrase",
+ "Requirement" : "mandatory"
+ }
+ }
+
+ ==> { "Username" : "foo", "Password": "secret" }