• Quick Start
  • Booting
  • Platform
  • Portals
  • References
    • API Reference TOI3
    • IIP Reference
  • Resources
ARRIS Enterprises, Inc. Confidential Information

ToiNetwork

Class Summary

Extends:
  • ToiEventTarget

This interface represents a logical network. A logical network encapsulates a network interface and settings used to configure the network interface and the system's network-related properties such as DNS and routes.

  • Methods
  • Members
  • Types
  • Events

Method Summary

applySettings ( callbacks , settings )  → operation Apply the provided settings.
getConnectedAccessPointInfo ( )  → apInfo

Returns the currently connected access point.

getNetworkInfo ( )  → networkInfo Returns the current network info.
getSettings ( )  → settings

Returns the network settings.

scanWifi ( callbacks , ssid )  → operation

This asynchronous method scans for available APs.

Inherited Methods

addEventListener ( type , listener )

This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.

removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Type Definitions

ToiAddressAcquisitionMethod (Type: enum)

The IP address acquisition method.

  • ADDRESS_ACQUISITION_DHCP
  • ADDRESS_ACQUISITION_DHCP_IPV4
  • ADDRESS_ACQUISITION_DHCP_IPV6
  • ADDRESS_ACQUISITION_NONE
ToiAddressScope (Type: enum)

Specifies the address scope where this network's IP address is valid.

  • ADDRESS_SCOPE_GLOBAL
  • ADDRESS_SCOPE_HOST
  • ADDRESS_SCOPE_LINK
  • ADDRESS_SCOPE_SITE
ToiDeviceFeature (Type: enum)

Specifies the availability of a particular feature for a device.

  • DEVICE_FEATURE_AUTO_NEGOTIATE
  • DEVICE_FEATURE_FLOW_CONTROL
  • DEVICE_FEATURE_JUMBO_PACKET
  • DEVICE_FEATURE_WAKE_ON_LAN
ToiDeviceSelection (Type: enum)

Controls the type of device that will be used by a network.

  • DEVICE_SELECTION_AUTO
  • DEVICE_SELECTION_ETHERNET
  • DEVICE_SELECTION_WIFI
ToiDuplexMode (Type: enum)

Specifies whether the device can handle full-duplex or half-duplex mode.

  • DUPLEX_MODE_FULL
  • DUPLEX_MODE_HALF
  • DUPLEX_MODE_UNKNOWN
ToiInterfaceType (Type: enum)
  • INTERFACE_TYPE_ETHERNET
  • INTERFACE_TYPE_WIFI
ToiIpVersion (Type: enum)

Specifies the IP version.

  • IP_VERSION_V4
  • IP_VERSION_V6
ToiNameServer (Type: string)

DNS name server IP address.

ToiSearchPath (Type: string)

Desired domain search path.

ToiState (Type: enum)

Specifies the network state.

  • STATE_DISABLED
  • STATE_FAILED
  • STATE_READY
  • STATE_WAITING
ToiWifiAuthenticationType (Type: enum)

Wi-Fi authentication types.

Note: This enum is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

  • WIFI_AUTHENTICATION_TYPE_OPEN
  • WIFI_AUTHENTICATION_TYPE_SHARED
  • WIFI_AUTHENTICATION_TYPE_UNSUPPORTED
  • WIFI_AUTHENTICATION_TYPE_WPA2_PSK
  • WIFI_AUTHENTICATION_TYPE_WPA_PSK
  • WIFI_AUTHENTICATION_TYPE_WPS
ToiWifiBand (Type: enum)

Wi-Fi radio band.

  • WIFI_BAND_2G
  • WIFI_BAND_5G
ToiWifiEncryptionType (Type: enum)

Wi-Fi encryption methods.

Note: This enum is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

  • WIFI_ENCRYPTION_TYPE_AES_CCMP
  • WIFI_ENCRYPTION_TYPE_NONE
  • WIFI_ENCRYPTION_TYPE_TKIP
  • WIFI_ENCRYPTION_TYPE_UNSUPPORTED
  • WIFI_ENCRYPTION_TYPE_WEP
ToiWifiEvent (Type: enum)

Wi-Fi events.

  • WIFI_CONNECTED
  • WIFI_CONNECTING
  • WIFI_DISCONNECTED
  • WIFI_FAILED_AP_AUTH
  • WIFI_FAILED_AP_UNAVAILABLE
  • WIFI_FAILED_INTERNAL
  • WIFI_FAILED_WPS_CONNECTION_TIMEOUT
  • WIFI_FAILED_WPS_MULTIPLE_AP_ACTIVE
  • WIFI_WPS_HANDSHAKE_COMPLETED
  • WIFI_WPS_PAIRING
  • WIFI_WPS_SCANNING_COMPLETED
