--- title: "networkConnectivity()" slug: "networkconnectivity" updated: 2024-07-17T19:08:52Z published: 2024-07-17T19:08:52Z canonical: "docs.developer.comcast.com/networkconnectivity" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.developer.comcast.com/llms.txt > Use this file to discover all available pages before exploring further. # networkConnectivity() ## 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 => { }); ```