com.webos.service.connectionmanager

Note
This API has been available since API level 11.

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

ACG: networkconnection.query
  • Added: API level 11

Description

Provides the proxy server that was used to reach the target URL.

Parameters

Name

Required

Type

Description

urlRequiredString

The complete URL to be checked for proxy access.

hostRequiredString

The hostname component of a URL for convenience

Call Returns

Name

Required

Type

Description

proxyOptionalString

The proxy address for the target URL.

For example, "PROXY <proxy1>:1080". 

For directly connected sites, the value "DIRECT" is returned.

returnValueRequiredString

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
errorCodeOptionalString

The error code for the failed operation.

errorTextOptionalString

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

205Error 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
}

getStatus

ACG: networkconnection.query
  • Added: API level 11

Description

Provides the current status of Wi-Fi and wired network connections on the system.

Parameters

Name

Required

Type

Description

subscribeOptionalBoolean

Subscribe to this method to get notified on changes to the status of the network connection.

Possible values are:

  • true: Subscribed.
  • false (Default): Not subscribed.

Call Returns

Name

Required

Type

Description

isInternetConnectionAvailableRequiredBoolean

Indicates if internet connection is available. Possible values are:

  • true - Internet connection available
  • false - Internet connection is unavailable
wifiRequiredObject: wifi

Information about the Wi-Fi connection.

wiredRequiredObject: wired

Information about the wired connection.

offlineModeOptionalString

Indicates if the system is offline. Possible values are:

  • enabled - System is offline
  • disabled - System is online
subscribedRequiredBoolean

Indicates if subscribed to get notified on changes to the status of the network connection. Possible values are:

  • true - Subscribed for changes
  • false - Not subscribed
returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.

Subscription Returns

Name

Required

Type

Description

isInternetConnectionAvailableRequiredBoolean

Indicates if internet connection is available. Possible values are:

  • true - Internet connection available
  • false - Internet connection is unavailable
wifiRequiredObject: wifi

Information about the Wi-Fi connection.

wiredRequiredObject: wired

Information about the wired connection.

returnValueRequiredBoolean

Value is always true (since subscription is only displayed on successful operations).

subscribedRequiredBoolean

Indicates if subscribed to get notified on changes to the status of the network connection. Possible values are:

  • true - Subscribed for changes
  • false - Not subscribed

Error Codes Reference

Error Code

Error Text

Error Description

1Unknown error

Error when parsing the response JSON object.

4Connman 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
}

getinfo

ACG: networkconnection.query
  • Added: API level 11

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

subscribeOptionalBoolean

Subscribe to be notified of changes in interfaces.

Possible values are:

  • true: Subscribed.
  • false (Default): Not subscribed.

Call Returns

Name

Required

Type

Description

wifiInfoOptionalObject: wifiInfo

Information about the Wi-Fi interface.

wiredInfoOptionalObject: wiredInfo

Information about the wired interface. 

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
subscribedRequiredBoolean

Indicates if subscribed to get notified.

  • true - Subscribed for changes
  • false - Not subscribed

Subscription Returns

Name

Required

Type

Description

wifiInfoOptionalObject: wifiInfo

Information about the Wi-Fi interface.

wiredInfoOptionalObject: wiredInfo

Information about the wired interface. 

subscribedRequiredBoolean

Always true in case of subscription response.

returnValueRequiredBoolean

Always true in case of subscription response

Error Codes Reference

Error Code

Error Text

Error Description

1Unknown 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

ACG: networkconnection.query
Deprecated
  • Added: API level 23
  • Deprecated: API level 23

Description

This method is deprecated in favor of the getStatus() method. It is added only for backward compatibility.  

Note: Besides the method name, all other aspects of the method are identical to getStatus() method. Refer to getStatus for more information.

Parameters

None

Example

None

monitorActivity

ACG: networkconnection.management
  • Added: API level 27

Description

Monitors the data activity on the wired, Wi-Fi and WAN interfaces for bytes received or transmitted, errors, packets and dropped packets. A data counter will be started as soon as there is even a single subscriber and the counter will be stopped if the subscriber count drops to 0.

Parameters

Name

Required

Type

Description

subscribeRequiredBoolean

Indicates if subscribed to get the notifications.

Possible values are:

  • true: Subscribed for notifications.
  • false: Not subscribed

Note: This parameter needs to be set to true else the method will fail and return an error.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of the operation.