ToiWifiMode (Type: enum)

Wi-Fi modes.

  • WIFI_MODE_802_11A
  • WIFI_MODE_802_11AC
  • WIFI_MODE_802_11B
  • WIFI_MODE_802_11G
  • WIFI_MODE_802_11N
  • WIFI_MODE_AUTO
ToiWifiSecurity (Type: enum)

Wi-Fi security methods.

This enum contains the available security combinations. Each name is formatted as WIFISECURITY<link authentication>[<security protocol><encryption>]. (Link authentication is a legacy term that only has any meaning when using WEP. It is not authentication in the modern sense of the word.)

  • WIFI_SECURITY_AUTO
  • WIFI_SECURITY_NONE
  • WIFI_SECURITY_OPEN_WEP
  • WIFI_SECURITY_OPEN_WPA2_PSK_CCMP
  • WIFI_SECURITY_OPEN_WPA2_PSK_TKIP
  • WIFI_SECURITY_OPEN_WPA_PSK_TKIP
  • WIFI_SECURITY_SHARED_WEP
  • WIFI_SECURITY_WPS

Events

  • ON_NETWORK_INFO_CHANGED
  • ON_WIFI_CHANGED

Methods

addEventListener ( type , listener )

This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.

Inherited From:

  • ToiEventTarget#addEventListener

Parameters:

Name Type Description
type number

The event type of the event to subscribe to.

listener ToiEventListener

The JavaScript function that will receive events.

Throws:

ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice.

applySettings ( callbacks , settings )  → operation

This method applies the provided network settings. It is possible to omit optional properties in which case those settings will remain unchanged. The method may fail and throw an exception if the provided settings do not lie within the network's capabilities. Besides this, the method will always succeed. Waiting for the asynchonous callback does not guarantee that any settings have been applied.

Note that a network's settings are applied in many other places besides calls to this method, for example when the box is booting or when link status changes. Because of this, the network's state is the only safe way to detect failures to apply the settings since it may depend on external factors.

Parameters:

Name Type Description
callbacks AsyncCallback

Object with callback functions for the asynchronous operation. No result is produced by this method, so callbacks.onResult() will not be invoked.

settings ToiNetwork.ToiSettings

A set of network settings to apply.

Throws:

ToiInvalidArgumentException

Raised if an invalid operation identifier was passed or if the provided settings do not lie within the network's capabilities.

Returns:

operation The asynchronous operation created by the function.

Type: ToiAsynchronousOperation
getConnectedAccessPointInfo ( )  → apInfo

Returns the currently connected access point.

Throws:

ToiInvalidPreconditionException

Raised if the Wi-Fi interface is not enabled or if the Wi-Fi device is not up.

Returns:

Access point information.

Type: ToiNetwork.ToiWifiAccessPointInfo
getNetworkInfo ( )  → networkInfo

This method returns the current status of the network.

Returns:

The current network info.

Type: ToiNetwork.ToiInformation
getSettings ( )  → settings

Returns the network settings.

Returns:

The current network settings for this network.

Type: ToiNetwork.ToiSettings
removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Inherited From:

  • ToiEventTarget#removeEventListener

Parameters:

Name Type Description
type number

The event type of the event to remove the listener from.

listener ToiEventListener

The JavaScript function that was previously added as an event listener.

Throws:

ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener has not previously been added.

scanWifi ( callbacks , ssid )  → operation

This asynchronous method scans for available APs.

Parameters:

Name Type Description
callbacks AsyncCallback

Object with callback functions for the asynchronous operation. The callbacks.onResult() will be invoked with any incremental results of type Array.<ToiNetwork.ToiWifiAccessPointInfo>. The final and accumulated result will be available as the property 'result' in the operation object after callbacks.onCompleted() has been invoked.

ssid
[optional]
string

The network name to scan for. Setting this parameter has no effect; all APs will be passively scanned.

Throws:

ToiInvalidArgumentException

Raised if an invalid operation identifier passed.

ToiBusyException

Raised if a scan already in progress.

ToiInvalidPreconditionException

Raised if the Wi-Fi interface is not enabled or if the Wi-Fi device is not up.

Returns:

operation The asynchronous operation created by the function.

Type: ToiAsynchronousOperation

Members

ON_NETWORK_INFO_CHANGED (Type: ToiNetworkNetworkInfoChangedEvent) (value = 4500) (static, constant)

This is an Event identifier for ToiNetworkNetworkInfoChangedEvent.

Called when the network's info changes.

This constant can be also be accessed from toi.consts.ToiNetwork.ON_NETWORK_INFO_CHANGED.
ON_WIFI_CHANGED (Type: ToiNetworkWifiChangedEvent) (value = 4501) (static, constant)

