|  Developer
Updated on November 26, 2021

hub.network.get

  • Version: 1.0
  • Classes: ANY
  • Network settings
  • Return network settings

Parameters:

  • No parameters required.
Edit
Field Type Required Description
interfaces JsonArray + Network configuration for each network interface
interfaces._id string + Id of the network interface
interfaces.internetAvailable string Whether this interface is an internet provider (only one interface can be an internet provider)
interfaces.hwaddr string + Mac address assigned to interface (except ‘modem’ interfaces)
interfaces.imei string + IMEI (only for ‘modem’ interfaces)
interfaces.type string + Interface type (, , )
interfaces.network string + Network type (, )
interfaces.priority integer Priority to use the interface as an internet source (lower value, higher priority)
interfaces.status string + Interface status (up, down)
interfaces.error JsonObj Description of a failure happened for this interface, if any (Error object)
interfaces.enabled enum + For wan interfaces: , , . For lan interfaces: ,
interfaces.wifi JsonObj WiFi settings (used with interface type: wifi)
interfaces.wifi.mode string + WiFi mode (ap, sta)
interfaces.wifi.channel integer + WiFi channel for access point (0 – auto)
interfaces.wifi.network JsonObj + Current WiFi network
interfaces.wifi.network.ssid string WiFi SSID
interfaces.wifi.network.bssid string WiFi BSSID
interfaces.wifi.network.encryption string WiFi encryption (none, wep, psk, psk2)
interfaces.wifi.network.key string WiFi encryption key (used with WiFi encryption: wep, psk, psk2)
interfaces.wifi.region string + WiFi region (ISO/IEC 3166 alpha2 country codes)
interfaces.modem JsonObj + 3G/4G Modem settings (used with interface type: ) modem
interfaces.signalQuality JsonObj + Quality of a cellular signal
interfaces.signalQuality.rssi int Received Signal Strength Indicator in dBm (re 1mW)
interfaces.signalQuality.rsrp int Reference Signal Received Power in dBm (re 1mW) LTE only connection
interfaces.signalQuality.rsrq int Reference Signal Received Quality in dB LTE only connection
interfaces.signalQuality.level int Level of a cellular signal in percentage (0-99)
interfaces.ipv4 JsonObj + IPv4 settings
interfaces.ipv4.mode string + IPv4 mode (ignore, static, dhcp, zeroconf (linklocal), ppp)
interfaces.ipv4.ip string IPv4 address
interfaces.ipv4.mask string IPv4 mask
interfaces.ipv4.gateway string IPv4 gateway (for ppp used as remote endpoint)
interfaces.ipv4.dns JsonArray IPv4 dns servers
interfaces.ipv4.dhcpId string IPv4 gateway (used with dhcp)
interfaces.ipv6 JsonObj +??? IPv6 settings
interfaces.ipv6.mode string + IPv6 mode (ignore, static, dhcp (stateful), zeroconf (stateless), ppp)
interfaces.ipv6.ip JsonArray IPv6 addresses with prefix
interfaces.ipv6.gateway string IPv6 gateway (for ppp used as remote endpoint)
interfaces.ipv6.dns JsonArray IPv6 dns servers
interfaces.ipv6.dhcpId string IPv6 gateway (used with dhcp)
interfaces.stats JsonObj + Stats () TBD.
Edit
Field Type Required Description
accessTechnology string Cellular technology
apnName string Access point name
dialNumber string Dial number
operator string Cellular carrier: physical carrier or physical carrier/operator name
pdpType string Type of an pdp context
pinCode string SIM pin code
initializeAt string Modem initializing string
username string PPP username
password string PPP password
authMode string PPP authentication mode (auto, pap, chap)
simInfo JsonObj + Information about an inserted SIM card
simInfo.iccid string SIM ICCID
simInfo.imsi string SIM IMSI
simInfo.locked bool Whether SIM Lock is on
Edit
Token Description
1 Modem not registered
2 2g
3 2.5g
4 2.75g
5 3g
6 3.5g
7 3.5g
8 3.75g
9 4g
10 4g
11
Edit

interfaces.error

Code Message Data

If there are some issues during an interface configuration or during its activity they are detailed in a field.

Edit
Edit
				
					{
    "method": "hub.network.get",
    "id": "_ID_",
    "params": {}
}				
			
Edit
				
					{
    "error": null,
    "id": "_ID_",
    "method": "hub.network.get",
    "result": {
        "interfaces": [
            {
                "_id": "eth0",
                "enabled": "auto",
                "hwaddr": "02:42:8B:03:79:38",
                "internetAvailable": true,
                "ipv4": {
                    "dns": [
                        "192.168.10.10",
                        "1.1.1.1",
                        "8.8.8.8"
                    ],
                    "gateway": "192.168.10.1",
                    "ip": "192.168.10.227",
                    "mask": "255.255.254.0",
                    "mode": "dhcp"
                },
                "network": "wan",
                "status": "up",
                "type": "ethernet"
            },
            {
                "_id": "wlan0",
                "enabled": "auto",
                "hwaddr": "8C:F7:10:E4:ED:90",
                "internetAvailable": false,
                "ipv4": {
                    "dns": [
                        "192.168.10.10",
                        "1.1.1.1",
                        "8.8.8.8"
                    ],
                    "gateway": "192.168.10.1",
                    "ip": "192.168.11.126",
                    "mask": "255.255.254.0",
                    "mode": "dhcp"
                },
                "network": "wan",
                "status": "down",
                "type": "wifi",
                "wifi": {
                    "channel": 0,
                    "mode": "sta",
                    "network": {
                        "bssid": "",
                        "encryption": "psk2",
                        "key": "",
                        "ssid": ""
                    },
                    "region": "00"
                }
            },
            {
                "_id": "wlan0.1",
                "enabled": "on",
                "hwaddr": "8C:F7:10:E4:ED:90",
                "ipv4": {
                    "ip": "192.168.4.1",
                    "mask": "255.255.255.0",
                    "mode": "static"
                },
                "network": "lan",
                "status": "down",
                "type": "wifi",
                "wifi": {
                    "channel": 0,
                    "mode": "ap",
                    "network": {
                        "encryption": "psk2",
                        "key": "nothing43here",
                        "ssid": "ezlo_70010999"
                    },
                    "region": "00"
                }
            },
            {
                "_id": "mobile0",
                "enabled": "auto",
                "hwaddr": "ppp",
                "imei": "867698040111646",
                "internetAvailable": true,
                "ipv4": {
                    "dns": [
                        "10.74.32.5",
                        "10.74.32.6"
                    ],
                    "gateway": "10.64.64.64",
                    "ip": "100.83.201.239",
                    "mask": "255.255.255.255",
                    "mode": "3g",
                },
                "modem": {
                    "apnName": "internet",
                    "dialNumber": "*99#",
                    "pinCode": "1234",
                    "simInfo": {
                        "iccid": "89380062300497206200",
                        "imsi": "255062015074247"
                    }
                },
                "network": "wan",
                "priority": 3,
                "signalQuality": {
                    "level": 83,
                    "rssi": -61
                },
                "status": "up",
                "type": "modem"
            },
            {
                "_id": "mobile1",
                "enabled": "auto",
                "error": {
                    "code": -32500,
                    "data": "network.modem.sim.nopresent",
                    "message": "No SIM card present in the specified interface"
                },
                "internetAvailable": false,
                "network": "wan",
                "status": "down",
                "type": "modem"
            }
        ]
    }
}