Possible values are:

  • true: Indicates that the operation was successful.
  • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
subscribedRequiredBoolean

Indicates if subscribed to get the notifications.

Possible values are:

  • true: Subscribed for notifications.
  • false: Not subscribed
sampleIntervalOptionalNumber

Indicates the time duration for sampling the data activity in msec.

wiredOptionalObject: dataStats

Indicates the data activity for the wired interface.

wifiOptionalObject: dataStats

Indicates the data activity for Wi-Fi interface.

Subscription Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of the operation.

Possible values are:

  • true: Indicates that the operation was successful.
  • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
subscribedRequiredBoolean

Indicates if subscribed to get the notifications.

Possible values are:

  • true: Subscribed for notifications.
  • false: Not subscribed
sampleIntervalOptionalNumber

The time duration for sampling data activity (in milliseconds).

wiredOptionalObject: dataStats

Indicates the data activity for the wired interface.

wifiOptionalObject: dataStats

Indicates the data activity for the Wi-Fi interface.

Error Codes Reference

Error Code

Error Text

Error Description

4Connman service unavailable

This message implies that there was an error because webos-connman-adapter was not able to communicate with the connman daemon.

129Subscription is mandatory

This message implies that there was an error because the subscribe parameter was set to false.

156Error in setting counter

This message implies that there was an error when creating a new counter object.

Example

Example code

# luna-send -i -f luna://com.webos.service.connectionmanager/monitorActivity '{
   "subscribe":true
}'

Response:

{
   "wired":{
      "txPackets":0,
      "rxPackets":0,
      "txErrors":0,
      "rxDropped":0,
      "rxBytes":0,
      "txBytes":0,
      "rxErrors":0,
      "txDropped":0
   },
   "sampleInterval":1000,
   "subscribed":true,
   "wan":{
      "txPackets":0,
      "rxPackets":0,
      "txErrors":0,
      "rxDropped":0,
      "rxBytes":0,
      "txBytes":0,
      "rxErrors":0,
      "txDropped":0
   },
   "wifi":{
      "txPackets":0,
      "rxPackets":0,
      "txErrors":0,
      "rxDropped":0,
      "rxBytes":0,
      "txBytes":0,
      "rxErrors":0,
      "txDropped":0
   },
   "returnValue":true
}

setDefaultInterface

ACG: networkconnection.management
  • Added: API level 13

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

ifNameRequiredString

Interface that is to be made as the default.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of the operation.

Possible values are:

  • true: Indicates that the operation was successful.
  • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation.

Error Codes Reference

Error Code

Error Text

Error Description

102Could 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.

301Invalid Interface

This message implies that there was an error because passed interface does not exist or interface state is not connected.

302Already 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
}

setProxy

ACG: networkconnection.management
  • Added: API level 11

Description

Specifies the proxy server for the network.

Parameters

Name

Required

Type

Description

methodRequiredString

The method to get the actual system configuration for proxy servers. Possible values are:

  • direct - Direct access. No proxy information required to be specified.
  • auto - Automatically configure the proxy. Uses the "url" parameter.
  • manual - Manually configure the proxy information. Uses the "servers" parameter and optionally the "excludes" parameter.
urlOptionalString

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".

serversOptionalString 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".

excludesOptionalString array

List of hosts which can be accessed directly. 

Note: Used when method is set to "manual".

ssidOptionalString

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

returnValueRequiredBoolean

Indicates the status of operation. 

Possible values are:

  • true: Successful.
  • false: Not successful. Check the method's 'Error Codes' section for failure details (errorCode and/or errorText).

Error Codes Reference

Error Code

Error Text

Error Description

1Unknown Error

Error in setting the proxy.

3Invalid parameters

Error because the "servers" parameter is mandatory if the method is "manual".

4Connman service unavailable

Error because webos-connman-adapter was not able to communicate with the connman daemon.

136No 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
}

setTechnologyState

ACG: networkconnection.management
  • Added: API level 11

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

enabledOptionalString array

List of technologies to enable. The array can contain: wifi, ethernet.

disabledOptionalString array

List of technologies to disable. The array can contain: wifi, ethernet.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. 

Possible values are:

  • true: Successful.
  • false: Not successful. Check the method's 'Error Codes' section for failure details (errorCode and/or errorText).

Error Codes Reference

Error Code

Error Text

Error Description

4Connman service unavailable

This message implies that there was an error because webos-connman-adapter was not able to communicate with the connman daemon.