This is an Event identifier for ToiNetworkWifiChangedEvent.

Called when something happens to the wifi network.

This constant can be also be accessed from toi.consts.ToiNetwork.ON_WIFI_CHANGED.
ADDRESS_ACQUISITION_DHCP (Type: ToiNetwork.ToiAddressAcquisitionMethod) (value = 1) (static, constant)

Acquire both IPv4 and IPv6 addresses via DHCP.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_ACQUISITION_DHCP.
ADDRESS_ACQUISITION_DHCP_IPV4 (Type: ToiNetwork.ToiAddressAcquisitionMethod) (value = 2) (static, constant)

Acquire only IPv4 address via DHCP.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_ACQUISITION_DHCP_IPV4.
ADDRESS_ACQUISITION_DHCP_IPV6 (Type: ToiNetwork.ToiAddressAcquisitionMethod) (value = 3) (static, constant)

Acquire only IPv6 address via DHCP.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_ACQUISITION_DHCP_IPV6.
ADDRESS_ACQUISITION_NONE (Type: ToiNetwork.ToiAddressAcquisitionMethod) (value = 0) (static, constant)

Disable any automatic address acquisition and instead use static settings.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_ACQUISITION_NONE.
ADDRESS_SCOPE_GLOBAL (Type: ToiNetwork.ToiAddressScope) (value = 3) (static, constant)

The address is globally valid.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_SCOPE_GLOBAL.
ADDRESS_SCOPE_HOST (Type: ToiNetwork.ToiAddressScope) (value = 0) (static, constant)

The address is only valid on this host.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_SCOPE_HOST.
ADDRESS_SCOPE_LINK (Type: ToiNetwork.ToiAddressScope) (value = 1) (static, constant)

The address is only valid for use on the local network.

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_SCOPE_LINK.
ADDRESS_SCOPE_SITE (Type: ToiNetwork.ToiAddressScope) (value = 2) (static, constant)

(IPV6 only) The address is only valid for use on this site. (Deprecated in RFC 4291, should be treated as global.)

This constant can be also be accessed from toi.consts.ToiNetwork.ADDRESS_SCOPE_SITE.
DEVICE_FEATURE_AUTO_NEGOTIATE (Type: ToiNetwork.ToiDeviceFeature) (value = 4) (static, constant)

Indicates whether auto negotiation is enabled.

This constant can be also be accessed from toi.consts.ToiNetwork.DEVICE_FEATURE_AUTO_NEGOTIATE.
DEVICE_FEATURE_FLOW_CONTROL (Type: ToiNetwork.ToiDeviceFeature) (value = 1) (static, constant)

Indicates whether flow control is enabled.

This constant can be also be accessed from toi.consts.ToiNetwork.DEVICE_FEATURE_FLOW_CONTROL.
DEVICE_FEATURE_JUMBO_PACKET (Type: ToiNetwork.ToiDeviceFeature) (value = 2) (static, constant)

Indicates whether jumbo packets are enabled.

This constant can be also be accessed from toi.consts.ToiNetwork.DEVICE_FEATURE_JUMBO_PACKET.
DEVICE_FEATURE_WAKE_ON_LAN (Type: ToiNetwork.ToiDeviceFeature) (value = 8) (static, constant)

Indicates whether the WOL feature is enabled.

This constant can be also be accessed from toi.consts.ToiNetwork.DEVICE_FEATURE_WAKE_ON_LAN.
DEVICE_SELECTION_AUTO (Type: ToiNetwork.ToiDeviceSelection) (value = 2) (static, constant)

Instructs the network to choose device automatically at boot. Runtime auto selection is not supported.

This constant can be also be accessed from toi.consts.ToiNetwork.DEVICE_SELECTION_AUTO.
DEVICE_SELECTION_ETHERNET (Type: ToiNetwork.ToiDeviceSelection) (value = 0) (static, constant)

Instructs the network that Ethernet should be used.

This constant can be also be accessed from toi.consts.ToiNetwork.DEVICE_SELECTION_ETHERNET.
DEVICE_SELECTION_WIFI (Type: ToiNetwork.ToiDeviceSelection) (value = 1) (static, constant)

Instructs the network that Wi-Fi should be used.

This constant can be also be accessed from toi.consts.ToiNetwork.DEVICE_SELECTION_WIFI.
DUPLEX_MODE_FULL (Type: ToiNetwork.ToiDuplexMode) (value = 2) (static, constant)

Specifies full-duplex mode.

This constant can be also be accessed from toi.consts.ToiNetwork.DUPLEX_MODE_FULL.
DUPLEX_MODE_HALF (Type: ToiNetwork.ToiDuplexMode) (value = 1) (static, constant)

Specifies half-duplex mode.

