com.webos.service.connectionmanager
API Summary
Manages wired and wireless network connections across webOS apps and services
Overview of the API
Provides methods to get and set the overall network connection status including setting IPv4/IPv6 and DNS parameters. This API can be used for both wired and wireless interfaces.
About webos-connman-adapter daemon:
webos-connman-adapter is a daemon which acts as an interface between a daemon for managing internet connections called connman, and the rest of the webOS world. The reason we need this wrapper daemon is because connman communicates via dbus whereas the webOS apps/services require luna-service2(LS2) for interprocess communication. So, internally webos-connman-adapter communicates to connman via dbus but provides the LS2 interface to all the webOS apps/services so that they can get all the network related information as well as manage the connections.
Methods
findProxyForURL
Description
Provides the proxy server that was used to reach the target URL.
Parameters
Name | Required | Type | Description |
---|---|---|---|
url | Required | String | The complete URL to be checked for proxy access. |
host | Required | String | The hostname component of a URL for convenience |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
proxy | Optional | String | The proxy address for the target URL. For example, "PROXY <proxy1>:1080". For directly connected sites, the value "DIRECT" is returned. |
returnValue | Required | String | Indicates the status of operation. Possible values are:
|
errorCode | Optional | String | 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 Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
205 | Error in finding proxy for url | Error in finding the proxy for the provided URL and host. |
Example
Example code
Example 1: Example for direct call.
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/findProxyForURL '{
"url":"http://www.lge.com",
"host":"www.lge.com"
}'
Response:
{
"proxy": "DIRECT",
"returnValue": true
}
getinfo
Description
Gets the MAC addresses for the Wi-Fi and wired interfaces.
When subscribed, getInfo periodically checks for any changes in interface MAC addresses and notifies subscribers when changes are detected. The check interval is 1 second.
Parameters
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Subscribe to be notified of changes in interfaces. Possible values are:
Default value: false |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
wifiInfo | Optional | Object: wifiInfo | Information about the Wi-Fi interface. |
wiredInfo | Optional | Object: wiredInfo | Information about the wired interface. |
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
subscribed | Required | Boolean | Indicates if subscribed to get notified.
|
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. |
Subscription Returns
Name | Required | Type | Description |
---|---|---|---|
wifiInfo | Optional | Object: wifiInfo | Information about the Wi-Fi interface. |
wiredInfo | Optional | Object: wiredInfo | Information about the wired interface. |
subscribed | Required | Boolean | Always true in case of subscription response. |
returnValue | Required | Boolean | Always true in case of subscription response |
Error Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | This message implies that there was an internal error when parsing the JSON object being prepared as a response (extremely unlikely). |
Example
Example code
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/getinfo {}
Response:
{
"subscribed":false,
"wifiInfo":{
"macAddress":"20:3D:BD:DE:49:12"
},
"returnValue":true,
"wiredInfo":{
"macAddress":"E8:5B:5B:82:6D:3C"
}
}
getStatus
Description
Provides the current status of Wi-Fi and wired network connections on the system.
Parameters
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Subscribe to this method to get notified on changes to the status of the network connection. Possible values are:
Default value: false |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
isInternetConnectionAvailable | Required | Boolean | Indicates if internet connection is available. Possible values are:
|
wifi | Required | Object: wifi | Information about the Wi-Fi connection. |
wired | Required | Object: wired | Information about the wired connection. |
offlineMode | Optional | String | Indicates if the system is offline. Possible values are:
|
subscribed | Required | Boolean | Indicates if subscribed to get notified on changes to the status of the network connection. 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. |
Subscription Returns
Name | Required | Type | Description |
---|---|---|---|
isInternetConnectionAvailable | Required | Boolean | Indicates if internet connection is available. Possible values are:
|
wifi | Required | Object: wifi | Information about the Wi-Fi connection. |
wired | Required | Object: wired | Information about the wired connection. |
returnValue | Required | Boolean | Value is always true (since subscription is only displayed on successful operations). |
subscribed | Required | Boolean | Indicates if subscribed to get notified on changes to the status of the network connection. Possible values are:
|
Error Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | Error when parsing the response JSON object. |
4 | Connman manager is not available | Error because webos-connman-adapter was unable to communicate with the connman daemon. |
Example
Example code
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/getStatus '{}'
Response:
{
"returnValue": true,
"offlineMode": "disabled",
"wired": {
"netmask": "255.255.255.0",
"dns1": "192.168.0.102",
"ipAddress": "192.168.0.10",
"proxyinfo": {
"method": "direct"
},
"onInternet": "no",
"method": "fixed",
"state": "connected",
"gateway": "192.168.0.1",
"interfaceName": "eth0",
"plugged": true
},
"wifi": {
"state": "disconnected"
},
"subscribed": false,
"isInternetConnectionAvailable": false
}
setdns
Description
Changes the DNS servers for the network. If a SSID value is not provided in the request then the modifications are applied to the wired connection. If interface option is not provided operation will be performed on default interface
Parameters
Name | Required | Type | Description |
---|---|---|---|
dns | Required | String array | Contains the IP addresses of the DNS servers that need to be changed. |
ssid | Optional | String | Indicates the SSID of the Wi-Fi connection to be modified. |
interfaceName | Optional | String | Interface on which operation needs to be performed. If not provided operation will be performed on default interface |
Call Returns
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" section of this method for details. |
Error Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | This message implies that there was an error in setting the dns for the given network. |
3 | Invalid parameters | This message implies that there was an error because one or more invalid ip addresses were passed in the dns parameter. |
4 | Connection service unavailable | This message implies that there was an error because webos-connman-adapter was not able to talk to the connman daemon. |
136 | No connected network | This message implies that there was an error because no network was found with the provided ssid. |
301 | Invalid Interface | This message implies that there was an error because passed interfaceName does not exist |
Example
Example code
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setdns '{
"dns":[
"192.45.67.128"
]
}'
Response:
{
"returnValue":true
}
setipv4
Description
Modifies the parameters of an IPv4 connection (wired or Wi-Fi). If a SSID value is not provided in the request, the modifications are applied to the wired connection only. If interface option is not provided operation will be performed on default interface.
Note: At least one of the following parameters must be provided: SSID, address, netmask or gateway.
Parameters
Name | Required | Type | Description |
---|---|---|---|
method | Required | String | Specifies the way the IPv4 parameter should be changed. Possible values are:
|
address | Optional | String | If specified, sets a new IP address. |
netmask | Optional | String | If specified, sets a new netmask. |
gateway | Optional | String | If specified, sets a new gateway IP address. |
ssid | Optional | String | Specifies the Wi-Fi connection to modify. If absent, the wired connection is changed. |
interfaceName | Optional | String | Interface on which operation needs to be performed. If not provided operation will be performed on default interface |
Call Returns
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" section of this method for details. |
Error Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | This message implies that there was an error in setting ipv4 parameters for the given network. |
3 | Invalid parameters | This message implies that there was an error because of an invalid ip address value in the address, netmask or gateway parameters. |
4 | Connman service unavailable | This message implies that there was an error because webos-connman-adapter was not able to talk to the connman daemon. |
102 | Network not found | This message implies that there was an error because the network with the given ssid was not found. |
301 | Invalid Interface | This message implies that there was an error because passed interfaceName does not exist |
Example
Example code
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setipv4 '{
"ssid": "MyTestAP",
"method": "manual",
"address": "192.168.1.42",
"netmask": "255.255.255.0",
"gateway": "192.168.1.1"
}'
Response:
{
"returnValue":true
}
Example scenario
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setipv4 '{
"ssid":"MyTestAP",
"method":"dhcp"
}'
Response:
{
"returnValue":true
}
setipv6
Description
Modifies the parameters of an IPv6 connection (wired or Wi-Fi). If a SSID value is not provided in the request then the modifications are applied to the wired connection only. If interface option is not provided operation will be performed on default interface.
Note: At least one of the following parameters must be provided: method, address, prefixLength or gateway.
Parameters
Name | Required | Type | Description |
---|---|---|---|
address | Optional | String | If specified, sets a new IP address. |
gateway | Optional | String | If specified, sets a new gateway IP address. |
method | Required | String | The method parameter specifies the way the IPv4 parameter should be changed. The allowed values are:
|
prefixLength | Optional | Number (int32_t) | If specified, sets the prefixLength for the IPv6 address. |
ssid | Optional | String | Specifies the Wi-Fi connection to modify. If absent, the wired connection is changed. |
interfaceName | Optional | String | Interface on which operation needs to be performed. If not provided operation will be performed on default interface. |
Call Returns
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 Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown error | This message implies that there was an error in setting ipv6 parameters for the network with the given ssid. |
3 | Invalid parameters | This message implies that there was an error because of an invalid ip address value in address or gateway. |
4 | Connman service unavailable | This message implies that there was an error because webos-connman-adapter was not able to communicate with the connman daemon. |
102 | Network not found | This message implies that there was an error because a network with the given ssid was not found. |
301 | Invalid Interface | This message implies that there was an error because passed interfaceName does not exist |
Example
Example code
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setipv6 '{
"ssid": "MyTestAP",
"method": "manual",
"address": "2001:db8:85a3:8d3:1319:8a2e:370:7348"
}'
Response:
{
"returnValue":true
}
Example scenario
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setipv6 '{
"ssid":"MyTestAP",
"method":"auto"
}'
Response:
{
"returnValue":true
}
setProxy
Description
Specifies the proxy server for the network.
Parameters
Name | Required | Type | Description |
---|---|---|---|
method | Required | String | The method to get the actual system configuration for proxy servers. Possible values are:
|
url | Optional | String | Automatic proxy configuration URL. If no URL is specified, DHCP/WPAD auto-discover will be tried. If DHCP/WPAD auto-discover methods also fail, then method will be set to "direct". Note: Used when method is set to "auto". |
servers | Optional | String array | List of proxy URIs. An URI without a protocol will be interpreted as the generic proxy URI. Note: Used when method is set to "manual". |
excludes | Optional | String array | List of hosts which can be accessed directly. Note: Used when method is set to "manual". |
ssid | Optional | String | The SSID of the Wi-Fi connection for which the proxy must be set. If no value is provided, the proxy is applied to the wired connection. |
Call Returns
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 Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
1 | Unknown Error | Error in setting the proxy. |
3 | Invalid parameters | Error because the "servers" parameter is mandatory if the method is "manual". |
4 | Connman service unavailable | Error because webos-connman-adapter was not able to communicate with the connman daemon. |
136 | No connected network | Error because no network was found with the provided SSID. |
Example
Example: Proxy method is set to direct (no proxy)
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setProxy '{ "method":"direct" }'
Response:
{
"returnValue":true
}
Example: Automatically set the proxy using an URL
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setProxy '{
"method": "auto",
"url":"http://www.lge.com/proxy.pac"
}'
Response:
{
"returnValue":true
}
Example: Manually configure the proxy details
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setProxy '{
"method":"manual",
"servers":["10.10.10.10:8080"],
"excludes" : ["www.lge.com"]
}'
Response:
{
"returnValue":true
}
setstate
Description
Enables or disables the state of either or both the Wi-Fi and wired connections on the system.
Note: While all parameters are optional, at least one parameter is required, or the method will return error.
Parameters
Name | Required | Type | Description |
---|---|---|---|
wifi | Optional | String | Set it to enabled to enable Wi-Fi. Set it to disabled to disable Wi-Fi. Any other value will result in an error. |
wired | Optional | String | Set it to enabled to enable wired. Set it to disabled to disable wired. Any other value will lead to an error. |
offlineMode | Optional | String | Set it to enabled to enable offline mode. Set it to disabled to disable offline mode. Any other value will lead to an error. |
Call Returns
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 Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
3 | Invalid parameters | This message implies that there was an error occurs when either the wifi or wired parameters have a value other than enabled or disabled. |
4 | Connman service unavailable | This message implies that there was an error because webos-connman-adapter was not able to talk to the connman daemon. |
Example
Example code
Example response for a successful call:
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setstate '{"wifi":"enabled"}'
{
"returnValue": true
}
setTechnologyState
Description
Enables or disables the available connection interfaces which can be:
- Wired (ethernet)
- Wi-Fi
Note:
- If a technology is not available on the device, an error will be returned.
- The current status of the connection interfaces are reported through the getStatus method. Only one of the listed properties is allowed to be specified.
Parameters
Name | Required | Type | Description |
---|---|---|---|
enabled | Optional | String array | List of technologies to enable. The array can contain: wifi, ethernet. |
disabled | Optional | String array | List of technologies to disable. The array can contain: wifi, ethernet. |
Call Returns
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 Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
4 | Connman service unavailable | This message implies that there was an error because webos-connman-adapter was not able to communicate with the connman daemon. |
163 | Failed to enable/disable one or more technologies | This message implies that there was an error because the service failed while trying to enable or disable any of the specified technologies. The most common cause is that the technology is not available on the device. Note: Getting this error does not mean that no technology changed its state. The list is processed in order and if the last one for example failed to get enabled/disabled, all of the others would have correctly been processed and switched to their state according to the request. |
181 | Not supported | This message implies that technology exists, but enabling or disabling it is not supported on this platform. |
Example
Example code
# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setTechnologyState '{"enabled":["wifi"]}'
{
"returnValue": true
}
setDefaultInterface
Description
Allows to set the default interface.
This API allows to change the current default interface with another interface which is in connected state, for the same technology.
For example, ethernet has multiple interfaces like eth0, eth1, eth2. If currently eth0 is the default interface and eth1, eth2 have 'state' field as 'connected' in getStatus() method, then either eth1 and eth2 can be set as default interfaces.
Note: Should be used only to change the current state of the interface. It does not retain/persist the interface state due to other events or action.
Parameters
Name | Required | Type | Description |
---|---|---|---|
ifName | Required | String | Interface that is to be made as the default. |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the 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. |
Error Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
102 | Could not validate json message against schema | This message implies that there was an error because parameters passed to a method were not following the schema format. |
301 | Invalid Interface | This message implies that there was an error because passed interface does not exist or interface state is not connected. |
302 | Already default | This message implies that provided interface is already set as default. |
Example
Example scenario
# luna://com.webos.service.connectionmanager/setDefaultInterface '{"ifName":"eth0"}'
Response:
{
"returnValue":true
}
Objects
wifi
The wifi object provides details on the status of the Wi-Fi connection. If the Wi-Fi connection is available then all the fields of this object will contain relevant information. If the Wi-Fi connection is not available then the state field of this object will be set to disconnected, and is the only value that is returned to the calling app.
An example object would look like this:
{
"netmask": "255.255.255.0",
"dns1": "192.168.1.1",
"ipAddress": "192.168.1.61",
"onInternet": "yes",
"method": "dhcp",
"ssid": "TestAP",
"state": "connected",
"gateway": "192.168.1.1",
"interfaceName": "wlan0",
"proxyInfo" :
{
"servers": ["10.10.10.10:80"],
"method": "manual",
"excludes": ["www.lge.com"]
}
}
Name | Required | Type | Description |
---|---|---|---|
dns | Optional | String array | List of IP Addreses of the DNS servers for this Wi-Fi connection. |
gateway | Optional | String | The IP address of the network gateway. |
interfaceName | Optional | String | Name of the Wi-Fi Interface name in use. For example, wlan0. |
ipAddress | Optional | String | The IP address associated with the Wi-Fi connection. |
method | Optional | String | If the IP address was assigned using the manual mode, method will contain Manual. If the IP Address was assigned through DHCP, method will contain dhcp. |
netmask | Optional | String | The net mask value for the Wi-Fi connection. |
onInternet | Optional | String | The captive portal technique forces an HTTP client on a network to see a special web page (usually for authentication purposes) before using the Internet normally. Captive portals are used at most Wi-Fi hotspots.The onInternet will contain one of the following values:
|
ssid | Optional | String | The SSID of the connected service (if known). |
state | Required | String | If the W-iFi connection is available it will be set to connected. If the Wi-Fi connection is not available, it will be set to disconnected. |
proxyInfo | Optional | Object: proxyInfo | The actual system configuration of Proxy servers. |
wifiInfo
This object contains the MAC address for the WI-Fi interface.
An example object would like this:
{
"macAddress": "aa:bb:cc:dd:ee"
}
Name | Required | Type | Description |
---|---|---|---|
macAddress | Required | String | MAC address of the Wi-Fi interface. |
wired
The wired object provides details on the status of the wired connections.
If the wired connection is available then all the fields of this object contain the relevant information. If the wired connection is not available then the state field of this object will be set to disconnected and is the only value that is returned to the calling app.
An example would look like:
{
"netmask": "255.255.255.0",
"dns1": "192.168.100.10",
"dns2": "8.8.8.8",
"ipAddress": "192.168.100.204",
"dns3": "8.8.4.4",
"onInternet": "yes",
"method": "dhcp",
"state": "connected",
"gateway": "192.168.100.1",
"interfaceName": "eth0",
"plugged": true,
"proxyInfo" :
{
"servers": ["10.10.10.10:80"],
"method": "manual",
"excludes": ["www.lge.com"]
}
"interface":[
{
"name" : "eth0",
"netmask": "255.255.255.0",
"dns1": "192.168.100.10",
"dns2": "8.8.8.8",
"ipAddress": "192.168.100.204",
"dns3": "8.8.4.4",
"onInternet": "yes",
"method": "dhcp",
"state": "connected",
"gateway": "192.168.100.1",
"interfaceName": "eth0",
"plugged": true,
"proxyInfo" :
{
"servers": ["10.10.10.10:80"],
"method": "manual",
"excludes": ["www.lge.com"]
}
"checkingInternet":false
}
]
}
Name | Required | Type | Description |
---|---|---|---|
dns | Optional | String array | List of IP Addreses of the DNS servers for this wired connection. |
gateway | Optional | String | The IP address of the network gateway. |
interfaceName | Optional | String | Name of the wired Interface name in use. For example, eth0. |
ipAddress | Optional | String | The IP address associated with the wired connection. |
method | Optional | String | If the IP address was assigned using the manual mode, method will contain Manual. If the IP Address was assigned through DHCP, method will contain dhcp. |
netmask | Optional | String | The net mask value for the wired connection. |
plugged | Required | Boolean | If Ethernet cable is plugged, plugged will contain true. If Ethernet cable is unplugged, plugged will contain false. |
onInternet | Optional | String | The captive portal technique forces an HTTP client on a network to see a special web page (usually for authentication purposes) before using the Internet normally. Captive portals are used at most Wi-Fi hotspots.The onInternet will contain one of the following values:
|
state | Required | String | If the wired connection is available it will be set to connected. If the wired connection is not available, it will be set to disconnected. |
proxyInfo | Optional | Object: proxyInfo | The actual system configuration of Proxy servers. |
interfaces | Required | Object array: InterfaceInfo | Information about the interfaces |
wiredInfo
The object containing the MAC address of the wired interface.
An example would look like:
{
"macAddress": "aa:bb:cc:dd:ee"
"interfaces":[
{
"name":"eth0",
"macAddress":"DC:A6:32:AF:7C:3B"
},
{
"name":"eth1",
"macAddress":"DC:A6:32:AF:7C:3C"
}
],
}
Name | Required | Type | Description |
---|---|---|---|
macAddress | Required | String | MAC address of wired interface |
interfaces | Required | Object array: InterfaceMacInfo | Information about the interfaces and its MAC address |
ipInfo
The object containing IP configuration information.
An example would look like:
{
"subnet": "255.255.255.0",
"dns": [ "192.168.100.10" ],
"address": "192.168.100.204",
"gateway": "192.168.100.1",
"interface": "eth0"
}
Name | Required | Type | Description |
---|---|---|---|
interface | Required | String | Network interface to which this configuration is to be applied. |
address | Optional | String | Address used for the configuration. |
subnet | Required | String | Subnet mask. |
gateway | Required | String | Address of the network gateway. |
dns | Required | String array | List of DNS servers used for this IP configuration. |
proxyInfo
This object contains the actual system configuration for proxy servers.
Sample "proxyInfo" object:
{
"servers": ["10.10.10.10:80"],
"method": "manual",
"excludes": ["www.lge.com"]
}
Name | Required | Type | Description |
---|---|---|---|
method | Required | String | The method to get the actual system configuration for proxy servers. Possible values are:
|
url | Optional | String | Automatic proxy configuration URL. If no URL is specified, DHCP/WPAD auto-discover will be tried. If DHCP/WPAD auto-discover methods also fail, then method will be set to "direct". Note: Used when method is set to "auto". |
servers | Optional | String array | List of proxy URIs. An URI without a protocol will be interpreted as the generic proxy URI. Note: Used when method is set to "manual". |
excludes | Optional | String array | List of hosts which can be accessed directly. Note: Used when method is set to "manual". |
InterfaceMacInfo
Provides interfaces MAC address and name
Sample InterfaceMacinfo object :
{
"name":"eth0",
"macAddress":"DC:A6:32:AF:7C:3B"
}
Name | Required | Type | Description |
---|---|---|---|
name | Required | String | Name of the interface |
macAddress | Required | String | Mac address |
InterfaceInfo
This object provides detailed information about the interfaces details
Sample "InterfaceInfo" object :
{
"name" : "eth0",
"netmask": "255.255.255.0",
"dns1": "192.168.100.10",
"dns2": "8.8.8.8",
"ipAddress": "192.168.100.204",
"dns3": "8.8.4.4",
"onInternet": "yes",
"method": "dhcp",
"state": "connected",
"gateway": "192.168.100.1",
"interfaceName": "eth0",
"plugged": true,
"proxyInfo" :
{
"servers": ["10.10.10.10:80"],
"method": "manual",
"excludes": ["www.lge.com"]
}
"checkingInternet":false
}
Name | Required | Type | Description |
---|---|---|---|
checkingInternet | Required | Boolean | Indicates whether Internet checking is going on or not. |
dns | Optional | String array | List of IP Addreses of the DNS servers for this wired connection. |
gateway | Optional | String | The IP address of the network gateway. |
interfaceName | Optional | String | Name of the wired Interface name in use. For example, eth0. |
ipAddress | Optional | String | The IP address associated with the wired connection. |
method | Optional | String | If the IP address was assigned using the manual mode, method will contain Manual. |
netmask | Optional | String | The net mask value for the wired connection |
onInternet | Optional | String | The captive portal technique forces an HTTP client on a network to see a special web page (usually for authentication purposes) before using the Internet normally.
|
plugged | Required | Boolean | If Ethernet cable is plugged, plugged will contain true. |
proxyInfo | Optional | Object: proxyInfo | The actual system configuration of Proxy servers. |
state | Required | String | If the wired connection is available it will be set to connected. |
default | Optional | Boolean | This field will be present only with the default interface and its value will be true |
API Error Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
9 | Could not validate json message against schema | This message implies that there was an error because parameters passed to a method were not following the schema format. |