163Failed 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.

181Not supported

This message implies that technology exists, but enabling or disabling it is not supported on this platform.
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.

Example

Example code

# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setTechnologyState '{"enabled":["wifi"]}'

Response:

{
    "returnValue": true
}

setdns

ACG: networkconnection.management
  • Added: API level 11

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

dnsRequiredString array

Contains the IP addresses of the DNS servers that need to be changed. 

ssidOptionalString

Indicates the SSID of the Wi-Fi connection to be modified.

interfaceNameOptionalString

Interface on which operation needs to be performed. If not provided operation will be performed on default interface

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. 

Possible values are:

  • true: Successful.
  • false: Not successful. Check the method's 'Error Codes' section for failure details (errorCode and/or errorText).

Error Codes Reference

Error Code

Error Text

Error Description

1Unknown error

This message implies that there was an error in setting the dns for the given network.

3Invalid parameters

This message implies that there was an error because one or more invalid ip addresses were passed in the dns parameter.

4Connection service unavailable

This message implies that there was an error because webos-connman-adapter was not able to talk to the connman daemon.

136No connected network

This message implies that there was an error because no network was found with the provided ssid.

301Invalid 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

ACG: networkconnection.management
  • Added: API level 11

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

methodRequiredString

Specifies the way the IPv4 parameter should be changed.

Possible values are: 

  • dhcp 
  • manual
addressOptionalString

If specified, sets a new IP address.

netmaskOptionalString

If specified, sets a new netmask.

gatewayOptionalString

If specified, sets a new gateway IP address.

ssidOptionalString

Specifies the Wi-Fi connection to modify. If absent, the wired connection is changed.

interfaceNameOptionalString

Interface on which operation needs to be performed. If not provided operation will be performed on default interface

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation.

Possible values are:

  • true: Successful.
  • false: Not successful. Check the method's 'Error Codes' section for failure details (errorCode and/or errorText).

Error Codes Reference

Error Code

Error Text

Error Description

1Unknown error

This message implies that there was an error in setting ipv4 parameters for the given network.

3Invalid parameters

This message implies that there was an error because of an invalid ip address value in the address, netmask or gateway parameters.

4Connman service unavailable

This message implies that there was an error because webos-connman-adapter was not able to talk to the connman daemon.

102Network not found

This message implies that there was an error because the network with the given ssid was not found.

301Invalid 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
}

Example scenario

# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setipv4 '{
    "ssid": "Connectivity",
    "method": "manual",
    "address": "192.168.1.42",
    "netmask": "255.255.255.0",
    "gateway": "192.168.1.1",
    "interfaceName" : "eth0"
}'

Response:

{
    "returnValue": true
}

setipv6

ACG: networkconnection.management
  • Added: API level 11

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

addressOptionalString

If specified, sets a new IP address.

Note: If method is set as "manual", the address field is mandatory.

gatewayOptionalString

If specified, sets a new gateway IP address.

methodRequiredString

The method parameter specifies the way the IPv4 parameter should be changed. The allowed values are: 

  • auto 
  • manual
prefixLengthOptionalNumber (int32_t)

If specified, sets the prefixLength for the IPv6 address.

ssidOptionalString

Specifies the Wi-Fi connection to modify. If absent, the wired connection is changed.

interfaceNameOptionalString

Interface on which operation needs to be performed. If not provided operation will be performed on default interface.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation.

Possible values are:

  • true: Successful.
  • false: Not successful. Check the method's 'Error Codes' section for failure details (errorCode and/or errorText).

Error Codes Reference

Error Code

Error Text

Error Description

1Unknown error

This message implies that there was an error in setting ipv6 parameters for the network with the given ssid.

3Invalid parameters

This message implies that there was an error because of an invalid ip address value in address or gateway.

4Connman service unavailable

This message implies that there was an error because webos-connman-adapter was not able to communicate with the connman daemon.

102Network not found

This message implies that there was an error because a network with the given ssid was not found.

301Invalid 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
}

setstate

ACG: networkconnection.management
  • Added: API level 11

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

wifiOptionalString

Set it to enabled to enable Wi-Fi.

Set it to disabled to disable Wi-Fi.

Any other value will result in an error.

wiredOptionalString

Set it to enabled to enable wired.

Set it to disabled to disable wired.

Any other value will lead to an error.

offlineModeOptionalString

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

returnValueRequiredBoolean