This constant can be also be accessed from toi.consts.ToiNetwork.DUPLEX_MODE_HALF.
DUPLEX_MODE_UNKNOWN (Type: ToiNetwork.ToiDuplexMode) (value = 0) (static, constant)

Specifies that the duplex mode is unknown.

This constant can be also be accessed from toi.consts.ToiNetwork.DUPLEX_MODE_UNKNOWN.
INTERFACE_TYPE_ETHERNET (Type: ToiNetwork.ToiInterfaceType) (value = 0) (static, constant)

The interface is of Ethernet type.

This constant can be also be accessed from toi.consts.ToiNetwork.INTERFACE_TYPE_ETHERNET.
INTERFACE_TYPE_WIFI (Type: ToiNetwork.ToiInterfaceType) (value = 1) (static, constant)

The interface is of Wi-Fi type.

This constant can be also be accessed from toi.consts.ToiNetwork.INTERFACE_TYPE_WIFI.
IP_VERSION_V4 (Type: ToiNetwork.ToiIpVersion) (value = 0) (static, constant)

IP version 4, implies the InterNetwork address family.

This constant can be also be accessed from toi.consts.ToiNetwork.IP_VERSION_V4.
IP_VERSION_V6 (Type: ToiNetwork.ToiIpVersion) (value = 1) (static, constant)

IP version 6, implies the InterNetwork6 address family.

This constant can be also be accessed from toi.consts.ToiNetwork.IP_VERSION_V6.
STATE_DISABLED (Type: ToiNetwork.ToiState) (value = 0) (static, constant)

The network is currently not managed by the platform.

This constant can be also be accessed from toi.consts.ToiNetwork.STATE_DISABLED.
STATE_FAILED (Type: ToiNetwork.ToiState) (value = 2) (static, constant)

The provided settings could not be used to establish a network connection. New settings need to be provided.

This constant can be also be accessed from toi.consts.ToiNetwork.STATE_FAILED.
STATE_READY (Type: ToiNetwork.ToiState) (value = 3) (static, constant)

The network has been successfully configured and is ready to be used.

This constant can be also be accessed from toi.consts.ToiNetwork.STATE_READY.
STATE_WAITING (Type: ToiNetwork.ToiState) (value = 1) (static, constant)

The network is currently applying its settings.

This constant can be also be accessed from toi.consts.ToiNetwork.STATE_WAITING.
WIFI_AUTHENTICATION_TYPE_OPEN (Type: ToiNetwork.ToiWifiAuthenticationType) (value = 1) (static, constant)

Designates the open authentication method.

Note: ToiNetwork.ToiWifiAuthenticationType is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_AUTHENTICATION_TYPE_OPEN.
WIFI_AUTHENTICATION_TYPE_SHARED (Type: ToiNetwork.ToiWifiAuthenticationType) (value = 2) (static, constant)

Designates the shared authentication method. Deprecated in 802.11-2012 and should only be used for backward compatibility.

Note: ToiNetwork.ToiWifiAuthenticationType is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_AUTHENTICATION_TYPE_SHARED.
WIFI_AUTHENTICATION_TYPE_UNSUPPORTED (Type: ToiNetwork.ToiWifiAuthenticationType) (value = 0) (static, constant)

Designates an unsupported authentication method.

Note: ToiNetwork.ToiWifiAuthenticationType is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_AUTHENTICATION_TYPE_UNSUPPORTED.
WIFI_AUTHENTICATION_TYPE_WPA2_PSK (Type: ToiNetwork.ToiWifiAuthenticationType) (value = 8) (static, constant)

Designates WPA2 authentication with a pre-shared key. Can be combined with ToiNetwork.WIFI_ENCRYPTION_TYPE_TKIP or ToiNetwork.WIFI_ENCRYPTION_TYPE_AES_CCMP.

Note: ToiNetwork.ToiWifiAuthenticationType is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_AUTHENTICATION_TYPE_WPA2_PSK.
WIFI_AUTHENTICATION_TYPE_WPA_PSK (Type: ToiNetwork.ToiWifiAuthenticationType) (value = 4) (static, constant)

Designates WPA authentication with a pre-shared key. Can be combined with ToiNetwork.WIFI_ENCRYPTION_TYPE_TKIP or ToiNetwork.WIFI_ENCRYPTION_TYPE_AES_CCMP.

Note: ToiNetwork.ToiWifiAuthenticationType is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_AUTHENTICATION_TYPE_WPA_PSK.
WIFI_AUTHENTICATION_TYPE_WPS (Type: ToiNetwork.ToiWifiAuthenticationType) (value = 16) (static, constant)

Designates WPS authentication. Encryption type is ignored with this type of authentication.

