networkConnectivity()

Prev Next

networkConnectivity()

Retrieve the type of network an X1 Device is connected to.

##### Signature:
$badger.networkConnectivity()

Parameters:

None.

Return Values:

Return Value Type Description Example
networkInterface String Returns the active network interface currently in use by the device to reach the internet. Can be one of the following:
WIFI
ETHERNET
MOCA*
DOCSIS

*MOCA (Multimedia over Coax) interface is a technology for delivering network traffic over coaxial wiring.
WIFI

The result will be returned via a success or failure callback per the following table:

Callback Status Message Other fields returned
success SUCCESS - networkInterface
failure NO_ACTIVE_NETWORK_INTERFACE No active network interface found -
failure API_NOT_SUPPORTED API not supported -

Usage Example:

  $badger.networkConnectivity().success(data => {
	     console.log("Network interface =" + data.networkInterface);
  }).failure(reason => {
  });