Indicates the status of operation. 

Possible values are:

  • true: Successful.
  • false: Not successful. Check the method's 'Error Codes' section for failure details (errorCode and/or errorText).

Error Codes Reference

Error Code

Error Text

Error Description

3Invalid 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.

4Connman 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

# luna-send -n 1 -f luna://com.webos.service.connectionmanager/setstate '{"wifi":"enabled"}'

{
    "returnValue": true
}

Objects

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

checkingInternetRequiredBoolean

Indicates whether Internet checking is going on or not.

dnsOptionalString array

List of IP Addreses of the DNS servers for this wired connection.

gatewayOptionalString

The IP address of the network gateway.

interfaceNameOptionalString

Name of the wired Interface name in use. For example, eth0.

ipAddressOptionalString

The IP address associated with the wired connection.

methodOptionalString

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.

netmaskOptionalString

The net mask value for the wired connection

onInternetOptionalString

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:

  • yes - indicating the Wired connection is connected to the Internet.
  • no - indicating the Wired connection is not connected to the Internet.
pluggedRequiredBoolean

If Ethernet cable is plugged, plugged will contain true.
If Ethernet cable is unplugged, plugged will contain false.

proxyInfoOptionalObject: proxyInfo

The actual system configuration of Proxy servers.

stateRequiredString

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.

defaultOptionalBoolean

This field will be present only with the default interface and its value will be true

InterfaceMacInfo

Provides interfaces MAC address and name

Sample InterfaceMacinfo object :

{

        "name":"eth0",

        "macAddress":"DC:A6:32:AF:7C:3B"

}

Name

Required

Type

Description

nameRequiredString

Name of the interface

macAddressRequiredString

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

interfaceRequiredString

Network interface to which this configuration is to be applied.

addressOptionalString

Address used for the configuration.

subnetRequiredString

Subnet mask.

gatewayRequiredString

Address of the network gateway.

dnsRequiredString 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

methodRequiredString

The method to get the actual system configuration for proxy servers. Possible values are:

  • direct - Direct access. No proxy information required to be specified.
  • auto - Automatically configure the proxy. Uses the "url" parameter.
  • manual - Manually configure the proxy information. Uses the "servers" parameter and optionally the "excludes" parameter.
urlOptionalString

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".

serversOptionalString 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".

excludesOptionalString array

List of hosts which can be accessed directly. 

Note: Used when method is set to "manual".

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

dnsOptionalString array

List of IP Addreses of the DNS servers for this Wi-Fi connection.

gatewayOptionalString

The IP address of the network gateway.

interfaceNameOptionalString

Name of the Wi-Fi Interface name in use. For example, wlan0.

ipAddressOptionalString

The IP address associated with the Wi-Fi connection.

methodOptionalString

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.

netmaskOptionalString

The net mask value for the Wi-Fi connection.

onInternetOptionalString

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:

  • yes - indicating the Wi-Fi connection is connected to the Internet.
  • no - indicating the Wi-Fi connection is not connected to the Internet.
ssidOptionalString

The SSID of the connected service (if known).

stateRequiredString

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.

proxyInfoOptionalObject: 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

macAddressRequiredString

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

dnsOptionalString array

List of IP Addreses of the DNS servers for this wired connection.

gatewayOptionalString

The IP address of the network gateway.

interfaceNameOptionalString

Name of the wired Interface name in use. For example, eth0.

ipAddressOptionalString

The IP address associated with the wired connection.

methodOptionalString

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.

netmaskOptionalString

The net mask value for the wired connection.

pluggedRequiredBoolean

If Ethernet cable is plugged, plugged will contain true.

If Ethernet cable is unplugged, plugged will contain false.

onInternetOptionalString

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:

  • yes - indicating the Wired connection is connected to the Internet.
  • no - indicating the Wired connection is not connected to the Internet.
stateRequiredString

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.

    proxyInfoOptionalObject: proxyInfo

    The actual system configuration of Proxy servers.

    interfacesRequiredObject array: InterfaceInfo

    Information about the interfaces

    wiredInfo

    The object containing the MAC address of the wired interface.

    Name

    Required

    Type

    Description

    macAddressRequiredStringMAC address of wired interface
    interfacesRequiredObject array: InterfaceMacInfo

    Information about the interfaces and its MAC address

    API Error Codes Reference

    Error Code

    Error Text

    Error Description

    9Could 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.

    Contents