Note: ToiNetwork.ToiWifiAuthenticationType is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_AUTHENTICATION_TYPE_WPS.
WIFI_BAND_2G (Type: ToiNetwork.ToiWifiBand) (value = 0) (static, constant)

Designates the 2.4 GHz band.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_BAND_2G.
WIFI_BAND_5G (Type: ToiNetwork.ToiWifiBand) (value = 1) (static, constant)

Designates the 5 GHz band.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_BAND_5G.
WIFI_CONNECTED (Type: ToiNetwork.ToiWifiEvent) (value = 4) (static, constant)

Wi-Fi link to the AP is established.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_CONNECTED.
WIFI_CONNECTING (Type: ToiNetwork.ToiWifiEvent) (value = 3) (static, constant)

Wi-Fi adapter is connecting to the AP.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_CONNECTING.
WIFI_DISCONNECTED (Type: ToiNetwork.ToiWifiEvent) (value = 5) (static, constant)

Wi-Fi link is lost.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_DISCONNECTED.
WIFI_ENCRYPTION_TYPE_AES_CCMP (Type: ToiNetwork.ToiWifiEncryptionType) (value = 8) (static, constant)

Designates AES CCMP-style encryption.

Note: ToiNetwork.ToiWifiEncryptionType is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_ENCRYPTION_TYPE_AES_CCMP.
WIFI_ENCRYPTION_TYPE_NONE (Type: ToiNetwork.ToiWifiEncryptionType) (value = 1) (static, constant)

Encryption not used.

Note: ToiNetwork.ToiWifiEncryptionType is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_ENCRYPTION_TYPE_NONE.
WIFI_ENCRYPTION_TYPE_TKIP (Type: ToiNetwork.ToiWifiEncryptionType) (value = 4) (static, constant)

Designates TKIP-style encryption.

Note: ToiNetwork.ToiWifiEncryptionType is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_ENCRYPTION_TYPE_TKIP.
WIFI_ENCRYPTION_TYPE_UNSUPPORTED (Type: ToiNetwork.ToiWifiEncryptionType) (value = 0) (static, constant)

Designates an unsupported encryption method.

Note: ToiNetwork.ToiWifiEncryptionType is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_ENCRYPTION_TYPE_UNSUPPORTED.
WIFI_ENCRYPTION_TYPE_WEP (Type: ToiNetwork.ToiWifiEncryptionType) (value = 2) (static, constant)

Designates WEP-style encryption. Only available together with ToiNetwork.WIFI_AUTHENTICATION_TYPE_SHARED.

Note: ToiNetwork.ToiWifiEncryptionType is deprecated and has been replaced by ToiNetwork.ToiWifiSecurity.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_ENCRYPTION_TYPE_WEP.
WIFI_FAILED_AP_AUTH (Type: ToiNetwork.ToiWifiEvent) (value = 6) (static, constant)

Wi-Fi connection failed, bad authentication.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_FAILED_AP_AUTH.
WIFI_FAILED_AP_UNAVAILABLE (Type: ToiNetwork.ToiWifiEvent) (value = 7) (static, constant)

Wi-Fi connection failed, AP unavailable.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_FAILED_AP_UNAVAILABLE.
WIFI_FAILED_INTERNAL (Type: ToiNetwork.ToiWifiEvent) (value = 8) (static, constant)

Wi-Fi connection failed due to internal error.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_FAILED_INTERNAL.
WIFI_FAILED_WPS_CONNECTION_TIMEOUT (Type: ToiNetwork.ToiWifiEvent) (value = 10) (static, constant)

Wi-Fi connection failed, time out.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_FAILED_WPS_CONNECTION_TIMEOUT.
WIFI_FAILED_WPS_MULTIPLE_AP_ACTIVE (Type: ToiNetwork.ToiWifiEvent) (value = 9) (static, constant)

Wi-Fi connection failed, several APs with WPS active at the same time.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_FAILED_WPS_MULTIPLE_AP_ACTIVE.
WIFI_MODE_802_11A (Type: ToiNetwork.ToiWifiMode) (value = 1) (static, constant)

802.11A

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_MODE_802_11A.
WIFI_MODE_802_11AC (Type: ToiNetwork.ToiWifiMode) (value = 16) (static, constant)

802.11AC

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_MODE_802_11AC.
WIFI_MODE_802_11B (Type: ToiNetwork.ToiWifiMode) (value = 2) (static, constant)

802.11B

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_MODE_802_11B.
WIFI_MODE_802_11G (Type: ToiNetwork.ToiWifiMode) (value = 4) (static, constant)

802.11G

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_MODE_802_11G.
WIFI_MODE_802_11N (Type: ToiNetwork.ToiWifiMode) (value = 8) (static, constant)

802.11N

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_MODE_802_11N.
WIFI_MODE_AUTO (Type: ToiNetwork.ToiWifiMode) (value = 32) (static, constant)

