Note
This API has been available since API level 11.
This API has been available since API level 11.
Manages Wi-Fi connections on a webOS device. It provides an interface to find available Wi-Fi networks and handle connecting and disconnecting the device from those networks.
This service provides the ability to manage various aspects of Wi-Fi connectivity like scanning the Wi-Fi networks, connecting to a network (open/secured/hidden) and managing Wi-Fi profiles.
About webos-connman-adapter daemon:
The webos-connman-adapter is a daemon which acts as the interface between connman (a daemon for managing internet connections) and rest of the webOS world. The webos-connman-adapter communicates to connman via dbus but provides the LS2 interface to all the webOS apps and services to enable them to get all the network related information and manage the connections.
Additional remarks:
Most of the methods under this API require that the connman be running and be able to communicate with the webos-connman-adapter else these methods will return an error.
API level 27
Cancels an ongoing connection attempt. Once the connection is canceled, the state is switched back to idle and the credentials are not saved. If no connection attempt is in progress then calling this method will do nothing.
None
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates status of method execution. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
4, 5, 106, 107 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/cancel '{}'
Response:
{
"returnValue": true
}
API level 27
Cancels an ongoing WPS connection attempt.
None
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates status of method execution. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
4, 5, 110 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/cancelwps '{}'
Response:
{
"returnValue": true
}
API level 11
Allows users to change the properties of already stored Wi-Fi profiles. For non-enterprise networks, only the passphrase can be changed for now. In the future when the support to enterprise networks will be added, this API will be extended to change the other properties as well.
Name | Required | Type | Description |
---|---|---|---|
profileId | Required | Number | ID of the profile that needs to be changed. |
passKey | Required | String | The new passkey to be used for the profile. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
1, 4, 5, 105 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/changeNetwork '{"profileId": 777, "passKey": "4321" }'
Response:
{
"returnValue":true
}
API level 11
Connects to a given SSID, which can be an open network requiring no passphrase (i.e no security field in its argument), hidden network(requiring wasCreatedWithJoinOther field set to true in its argument), secure networks (authenticating with the specified passphrase), or enterprise networks(currently supported EAP methods are: PEAP, TLS and TTLS).
Upon successful connection, the Wi-Fi profile is saved on the system along with its SSID and security details. On the other hand, if the connection is unsuccessful but the parameter storeProfile is set to true then the Wi-Fi profile is still saved on the system along with the connman .config file, which enables connman to connect to this network once it is available. To connect to an already known network i.e a saved profile, the profileId parameter should be set.
Name | Required | Type | Description |
---|---|---|---|
ssid | Optional | String | SSID of the desired network. Required for all connections except when using a known profile (profileId parameter is set). |
wasCreatedWithJoinOther | Optional | Boolean | Indicates whether to connect to a hidden network. Possible values are:
Default value: false |
storeProfile | Optional | Boolean | Indicates whether to store a profile for the network when it is not available (i.e out of range). Possible values are:
Default value: true |
security | Optional | Object: security | Set to connect to a secured network. |
profileId | Optional | number | ID of the desired profile, which can be obtained from the getprofilelist call. Required to connect with a known profile. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
1, 4, 5 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
7 | WiFi switched off | Error when Wi-Fi interface is down. |
10 | The supplied password is incorrect | An invalid key/passphrase was provided. |
11 | Authentication with access point failed | The authentication with the access point failed. |
12 | Login failed | The login failed. |
13 | Could not establish a connection to access point | The association attempt with the selected access point failed. |
14 | Could not retrieve a valid IP address by using DHCP | The DHCP process failed to gather a valid IP address from the access point. |
15 | PIN is missing | There was no pin provided for the WPS pin connection mode. |
16 | Out of range | The selected access point is out of range and no association could be made. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/connect '{
"ssid":"XXX",
"security":{
"securityType":"psk",
"simpleSecurity":{
"passKey":"1234"
}
}
}'
Response:
{
"returnValue":true
}
API level 27
Generates an 8 digit random PIN required for the WPS PIN connection method.
None
Name | Required | Type | Description |
---|---|---|---|
wpspin | Required | String | An 8 digit random WPS pin. |
returnValue | Required | Boolean | Indicates status of method execution. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
1, 4, 5, 109 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/createwpspin '{}'
Response:
{
"returnValue":true,
"wpspin":"17828642"
}
API level 11
Deletes the profile with the given profile ID.
Name | Required | Type | Description |
---|---|---|---|
profileId | Required | String | ID of the profile to be deleted. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
4, 5, 105 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/deleteprofile '{"profileId": 777}'
Response:
{
"returnValue":true
}
API level 11
Lists all the available Wi-Fi access points found in the area (from a previous Wi-Fi scan) and lists their details like SSID Name, available Security Types, Signal Strength and Connection Status. Callers can subscribe to this method to be notified of any changes.
As long as there are subscribers to this method, periodic scans will be triggered.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Subscribe for notifications of change in the list of found networks. Possible values are:
|
interval | Optional | Number | Interval in milliseconds which is used to trigger a scan for new networks. Only the first subscriber is allowed to specify an interval. If any other subscriber provides an interval and error is returned. The default interval is 15000 milliseconds (15 seconds). |
Name | Required | Type | Description |
---|---|---|---|
foundNetworks | Required | Object: networkInfo | List of found networks. |
subscribed | Required | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
foundNetworks | Required | Object: networkInfo | List of found networks. |
subscribed | Required | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
1, 4, 5, 7 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
108 | Error in scanning network | Error occurred when trying to scan Wi-Fi interface for networks around. |
161 | Not allowed to specify a scan interval | The client isn't allowed to specify a scan interval. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/findnetworks '{"interval": 15000}'
Response:
{
"foundNetworks":[
{
"networkInfo":{
"available":true,
"signalLevel":70,
"signalBars":3,
"displayName":"XXX",
"supported":true,
"ssid":"xxx",
"availableSecurityTypes":[
"psk",
"wps"
]
}
},
{
"networkInfo":{
"available":true,
"signalLevel":49,
"signalBars":1,
"displayName":"XXX2",
"supported":true,
"ssid":"xxx",
"availableSecurityTypes":[
"psk",
"wps"
]
}
}
],
"subscribed":false,
"returnValue":true
}
API level 11
Gets the current country code of the Wi-Fi adapter.
Format of the country code follows the alpha-2 code of ISO-3166-1.
None
Name | Required | Type | Description |
---|---|---|---|
countryCode | Required | String | Current country code of the Wi-Fi adapter. For possible values, see List of ISO 3166 country codes. |
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/getCountryCode '{}'
Response:
{
"returnValue":true,
"countryCode":"US"
}
API level 11
Returns a list of available, configured but not available (out of range) networks without triggering an active scan. The users can subscribe to this method to be notified when there is a change in the list of networks found.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Subscribe for notifications of change in the list of found networks. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
foundNetworks | Required | Object array: networkInfo | List of networks found. |
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
subscribed | Required | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
foundNetworks | Optional | Object: networkInfo | List of available and not available networks. |
subscribed | Required | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
1, 4, 5, 7 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/getNetworks '{}'
Response:
{
"foundNetworks":[
{
"networkInfo":{
"available":true,
"signalLevel":70,
"signalBars":3,
"displayName":"xxx",
"supported":true,
"ssid":"xxx",
"availableSecurityTypes":[
"psk",
"wps"
]
}
},
{
"networkInfo":{
"available":true,
"signalLevel":49,
"signalBars":1,
"displayName":"xxx",
"supported":true,
"ssid":"xxx",
"availableSecurityTypes":[
"psk",
"wps"
]
}
}
],
"subscribed":false,
"returnValue":true
}
API level 11
Lists the profile with the given profile ID on the system.
Name | Required | Type | Description |
---|---|---|---|
profileId | Required | String | ID of the profile to be listed. |
Name | Required | Type | Description |
---|---|---|---|
wifiProfile | Required | Object: wifiProfile | Profile corresponding to the given ID. |
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
1, 4, 5, 105 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/getprofile '{"profileId": 777}'
Response:
{
"returnValue":true,
"wifiProfile":{
"profileId":777,
"ssid":"XXX",
"security":{
"securityType":[
"psk",
"wps"
]
}
}
}
API level 11
Lists all the stored Wi-Fi profiles on the system.
None
Name | Required | Type | Description |
---|---|---|---|
profileList | Required | Object: wifiProfile | List of stored profiles. |
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
1, 4, 5, 105 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/getprofilelist '{}'
Response:
{
"profileList":[
{
"wifiProfile":{
"profileId":777,
"ssid":"xxx",
"security":{
"securityType":[
"psk",
"wps"
]
}
}
}
],
"returnValue":true
}
API level 11
Returns the following:
Callers can subscribe to this method to be notified of any changes in the Wi-Fi connection status. In case there is no subscription, then it will just return the current status once.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Subscribe for notifications when Wi-Fi connection status changes. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
status | Required | String | Indicates the status of the Wi-Fi. Possible values are:
|
networkInfo | Optional | Object: networkInfo | Provides information on the current Wi-Fi network. Applicable only if the Wi-Fi is connected. |
subscribed | Required | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | String | Always true in case of subscription response. |
status | Required | String | Indicates the status of the Wi-Fi. Possible values are:
|
networkInfo | Optional | Object: networkInfo | Provides information on the current Wi-Fi network. Applicable only if the Wi-Fi is connected. |
subscribed | Required | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
1, 4, 5 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/getstatus {}
Response:
{
"subscribed":false,
"status":"serviceEnabled",
"returnValue":true
}
API level 13
Adds a Wi-Fi Direct service.
Name | Required | Type | Description |
---|---|---|---|
type | Required | String | Service type.Valid service types are upnp or bonjour. |
description | Optional | String | Description. Required for upnp service type. |
query | Optional | String | Bonjour query. Required for bonjour service type. |
response | Optional | String | Bonjour response. Required for bonjour service type. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
131 | Error in addservice | Error in the actual call for adding a service. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/addservice '{"type": "upnp", "description": "printer" }'
Response:
{
"returnValue": true
}
API level 13
Cancels any ongoing Wi-Fi direct connection attempts. If there is no ongoing connection attempt then this method does nothing.
None
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates status of method execution. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
17 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
133 | Error in cancelling P2P connection | Error in cancelling the current ongoing Wi-Fi direct connection. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/cancel '{}'
Response:
{
"returnValue": true
}
API level 13
Connects to a given Wi-Fi direct peer.
Name | Required | Type | Description |
---|---|---|---|
peerAddress | Required | String | Device address of the peer to connect. |
wpsInfo | Required | Object: wpsInfo | WPS information for peer connection. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
111 | Peer not found | The peer we are trying to connect to is not present in the list of scanned peers. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
117 | Peer still in association state | We might have tried to connect to this peer in the past, and that's why its still in association state. We should wait for some more time before trying to connect again. |
144 | Failed to connect | Error connecting to peer. This issues occurs when peer is already connected or wrong wpsPin, and other such reasons. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/connect '{"peerAddress": "02:fc:ef:a0:d0:4a","wpsInfo":{"wps":true}}'
Response:
{
"returnValue": true
}
API level 13
Creates an autonomous Wi-Fi direct group.
Name | Required | Type | Description |
---|---|---|---|
ssid | Required | String | SSID of group to create. |
passPhrase | Required | String | Passphrase for connecting to this group. A valid passphrase should have 8 to 63 characters. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | Some error in creating the new group. |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
177 | Passphrase doesn't match the requirements | Length of Passphrase is shorter than 8 or longer than 64 valid character |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/creategroup '{"ssid": "group1", "passPhrase": "12345678" }'
Response:
{
"returnValue": true
}
API level 13
Deletes a persistent profile for a specific MAC address or all profiles and also disconnect the peer(s) if connected.
Name | Required | Type | Description |
---|---|---|---|
deviceAddress | Required | String | Device address or 'all' to delete all existing profiles. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
9 | Could not validate json message against schema | Invalid value of parameter |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
119 | Error in disconnecting group | In case all profiles need to be deleted, we need to disconnect the whole group. This error indicates an error in disconnecting the group. |
134 | Error in deleting profile | Error in deleting the single profile for the deviceAddress specified in this method call. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/deleteprofile '{"deviceAddress": "all" }'
Response:
{
"returnValue": true
}
API level 13
Deletes a Wi-Fi Direct service.
Name | Required | Type | Description |
---|---|---|---|
type | Required | String | Service type. Valid service types are upnp or bonjour. |
description | Optional | String | Description. Required for upnp service type. |
query | Optional | String | Bonjour query. Required for bonjour service type. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
132 | Error in deleteservice | Error in the actual call for deleting the service. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/deleteservice '{"type": "upnp", "description": "printer" }'
Response:
{
"returnValue": true
}
API level 13
Disconnects the given Wi-Fi direct peer.
Name | Required | Type | Description |
---|---|---|---|
peerAddress | Required | String | Device address of the peer to disconnect. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. |
111 | Peer not found | The peer we are trying to disconnect is not present in the list of scanned peers. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
118 | Not connected | We are not connected to the peer we are trying to disconnect. |
119 | Error in disconnecting group | Error in disconnecting the group the connected peers are part of. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/disconnect '{"peerAddress": "02:fc:ef:a0:d0:4a"}'
Response:
{
"returnValue": true
}
API level 13
Disconnects a P2P group.
Name | Required | Type | Description |
---|---|---|---|
ssid | Required | String | Name of the group to disconnect. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | Error in disconnecting the group. |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
121 | Group not found | The group with the given ssid was not found. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/disconnectgroup '{"ssid": "group1"}'
Response:
{
"returnValue": true
}
API level 13
Finds all the Wi-Fi Direct services or a specific service based on a service type. Peer-to-peer must be enabled for this method to work. Once this method is executed the response will be sent to the subscribers of the getpeers method.
Name | Required | Type | Description |
---|---|---|---|
type | Required | String | Service type. Valid service types are upnp or bonjour. |
address | Optional | String | A peer to search. If omitted then search for all peers. |
version | Optional | number | Version number. Required for upnp service type. |
description | Optional | String | Description. Required for upnp service type. |
query | Optional | String | Bonjour query. Required for bonjour service type. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
130 | Error in findservice | Error in the actual call for finding services. |
Example : Find upnp service
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/findservice '{"type": "upnp", "description": "", "version": 10 }'
Response:
{
"returnValue": true
}
Example : Find bonjour service
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/findservice '{"type": "bonjour", "query": "" }'
Response:
{
"returnValue": true
}
API level 13
Gets the device name used for Wi-Fi direct communication, which appears as the peer name for this device on the other neighboring Wi-Fi direct devices.
None
Name | Required | Type | Description |
---|---|---|---|
deviceName | Required | String | The P2P device name. |
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details.
|
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
122 | Device name not set | There is no name set for this peer, should call the setdevicename method to set the name. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/getdevicename '{}'
Response:
{
"returnValue": true,
"deviceName": "[LG] webOS TV WEBOS1"
}
API level 13
Gets the list of peers for an existing Wi-Fi direct group.
Name | Required | Type | Description |
---|---|---|---|
ssid | Required | String | Name of the group. |
Name | Required | Type | Description |
---|---|---|---|
peers | Optional | Object array: WifiPeers | An array of Wi-Fi Peer Info objects. If there are no peers found then this array will be empty. |
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | An internal error occurred when parsing the JSON object being prepared as a response (extremely unlikely). |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
121 | Group not found | Group with the given ssid was not found. |
Example : One peer is found
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/getgrouppeers '{"ssid": "DIRECT-vG-[LG] webOS TV WEBOS1"}'
Response:
{
"peers":[
{
"peerInfo":{
"connected":true,
"configMethod":128,
"deviceAddress":"02:fc:ef:a0:d0:4a",
"peerIp":"192.168.16.2",
"deviceName":"Test Test's G3",
"groupOwner":false,
"wfdInfo":{
"wfdSessionAvail":true,
"wfdCpSupport":true,
"wfdDeviceType":"source",
"wfdRtspPort":8554
},
"signalLevel":76
}
}
],
"returnValue":true
}
Example : No peers are found
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/getgrouppeers '{"ssid": "DIRECT-vG-[LG] webOS TV WEBOS1"}'
Response:
{
"peers":[],
"returnValue":true
}
API level 13
Gets information about all Wi-Fi Direct groups. Callers can subscribe to this method to be notified of any changes in the list of groups.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | To be notified if a group is added, set subscribe to true. To be notified if a group is deleted, set subscribe to false. The default value of subscribe is false. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
groups | Optional | Object array: WifiGroups | Array of objects containing information on Wi-Fi Direct groups. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
subscribed | Optional | Boolean | To be notified if a group is added, set subscribe to true. To be notified if a group is deleted, set subscribe to false. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Always true. |
groups | Required | Object array: WifiGroups | Array of objects containing information on Wi-Fi Direct groups. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | An internal error occurred when parsing the JSON object being prepared as a response (extremely unlikely). |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/getgroups '{}'
Response:
{
"groups": [
{
"groupInfo": {
"frequency": 5180,
"owner": true,
"persistent": true,
"ssid": "DIRECT-test-group",
"tethering": false
}
}
],
"returnValue": true,
"subscribed": false
}
API level 13
Subscribe the caller for notifications of the incoming Wi-Fi direct connection requests.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Required | Boolean | Subscribe to be notified about any incoming Wi-Fi direct connections. Possible values are:
Default value: false Note: Setting subscribe to false will be a no-op , since nothing will be done by this method then. |
Name | Required | Type | Description |
---|---|---|---|
subscribed | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details. |
deviceType | Optional | String | Type of the remote device that initiates incoming p2p connection. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
Note: Always true in case of subscription response. |
deviceAddress | Required | String | Peer address. |
signalName | Required | String | Signal name. |
wpsType | Required | String | Wi-Fi Protected setup type. Possible values are:
|
wpsPin | Optional | String | The PIN for Wi-Fi protected setup if the wpsType argument is display. |
groupOwner | Optional | String | Indicates if the local endpoint is the owner of the group. |
deviceName | Required | String | Name of the remote device that initiates incoming p2p connection. |
deviceType | Required | String | Type of the remote device that initiates incoming p2p connection. |
Error Code | Error Text | Error Description |
---|---|---|
129 | Subscription is mandatory | Error if the subscribe parameter is set to false. |
Example code
# luna-send -i -f luna://com.webos.service.wifi/p2p/getp2prequests '{"subscribe":true}'
Response:
{
"subscribed": true,
"returnValue": true
}
Subscription returns:
{
"wpsType": "pbc",
"signalName": "P2PGONegRequested",
"subscribed": true,
"deviceAddress": "be:f5:ac:e0:ec:31",
"returnValue": true,
"deviceName": "G2b",
"deviceType": "phone"
}
API level 13
Gets information about the Wi-Fi Direct peers. Callers can subscribe to this method to be notified of changes in the list of neighboring peers.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Subscribe and get notified of the changes in the list of peers found. Possible values are:
Default value: false |
scan | Optional | Boolean | Indicates if a new scan is to be triggered. Possible values are:
Default value: true |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
subscribed | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
peers | Optional | Object array: WifiPeers | Array of objects containing information about the available peers. |
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
Note: The returnValue is always true. |
peers | Required | Object array: WifiPeers | Array of objects containing information on Wi-Fi Direct peers. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | An internal error occurred when parsing the JSON object being prepared as a response (extremely unlikely). |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
Example code
Example response for a successful call:
# luna-send -i -f luna://com.webos.service.wifi/p2p/getpeers '{"subscribe":true}'
Returns:
{
"subscribed": true,
"peers": [
{
"peerInfo": {
"connected": true,
"configMethod": 4488,
"deviceAddress": "02:90:4c:a7:86:cf",
"peerIp": "192.168.49.10",
"deviceName": "870s",
"groupOwner": false,
"deviceType": "phone",
"signalLevel": 100
}
}
],
"returnValue": true
}
API level 13
Gets the current state of Wi-Fi direct connection on this device.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Possible values are:
Default value: false |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
P2P | Required | String | If P2P is enabled then this value is enabled, otherwise it is disabled. |
listenState | Required | String | If listening for incoming connections is enabled then this value is enabled , otherwise disabled. |
persistentMode | Required | String | If persistent state is enabled then this value enabled" , "disabled" otherwise. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
subscribed | Required | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | An internal error occurred when parsing the JSON object being prepared as a response (extremely unlikely). |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to talk to the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/getstate '{}'
Response:
{
"P2P": "enabled",
"listenState": "disabled",
"returnValue": true,
"persistentMode": "disabled",
"subscribed": false
}
API level 13
Gets the Wi-Fi display parameters.
None
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
enabled | Required | Boolean | true if Wi-Fi Display feature is enabled, false otherwise. |
wfdDeviceType | Optional | String | Device type. One of the following: source, primary-sink, secondary-sink, or dual-role. |
wfdSessionAvail | Optional | Boolean | true if Wi-Fi Direct Session is enabled, false otherwise. |
wfdRtspPort | Optional | number | Session management control port. |
wfdCpSupport | Optional | Boolean | true if Content Protection using HDCP System 2.0/2.1 enabled, false otherwise. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | An internal error occurred when parsing the JSON object being prepared as a response (extremely unlikely). |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/getwifidisplayinfo '{}'
Response:
{
"wfdSessionAvail": true,
"wfdDeviceType": "primary-sink",
"wfdCpSupport": true,
"returnValue": true,
"wfdRtspPort": 7236,
"enabled": true
}
API level 13
Invites a Wi-Fi direct peer to the group to which this device belongs.
Name | Required | Type | Description |
---|---|---|---|
peerAddress | Required | String | Device address of the peer to invite. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | Some unknown error in inviting the remote peer. |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
111 | Peer not found | The peer we are trying to connect to is not present in the list of scanned peers. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
120 | No active group found | We are not part of any group, so cannot invite another peer. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/invite '{"peerAddress": "5a:a2:b5:fa:18:b7" }'
Response:
{
"returnValue": true
}
API level 13
Reject a connection attempt from a peer (specified with a device address). This is a mechanism to reject a pending GO Negotiation with a peer and request to automatically block any further connection or discovery of the peer.
Name | Required | Type | Description |
---|---|---|---|
peerAddress | Required | String | Device address of the peer to reject the connection attempt from. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
|
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | webos-connman-adapter is unable to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is unavailable. This could occur either because the wpa-supplicant daemon is not running, or connman is unable to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
111 | Peer not found | The peer we are trying to reject the connection attempt from is not present in the list of scanned peers. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
171 | Error in rejecting peer | Fail to reject the connection request from peer. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/rejectpeer '{"peerAddress": "02:fc:ef:a0:d0:4a"}'
Response:
{
"returnValue": true
}
API level 13
Sets the device name for the Wi-Fi direct communication. This name appears as peer name for this device on other neighboring Wi-Fi direct devices.
Name | Required | Type | Description |
---|---|---|---|
deviceName | Required | String | Device name to be used. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | Error in setting the device name. |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/setdevicename '{"deviceName": "TV1"}'
Response:
{
"returnValue": true
}
API level 13
Changes the group owner intent value used by Miracast service. Miracast service uses this API when TV needs to change the role in the P2P (Peer-to-Peer) group.
Note(s):
Name | Required | Type | Description |
---|---|---|---|
GOIntent | Required | Number | The intent value to be set.
Default value of the webOS TV is 1. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details. |
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
206 | Error in changing go intent value | Error when changing the go intent value fails. |
Example code
# luna-send -n 1 luna://com.webos.service.wifi/p2p/setgointent '{"GOIntent":10}'
API level 13
Before any connection can be formed, P2P devices have to find each other. For this they alternately listen and send probe requestswith additional P2P information elements on so-called social channels, which are channels 1, 6 and 11 in the 2.4GHz band. This method can be used to set the desired channel, which by default is channel 11.
Name | Required | Type | Description |
---|---|---|---|
listenChannel | Required | Number | Set listen channel. (Default value is 11) |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
3 | Invalid Parameters | Error when the parameter listenChannel was not specified in the method call. |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
164 | Error in changing listen channel | Unable to set the new listen channel. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/setlistenchannel '{"listenChannel" : 6}'
Response:
{
"returnValue": true
}
API level 13
Control P2P extended listen parameters like period and interval, which determines the frequency at which the TV is listening for new connections and the time duration for each listen state.
Name | Required | Type | Description |
---|---|---|---|
period | Required | Number | Set the listen state period in ms (Time for which the device will listen each time) Default value is 50 ms. |
interval | Required | Number | Set the listen state interval in ms (Frequency at whcih the device will listen). Default value is 400 ms. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
3 | Invalid Parameters | Either of the mandatory parameters period or interval was not specified. |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
135 | Error in setting listen parameters | Unable to set the listen parameters. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/setlistenparams '{"period" : 100, "interval": 500}'
Response:
{
"returnValue": true
}
API level 13
Enables or disables the Wi-Fi Direct connection, as well as to set listen and persistent modes.
Name | Required | Type | Description |
---|---|---|---|
P2P | Optional | String | Set to enabled to enable the Wi-Fi direct connection and disabled to disable the Wi-Fi direct connection. |
listenState | Optional | String | Set the Wi-Fi direct listen state to either enabled or disabled. Enabling listen state will make this device visible on other Wi-Fi direct devices so that it can initiate connection to them. |
persistentMode | Optional | String | Set the P2P persistent mode to enabled or disabled. Enabling persistent mode will save any group created on this device across reboots. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
113 | Error in changing P2P state | Error in enabling/disabling Wi-Fi direct technology. |
114 | P2P disabled, so cannot enable listen state | Error if trying to enable listen state, when Wi-Fi direct is not enabled. |
114 | P2P disabled, so cannot enable persistent mode | Error if trying to enable persistent mode, when Wi-Fi direct is not enabled. |
115 | Error in setting persistent mode | Error in enabling/disabling persistent mode on the device. |
116 | Error in changing listen state | Error in enabling/disabling the listen mode on the device. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/setstate '{"P2P": "enabled", "listenState": "disabled", "persistentMode": "disabled"}'
Response:
{
"returnValue": true
}
API level 13
Enables or disables a groups' tethering property.
Name | Required | Type | Description |
---|---|---|---|
ssid | Required | String | SSID of the group. |
tethering | Required | Boolean | To enable tethering , set tethering to true. To disable tethering , set tethering to false. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | Error in enabling/disabling tethering. |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
103 | Already enabled | Error in case trying to enable tethering, when it is already enabled. |
104 | Already disabled | Error in case trying to disable tethering, when it is already disabled. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
121 | Group not found | The group with the given ssid was not found. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/settethering '{"ssid": "group1", "tethering": true }'
Response:
{
"returnValue": true
}
API level 13
Sets the Wi-Fi display parameters.
Name | Required | Type | Description |
---|---|---|---|
enabled | Required | Boolean | Set to true to enable the Wi-Fi Display feature and false to disable. Note: If set to false, other parameters are disregarded. |
deviceType | Optional | String | Device type. Possible device types are : source, primary-sink, secondary-sink, or dual-role. |
sessionAvailable | Optional | Boolean | Set to true to enable Wi-Fi Direct Session, false to disable. |
rtspPort | Optional | number | Session management control port. |
cpSupport | Optional | Boolean | Set to true to enable Content Protection using HDCP System 2.0/2.1 and false to disable. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate with the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have Wi-Fi support. |
9 | Could not validate json message against schema | The error occurs when missing required parameter. |
114 | P2P is not enabled | Wi-Fi Direct is not enabled on the system. |
123 | Error in changing WFD state | Error in enabling or disabling Wi-Fi display state. |
124 | Invalid value for deviceType (should be one of source/primary-sink/secondary-sink/dual-role | The deviceType parameter should only have one of the following values : source / primary-sink / secondary sink / dual-role. |
125 | Error in changing WFD device type | Error in changing the device type for Wi-Fi display parameters. |
126 | Error in changing WFD session available bit | Error in changing session available bit for Wi-Fi display parameters. |
127 | Error in changing WFD cp support bit | Error in changing the CP support bit for Wi-Fi display parameters. |
128 | Error in changing WFD rtsp port | Error in changing the RTSP port for Wi-Fi display parameters. |
131 | Error in unregister service | Error in unregister service |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/p2p/setwifidisplayinfo '{"enabled": true, "deviceType": "primary-sink", "sessionAvailable": true, "rtspPort": 7236, "cpSupport": false}'
Response:
{
"returnValue": true
}
API level 11
Triggers a manual scan for the Wi-Fi networks. It should not be used together with the findnetworks method as using both at the same time will result in errors. This method will trigger a scan and return immediately. Results of the scan are posted to the subscribers of findnetworks and getNetworks.
None
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
1, 4, 5, 7, 108, 160 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/scan '{}'
Response:
{
"returnValue":true
}
API level 11
Sets the current country code of the Wi-Fi adapter. This affects the allowed Wi-Fi channel for both AP (Access Point) and STA (Station) modes.
Format of the country code follows the alpha-2 code of ISO-3166-1.
Name | Required | Type | Description |
---|---|---|---|
countryCode | Required | String | Alpha-2 country code. For possible values, see List of ISO 3166 country codes. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the Error Codes Reference section of this method for details. |
Error Code | Error Text | Error Description |
---|---|---|
9 | Could not validate json message against schema | Parameters passed to this method are not following the schema format. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/setCountryCode '{"countryCode":"US"}'
Response:
{
"returnValue":true
}
API level 11
Enables or disables Wi-Fi on the system by enabling/disabling the Wi-Fi interface.
Name | Required | Type | Description |
---|---|---|---|
state | Required | String | Indicates whether to enable Wi-Fi. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
4, 5, 103, 104 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/setstate '{"state": "disabled"}'
Response:
{
"returnValue":true
}
API level 27
Starts the WPS authentication process. If wpsPin argument is provided then the WPS-PIN method will be used, else WPS-PBC method will be used.
Name | Required | Type | Description |
---|---|---|---|
wpsPin | Optional | String | Pin for WPS-PIN mode. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates status of method execution. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
1, 4, 5 | Check error details | For details of a specific error, see the 'API Error codes Reference' table. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/startwps '{"wpsPin": "64889467"}'
Response:
{
"returnValue":true
}
API level 11
Gets the maximum number of stations allowed to connect to the AP.
None
Name | Required | Type | Description |
---|---|---|---|
maxStationCount | Required | Number | Number of stations allowed to connect to the AP. Range : 1 ~ 254. |
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the Error Codes Reference section of this method for details. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | Some error in getting the maximum number of stations allowed to connect to the AP. |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/tethering/getMaxStationCount '{}'
Response:
{
"returnValue": true,
"getMaxStationCount": 2
}
API level 11
Gets the current Wi-Fi tethering state.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Subscribe for notifications when there is a change in the list of found peers. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details. |
subscribed | Optional | Boolean | Returns true to indicate client was successfully subscribed. |
enabled | Required | Boolean | Indicates if Wi-Fi tethering is enabled or disabled. |
ssid | Optional | String | The identifier used as SSID for Wi-Fi tethering. This field cannot be set when Wi-Fi tethering is enabled. |
securityType | Optional | String | The security type to use for authenticating clients. Possible values are
When open is used then the passphrase is cleared. When psk is used a then the passphrase needs to be set before enabling the Wi-Fi tethering. |
timeout | Required | Number | A timeout in minutes after which the Wi-Fi tethering is disabled, when no client is connected. Default value is 5 minutes. |
channel | Optional | Number | Channel of the SoftAP |
ipAddress | Optional | String | IP address of the SoftAP |
Name | Required | Type | Description |
---|---|---|---|
subscribed | Required | Boolean | True to indicate that the client was successful subscribed. |
enabled | Required | Boolean | Indicates if Wi-Fi tethering is enabled or disabled. |
ssid | Required | String | The identifier used as SSID for Wi-Fi tethering. This field can't be set when Wi-Fi tethering is enabled. |
securityType | Required | String | The security type to use for authenticating clients. Possible values are
When open is used, any possible set passPhrase is cleared. When psk is used a passPhrase needs to be set before enabling Wi-Fi tethering. |
timeout | Required | Number | A timeout in minutes after which the Wi-Fi tethering is disabled, when no client is connected. Default value is 5 minutes. |
channel | Optional | Number | Channel of the SoftAP |
ipAddress | Optional | String | IP address of the SoftAP |
Example : Successful call
# luna-send -n 1 -f luna://com.webos.service.wifi/tethering/getState '{}'
Response:
{
"returnValue":true,
"channel":11,
"ipAddress":"192.168.6.4",
"subscribed":false,
"ssid":"Connect_Me",
"enabled":true,
"securityType":"psk",
"timeout":60
}
API level 11
Gets the number of devices that are connected to the signage softAP.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Subscribe to this method to get notified when a device connects or disconnects from the signage softAP. Possible values are:
Default value: false |
Name | Required | Type | Description |
---|---|---|---|
stationCount | Optional | Number | Number of devices that are connected to the signage softAP. |
subscribed | Optional | Boolean | Indicates if subscribed to get notified when a device connects or disconnects from the signage softAP. Possible values are:
|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details. |
connectedStations | Optional | String array | MAC addresses of the connected clients. |
Name | Required | Type | Description |
---|---|---|---|
subscribed | Required | Boolean | Returns true to indicate client was successfully subscribed to get notified when a device connects or disconnects from the signage softAP. |
stationCount | Required | Number | Number of devices that are connected to the signage softAP. |
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details. |
connectedStations | Required | String array | MAC addresses of the connected clients. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | An internal error occurred when parsing the JSON object being prepared as a response (extremely unlikely). |
4 | Connman service unavailable | Indicates that webos-connman-adapter is unable to communicate with the connman daemon. |
5 | WiFi technology unavailable | Indicates that Wi-Fi technology is not available. This can occur due to the following reasons:
|
Example code
# luna-send -i -f luna://com.webos.service.wifi/tethering/getStationCount '{"subscribe":true}'
Response:
{
"subscribed":true,
"connectedStations":[
],
"returnValue":true,
"stationCount":0
}
{
"subscribed":true,
"connectedStations":[
"8c:3a:e3:46:ab:7a"
],
"returnValue":true,
"stationCount":1
}
{
"subscribed":true,
"connectedStations":[
"dc:0b:34:bf:c4:f8",
"8c:3a:e3:46:ab:7a"
],
"returnValue":true,
"stationCount":2
}
API level 11
Sets the maximum number of stations allowed to connect to the AP.
Name | Required | Type | Description |
---|---|---|---|
maxStationCount | Required | Number | Number of stations allowed to connect to the AP. Range : 1 ~ 254. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation.
|
errorText | Optional | String | Indicates the reason for the failure of the operation. See the Error Codes Reference section of this method for details. |
Error Code | Error Text | Error Description |
---|---|---|
3 | Invalid parameters | Parameter is invalid. |
9 | Could not validate json message against schema | Parameters passed to this method are not following the schema format. |
210 | Not allowed to change the maximum number of stations allowed to connect to the AP while tethering is enabled | Not allowed to change the maximum number of stations allowed to connect to the AP while tethering is enabled |
Example code
# luna-send -n 1 -f luna://com.webos.service.wifi/tethering/setMaxStationCount '{"maxStationCount" : 1}'
Response:
{
"returnValue": true
}
API level 11
Sets the Wi-Fi tethering state. Wi-Fi tethering can either be enabled or disabled.
At least the ssid field needs to be set before enabling tethering. This can be done either with a separate setState call or within the enable call.
The "ssid", "securityType" and "passPhrase" configuration values are persisted across device reboots.
Note: Although all parameters are optional, at least one parameter needs to be specified.
Name | Required | Type | Description |
---|---|---|---|
enabled | Optional | Boolean | Enable or disable Wi-Fi tethering. |
ssid | Optional | String | The identifier used as SSID for Wi-Fi tethering. This field cannot be set when Wi-Fi tethering is enabled. |
securityType | Optional | String | The security type to use for authenticating clients. Possible values are
When open is used then the passphrase is cleared. When psk is used a then the passphrase needs to be set before enabling the Wi-Fi tethering. |
passPhrase | Optional | String | The passphrase used to authenticate the new clients when Wi-Fi tethering is enabled. This field cannot be set when Wi-Fi tethering is enabled. A valid passphrase should have 8 to 63 characters. |
timeout | Optional | Number | A timeout in minutes after which the Wi-Fi tethering is disabled, when no client is connected. Default value is 5 minutes. |
channel | Optional | String | Channel of the softap to be used for Wi-Fi tethering. Possible values are 1~11. Note: If value greater than 11 is set, channel is automatically set to 6. |
ipAddress | Optional | String | IP address of the SoftAP |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
The method may fail because of one the error conditions described in the Error Codes Reference table of this method. See the Error Code Reference table for more information. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. See the Error Codes Reference of this method for more details. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. See the Error Codes Reference of this method for more details. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | An internal error occurred when parsing the JSON object being prepared as a response (extremely unlikely). |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to talk to the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, or connman is not able to communicate with wpa-supplicant or the device does not have WiFi support. |
146 | Failed to enable tethering mode | Failed to enable Wi-Fi tethering mode because of unmet requirements. Check if fields ssid, passPhrase and securityType are all set to the right values. |
147 | Failed to disable tethering mode | Failed to disable Wi-Fi tethering mode cause for an unknown reason. |
148 | Not allowed to change IP Address while tethering is enabled | User is not allowed to change IP address while tethering is already enabled. |
149 | Error in setting tethering passphrase | An error occured while processing the supplied passphrase. |
151 | No passphrase set but required for security type psk | A passphrase must be set for Wi-Fi tethering when security type psk is selected. |
152 | Failed to disable tethering mode through support library | It was not possible to enable Wi-Fi tethering through using the webOS connman adapter support library. |
153 | Not allowed to change securityType while tethering is enabled | When Wi-Fi tethering is enabled it is not allowed to change the security type. |
154 | With security typen open specifying a passphrase is not possible | When security type is set to open it is not possible to set a passphrase in the same call. |
155 | Passphrase doesn't match the requirements | Passpharse does not match the requirements. Must be between 8 and 63 characters long. |
156 | Failed to restore WiFi state after disbling tethering | When Wi-Fi tethering is disabled the previous Wi-Fi state is restored (enabled or disabled) and this error occurs when something during this process fails. |
207 | Error in setting tethering Channel | Error occurred during processing tethering channel. |
Example code
# luna-send -n 1 luna://com.webos.service.wifi/tethering/setState '{
"enabled":true,
"securityType":"open",
"ssid":"MyTestAP",
"timeout":60
}'
Response:
{
"returnValue":true
}
Example scenario
# luna-send -n 1 luna://com.webos.service.wifi/tethering/setState '{
"enabled":true,
"securityType":"psk",
"passPhrase":"MyTestPassphrase",
"ssid":"MyTestAP",
"timeout":60
}'
Response:
{
"returnValue":true
}
Example scenario
# luna-send -n 1 -f luna://com.webos.service.wifi/tethering/setState '{
"enabled":true,
"securityType":"psk",
"passPhrase":"11111111",
"ssid":"Connect_Me",
"timeout":60,
"channel":11,
"ipAddress":"192.168.6.1"
}'
Response:
{
"returnValue":true
}
This object contains information on a Wi-Fi peer-to-peer group.
Example
"groupInfo": {
"frequency": 5180,
"owner": true,
"ssid": "DIRECT-vG-[LG] webOS TV WEBOS1",
"tethering": false,
"persistent": true
}
Name | Required | Type | Description |
---|---|---|---|
owner | Required | Boolean | true if we are the owner of a Wi-Fi direct group. |
ssid | Required | String | SSID of the Wi-Fi Direct group. |
tethering | Required | Boolean | true if Wi-Fi Direct group is also tethering. |
persistent | Required | Boolean | true if Wi-Fi Direct group is persistent. |
frequency | Required | Number (int16_t) | Frequency value |
Group information.
Name | Required | Type | Description |
---|---|---|---|
groupInfo | Required | Object: WifiGroupInfo | Contains group information. |
This object contains information on a peer-to-peer client.
Example
"peerInfo": {
"connected": true,
"configMethod": 128,
"deviceAddress": "02:fc:ef:a0:d0:4a",
"peerIp": "192.168.16.2",
"deviceName": "Test Test's G3",
"groupOwner": false,
"wfdInfo": {
"wfdSessionAvail": true,
"wfdCpSupport": true,
"wfdDeviceType": "source",
"wfdRtspPort": 8554
},
"signalLevel": 76
}
Name | Required | Type | Description |
---|---|---|---|
deviceName | Required | String | Device name. |
deviceAddress | Optional | String | Device address. |
groupOwner | Required | Boolean | Group owner. |
configMethod | Optional | Number | Configuration method. |
signalLevel | Required | Number | Signal level. |
wfdInfo | Optional | Object: WifiWfdInfo | WFD information. |
connected | Required | Boolean | Connection status. |
peerIp | Optional | String | IPv4 address. |
invited | Optional | String | true if connecting, false if connection failed. |
serviceDiscoveryResponse | Optional | String | Service discovery response. Only sent on the first inquiry and never again. |
List of peers and the related info.
Name | Required | Type | Description |
---|---|---|---|
peerInfo | Required | Object: WifiPeerInfo | Peer information. |
This object contains information on the Wi-Fi Direct settings of a Wi-Fi Peer connection. It is used in Wi-Fi Peer Info and is only present when the connection uses Wi-Fi Direct.
Example
"WifiWfdInfo": {
"wfdDeviceType": "sink",
"wfdSessionAvail": true,
"wfdCpSupport": true,
"wfdRtspPort": 4321
}
Name | Required | Type | Description |
---|---|---|---|
wfdDeviceType | Required | String | Wi-Fi Direct device type. One of: source, primary-sink, secondary-sink, source. |
wfdSessionAvail | Required | Boolean | true if session is available, false otherwise. |
wfdCpSupport | Required | Boolean | true if Wi-Fi Direct content protection is supported, false otherwise. |
wfdRtspPort | Required | Number | Wi-Fi Direct Session Management Control Port. |
Information on one station in a Basic Service Set.
Example
"bssInfo": {
"frequency": 2462,
"bssid": "EE:94:F6:33:5F:F7",
"signal": -65
}
Name | Required | Type | Description |
---|---|---|---|
bssid | Required | String | Mac address of the wireless station. |
frequency | Required | Number | Station frequency in MHZ |
signal | Required | Number | Station signal strength, DBm. Typical range -100 (weak) ... -10 (strong). |
Different security fields for connecting to enterprise networks.
Example
"enterpriseSecurity": {
"eapType": "tls",
"identity": "work",
"passphrase": "1234",
"caCertFile": "/etc/cert/ca.pem",
"clientCertFile": "/etc/cert/user.pem",
"privateKeyFile": "/etc/cert/user.prv",
"privateKeyPassphrase": "4321"
}
Name | Required | Type | Description |
---|---|---|---|
eapType | Required | String | The authentication method for this connection, which is supported by the AP. Currently supported methods are peap, ttls and tls. |
identity | Optional | String | The name of the user to be authenticated. |
passphrase | Optional | String | Passphrase for authenticating the user. |
caCertFile | Optional | String | The location of server certificate file for authenticating the server. |
clientCertFile | Optional | String | The location of client side X.509 certificate file to authenticate the client. |
privateKeyFile | Optional | String | The location of the private key file to decrypt the client certificate. |
privateKeyPassphrase | Optional | String | Passphrase used to encrypt the private key file. |
phase2 | Optional | String | The inner authentication protocol for authenticating to user databases containing user information. |
IP information for the connected network i.e. connected Wi-Fi interface returned as a response from the getstatus method.
Example
"ipInfo": {
"interface": "wifi0",
"ip": "192.168.1.2",
"subnet": "255.255.255.0",
"gateway": "192.168.1.1",
"dns": ["192.168.1.1"]
}
Name | Required | Type | Description |
---|---|---|---|
interface | Required | String | The Wi-Fi interface for the connected network. |
ip | Required | String | IP address of the Wi-Fi interface. |
subnet | Required | String | Subnet for the Wi-Fi interface. |
gateway | Required | String | Gateway address for routing over Wi-Fi interface. |
dns | Required | String array | List of DNS server IP addresses for the Wi-Fi interface. |
Information of each of the networks found by the findNetworks, getNetworks or getstatus method.
Example
"networkInfo": {
"available": true,
"signalLevel": 49,
"signalBars": 1,
"displayName": "xxx",
"supported": true,
"ssid": "xxx",
"availableSecurityTypes": [ "psk", "wps" ],
"connectState": "ipConfigured",
"bssInfo":[
{
"frequency": 2462,
"bssid": "EE:94:F6:33:5F:F7",
"signal": -65
}
]
}
Name | Required | Type | Description |
---|---|---|---|
ssid | Required | String | SSID of discovered AP. |
availableSecurityTypes | Required | String array | List of supported security mechanisms. |
signalBars | Required | Number | Coarse indication of signal strength. |
available | Required | Boolean | Indicates if the network is currently available or not. |
signalLevel | Required | Number | Fine indication of signal strength. |
ipInfo | Optional | Object: ipInfo | Only returned for getstatus method. |
bssInfo | Optional | Object array: bssInfo | Radio information on stations associated with this network. Only returned for getNetworks and findNetworks methods, only for in-range wifi networks. |
displayName | Required | String | Displayable name of the network. The value of this field should be always used to the display the name of the network in the UI. The field ssid should never be used. It is only there to identify the network object and as an argument for several other methods like connect. In most cases the content is the same as for the ssid field. The content will be different when the SSID the access point sends out is not encoded in UTF-8. In this case the service tries several conversion options to convert the SSID to UTF-8 and the result is the value in this field. |
connectState | Optional | String | Current connection state of the service. The following values are possible: "notAssociated", "associating", "associated", "ipConfigured", "ipFailed". |
supported | Required | Boolean | Displays false if found that Wi-Fi supports "ieee8021x" (enterprise security). Displays true for all other Wi-Fi security types. |
This object is used to provide security information for establishing a connection.
Example
"security": {
"securityType": "psk",
"simpleSecurity": {"passKey": "1234"}
}
Name | Required | Type | Description |
---|---|---|---|
securityType | Required | String | Connection type. e.g. wep or psk. |
simpleSecurity | Optional | Object: simpleSecurity | Security options when using simple security type. |
enterpriseSecurity | Optional | Object: enterpriseSecurity | Different fields to connect to enterprise networks. |
A list of array types.
Example
"securityType": [ "open", "psk", "wps" ]
Name | Required | Type | Description |
---|---|---|---|
securityType | Required | String array | Types of security supported. |
Connection information for a simple connection.
Example
"simpleSecurity": {
"passKey": "1234"
}
Name | Required | Type | Description |
---|---|---|---|
passKey | Required | String | Passkey for the network to be connected. |
A Wi-Fi profile stores all information for a previously successfully connected wireless network. However, it does not store critical security things like the passphrase.
Example
"wifiProfile": {
"profileId": 777,
"ssid": "xxx",
"security": { "securityType": [ "psk", "wps" ] }
}
Name | Required | Type | Description |
---|---|---|---|
ssid | Required | String | SSID associated with the profile. |
profileId | Required | String | ID string naming the profile (can be used with connect method). |
security | Required | Object: securityType | Security type which was used to connect to the network the last time. |
This is one of the parameters for the p2p/connect method to pass WPS information to connect to the peer. Atleast one of the two properties (wps or wpspin) is required to be set.
Example
"wpsInfo":{
"wps":true,
"wpspin": "1234"
}
Name | Required | Type | Description |
---|---|---|---|
wps | Required | Boolean | Indicates WPS status. Possible values are:
|
wpspin | Optional | String | Only provided if using WPS-PIN mode. Do not provide if using WPS-PBC mode. |
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | Some unknown error in changing the passkey. |
3 | Invalid parameters | One or more parameters supplied were invalid. |
4 | Connman service unavailable | Error when webos-connman-adapter is not able to communicate to the connman daemon. |
5 | WiFi technology unavailable | Error when the Wi-Fi technology is not available. This could happen either because the wpa-supplicant daemon is not running, connman is not able to communicate with wpa-supplicant, or the device doesn't have Wi-Fi support. |
7 | WiFi switched off | Error when Wi-Fi interface is down. |
9 | Could not validate json message against schema | If the parameters passed to any method are not following the schema format. |
103 | Already enabled | Error message when setting the state to enabled if the Wi-Fi is already enabled. |
104 | Already disabled | Error message when setting the state to disabled if the Wi-Fi is already disabled. |
105 | Profile not found | Profile with the given profileId was not found. |
106 | No service is connecting currently | There is no connection in progress, so this error indicates there is no connection to cancel. |
107 | Failed to disconnect currently connecting service | Not able to disconnect currently connecting service due to unknown reasons. |
108 | Error in scanning network | Error occurred when trying to scan the Wi-Fi interface for networks. |
109 | Error in generating wps pin | Error in opening /dev/urandom for random pin generation. |
110 | Error in cancelling WPS connection | Error in the actual call for cancelling the WPS connection process. |
160 | Already actively scanning for networks | This error is returned when the scan method is called while clients are subscribed to the findnetworks method. |
Contents