Automatic choice of mode.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_MODE_AUTO.
WIFI_SECURITY_AUTO (Type: ToiNetwork.ToiWifiSecurity) (value = 1) (static, constant)

Instructs the network to choose security method automatically.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_SECURITY_AUTO.
WIFI_SECURITY_NONE (Type: ToiNetwork.ToiWifiSecurity) (value = 128) (static, constant)

Allow unauthenticated/unencrypted Wi-Fi.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_SECURITY_NONE.
WIFI_SECURITY_OPEN_WEP (Type: ToiNetwork.ToiWifiSecurity) (value = 16) (static, constant)

Allow WEP with open system authentication.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_SECURITY_OPEN_WEP.
WIFI_SECURITY_OPEN_WPA2_PSK_CCMP (Type: ToiNetwork.ToiWifiSecurity) (value = 8) (static, constant)

Allow WPA2 with pre-shared key using the CCMP protocol.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_SECURITY_OPEN_WPA2_PSK_CCMP.
WIFI_SECURITY_OPEN_WPA2_PSK_TKIP (Type: ToiNetwork.ToiWifiSecurity) (value = 4) (static, constant)

Allow WPA2 with pre-shared key using the TKIP protocol.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_SECURITY_OPEN_WPA2_PSK_TKIP.
WIFI_SECURITY_OPEN_WPA_PSK_TKIP (Type: ToiNetwork.ToiWifiSecurity) (value = 2) (static, constant)

Allow WPA with pre-shared key using the TKIP protocol.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_SECURITY_OPEN_WPA_PSK_TKIP.
WIFI_SECURITY_SHARED_WEP (Type: ToiNetwork.ToiWifiSecurity) (value = 32) (static, constant)

Allow WEP with shared key authentication.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_SECURITY_SHARED_WEP.
WIFI_SECURITY_WPS (Type: ToiNetwork.ToiWifiSecurity) (value = 64) (static, constant)

Allow WPS.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_SECURITY_WPS.
WIFI_WPS_HANDSHAKE_COMPLETED (Type: ToiNetwork.ToiWifiEvent) (value = 2) (static, constant)

Wi-Fi adapter has finished handshaking.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_WPS_HANDSHAKE_COMPLETED.
WIFI_WPS_PAIRING (Type: ToiNetwork.ToiWifiEvent) (value = 0) (static, constant)

Wi-Fi adapter is in pairing mode.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_WPS_PAIRING.
WIFI_WPS_SCANNING_COMPLETED (Type: ToiNetwork.ToiWifiEvent) (value = 1) (static, constant)

Wi-Fi adapter has finished scanning.

This constant can be also be accessed from toi.consts.ToiNetwork.WIFI_WPS_SCANNING_COMPLETED.
ToiCapabilities (Type: struct) (static)

Specifies a network's capabilities.

Struct fields

Name Description
hasIpv6

IPv6 support.

Type: boolean
hasWifi

Indicates whether the network has access to a Wi-Fi enabled device.

Type: boolean
isConfigurable

A configurable network allows changes to its settings.

Type: boolean
isIpRequired

Indicates whether at least one IP address is required (static or dynamic). If the address acquisition method is none then there must be at least one static IP address configured.

Type: boolean
maxAddressEntries

Maximum number of IP address entries.

Type: number
maxDnsEntries

Maximum number of DNS entries.

Type: number
maxRouteEntries

Maximum number of route entries (i.e. default gateways).

Type: number
supportedWifiSecurity

The supported Wi-Fi security protocols as a bitmask of ToiNetwork.ToiWifiSecurity values.

Type: number

ToiDhcpInfo (Type: struct) (static)

Specifies DHCP related information about a network.

Struct fields

Name Description
leaseRemainingTime

Remaining time in seconds of the IP address lease.

Type: number
leaseTime

IP address lease time in seconds.

Type: number
renewalAttemptCount

Number of renewal attempts.

Type: number
renewalSuccessCount

Number of successful renewal attempts.

Type: number
serverIpAddress
[optional]

IP address of DHCP server.

Type: string

ToiDnsInfo (Type: struct) (static)

Specifies static DNS info for a network.

Struct fields

Name Description
nameServers

A list of DNS name server IP addresses (strings). This can be both IPv4 and IPv6 addresses.

Type: Array.<ToiNetwork.ToiNameServer>
searchPaths

A list of DNS search paths (strings). Note that search path settings are not persistent across reboots.

Type: Array.<ToiNetwork.ToiSearchPath>

ToiInformation (Type: struct) (static)

Describes the current status of the network.

Struct fields

Name Description
capabilities

Specifies the network's capabilities. This determines if and how the network can be configured and used.

Type: ToiNetwork.ToiCapabilities
dnsInfo

The current DNS info.

Type: ToiNetwork.ToiDnsInfo
interfaceInfo

The current interface info, such as IP address, statistics and more.

Type: ToiNetwork.ToiInterfaceInfo
routes

The network's routes.

Type: Array.<ToiNetwork.ToiRoute>
state

The current network state indicating whether the network is ready to be used.

Type: ToiNetwork.ToiState

ToiInterfaceInfo (Type: struct) (static)

Struct fields

Name Description
duplexMode

Specifies the duplex mode used by the device.

Type: ToiNetwork.ToiDuplexMode
features

A bit mask defined in ToiNetwork.ToiDeviceFeature specifying which features are available on the device.

Type: number
hasLink

Indicates whether the interface has link.

Type: boolean
ipAddresses

IP addresses associated with this interface.

Type: Array.<ToiNetwork.ToiIpAddressInfo>
linkSpeed

The negotiated link speed in Mbit/s.

Type: number
mac

The hardware address (MAC).

Type: string
name

The interface's name.

Type: string
statistics

The interface statistics.

Type: ToiNetwork.ToiInterfaceStatistics
type

The interface type (Ethernet or Wi-Fi).

Type: ToiNetwork.ToiInterfaceType
wifiInfo
[optional]

Wi-Fi specific interface information.

Type: ToiNetwork.ToiInterfaceWifiInfo

ToiInterfaceStatistics (Type: struct) (static)

Network interface statistics.

Struct fields

Name Description
broadcastPacketsReceived

The total number of broadcast packets received on the device (IPv4 only).

Type: number
broadcastPacketsSent

The total number of broadcast packets transmitted out of the device (IPv4 only).

Type: number
bytesReceived

The total number of bytes received on the device.

Type: number
bytesSent

The total number of bytes transmitted out of the device.

Type: number
connectivityLossCount

The count of phy layer loss since last reboot.

Type: number
discardPacketsReceived

The total number of unicast packets received on the device.

Type: number
discardPacketsSent

The total number of discard packets transmitted out of the device.

Type: number
errorsReceived

The total number of packets that could not be received on the device by the higher-layer protocol due to errors.

Type: number
errorsSent

The total number of packets that could not be transmitted out of the device due to errors.

Type: number
multicastPacketsReceived

The total number of multicast packets received on the device.

Type: number
multicastPacketsSent

The total number of multicast packets transmitted out of the device.

Type: number
packetsReceived

The total number of packets received on the device.

Type: number
packetsSent

The total number of packets transmitted out of the device.

Type: number
unicastPacketsReceived

The total number of unicast packets received on the device.

Type: number
unicastPacketsSent

The total number of unicast packets transmitted out of the device.

Type: number
unknownProtoPacketsReceived

The total number of packets received on the device which are discarded because of an unknown or unsupported protocol.

Type: number

ToiInterfaceWifiInfo (Type: struct) (static)

Struct fields

Name Description
channelBandwidth

Max channel bandwidth.

Type: number
regulatoryDomain

The regulatory domain used by the interface.

Type: string
state

The last Wi-Fi state event reported.

Type: ToiNetwork.ToiWifiEvent
wifiStatistics

Wi-Fi related interface statistics.

Type: ToiNetwork.ToiInterfaceWifiStatistics

ToiInterfaceWifiStatistics (Type: struct) (static)

Struct fields

Name Description
measuredRate

Measured bit rate at the Wi-Fi interface in MiB/s.

Note: This field is deprecated. Use ToiInterfaceStatistics instead.

Type: number
retransmissionCount

Number of retransmissions. Not necessarily the same as the number of dropped packets which is an IP metric.

Type: number
signalNoiseRatio

Signal-to-noise ratio in tenths of a dB, i.e. the value 251 means 25.1 dB. When the receiver does not have channel lock this value is -1.

Type: number

ToiIpAddress (Type: struct) (static)

Describes an IP network address used for a network's static IP settings.

Struct fields

Name Description
ipAddress

An IPv4 or IPv6 address (not including netmask/routing prefix).

Type: string
label
[optional]

An address label used to identify the address. This label will be appended to the real interface address label after the interface name.

Type: string
netmask

A netmask to use for subnetting. Can be specified using either dot-decimal or CIDR notation (e.g. 255.255.255.0 or /24).

Type: string

ToiIpAddressInfo (Type: struct) (static)

Specifies an IP address. This can be an IP assigned by a DHCP server in which case the DHCP client status can be retrieved from this structure.

Struct fields

Name Description
addressScope

The address scope of the address of this network. This controls where this address is valid.

Type: ToiNetwork.ToiAddressScope
dhcpInfo
[optional]

The current status of the DHCP client. The value will be undefined if this IP was not acquired by DHCP.

Type: ToiNetwork.ToiDhcpInfo
ipAddress

The IP address.

Type: string
ipVersion

The IP address version.

Type: ToiNetwork.ToiIpVersion
netmask

The netmask in dot-decimal notation (e.g. 255.255.255.0).

Type: string

ToiRoute (Type: struct) (static)

This data type defines a default network route.

Struct fields

Name Description
gateway

The IP address of the gateway. This can be either an IPv4 or IPv6 address.

Type: string

ToiSettings (Type: struct) (static)

This data type contains permanent network settings used to configure the underlying network interface and network-related tables and tools.

Struct fields

Name Description
addressAcquisitionMethod
[optional]

The acquisition method specifies how network addresses are acquired. They are usually acquired from a DHCP server, including IP address, DNS paths and default gateway.

Type: ToiNetwork.ToiAddressAcquisitionMethod
deviceSelection
[optional]

The type of device that should be used.

Type: ToiNetwork.ToiDeviceSelection
staticSettings
[optional]

The network may contain static configuration, not obtained from a DHCP server. This includes static IP addresses, DNS and routing information such as default gateway. Note that static settings can be used together with DHCP.

Type: ToiNetwork.ToiStaticSettings
wifiSettings
[optional]

The Wi-Fi settings property includes Wi-Fi related settings only applicable for networks using a Wi-Fi network interface adapter.

Type: ToiNetwork.ToiWifiSettings

ToiStaticSettings (Type: struct) (static)

This data type specifies all the available static settings for a network. Note that Wi-Fi settings are only applicable for networks using a Wi-Fi network interface.

Link-local addresses are assigned automatically to interfaces and should not be provided manually.

Struct fields

Name Description
dnsInfo
[optional]

Static DNS info to use for this network. Note that this is used in combination with any DNS information obtained from a DHCP server. This behavior may change in the future.

Type: ToiNetwork.ToiDnsInfo
ipAddresses
[optional]

Specifies a set of IP addresses to associate with the network's network interface. Usually only one address is required if DHCP is not used.

Type: Array.<ToiNetwork.ToiIpAddress>
routes
[optional]

Static routes for this network. Used to specify default gateways.

Type: Array.<ToiNetwork.ToiRoute>

ToiWifiAccessPointInfo (Type: struct) (static)

Wi-Fi access point information.

Struct fields

Name Description
authentication

Authentication used by the AP.

Note: This field is deprecated. Use Security and SupportedSecurity instead.

Type: ToiNetwork.ToiWifiAuthenticationType
band

The radio band used by this access point.

Type: ToiNetwork.ToiWifiBand
bssid

The BSSID of the access point.

Type: string
channel

The channel used by the access point.

Type: number
encryption

Encryption used by the AP.

Note: This field is deprecated. Use Security and SupportedSecurity instead.

Type: ToiNetwork.ToiWifiEncryptionType
isRcpiEnabled

Denotes whether received channel power indicator (RCPI) measurements can be provided.

Type: boolean
isRssiEnabled

Denotes whether received signal strength indicator (RSSI) measurements can be provided.

Type: boolean
isSupported

Indicates whether the AP provides at least one security combination accepted by the STB.

Type: boolean
isWpsEnabled

Denotes whether the AP can handle WPS.

Type: boolean
mode

Wi-Fi mode currently used by the AP.

Type: ToiNetwork.ToiWifiMode
rcpi

RCPI. The value will range between -110 dBm to 0 dBm in increments of 0.5dBm.

Type: double
rssi

RSSI. Note very carefully that this value is vendor specific.

Type: double
security

Security used by the AP.

Type: ToiNetwork.ToiWifiSecurity
ssid

The SSID of the access point.

Type: string
supportedSecurity

Supported Wi-Fi security protocols as a bitmask of ToiNetwork.ToiWifiSecurity values.

Type: number

ToiWifiSettings (Type: struct) (static)

Wi-Fi settings. The network will automatically reconnect to the access point if these settings are changed.

Struct fields

Name Description
bssid
[optional]

The BSSID of the AP to connect to.

Type: string
presharedKey
[optional]

Pre-shared key to use when connecting to the AP. This value can be omitted when using WPS.

Type: string
security
[optional]

The type of Wi-Fi security that should be used. If omitted, WIFI_SECURITY_AUTO will be assumed.

Type: ToiNetwork.ToiWifiSecurity
ssid
[optional]

The SSID of the AP to connect to if BSSID is omitted. Note that multiple APs may have the same SSID, in which case the AP with the best signal is chosen.

Type: string

5.1.p5

Copyright (c) 2017 ARRIS Enterprises, LLC. All Rights Reserved. ARRIS Enterprises, LLC. Confidential Information.