Internet Connectivity Parameters
Overview
This document describes the parameters used to display Internet connectivity information for CPE devices. The connection type is determined by checking interface status, and uptime is calculated from the LastChange parameter.
Connection Type Detection
Ethernet Connection
Detection
| Condition | Parameter |
|---|---|
Upstream Interface |
|
Enabled |
|
Active |
|
Parameters
| Name | Value Format | Object/Parameter |
|---|---|---|
Connection type |
"Ethernet" |
Detection based on above conditions |
Uptime |
dd:h:m |
|
IP Address |
IPv4: X.X.X.X/YY IPv6: X:X:X:X:X:X:X:X/YY |
|
Addressing type |
String |
|
MAC address |
X:X:X:X:X:X |
|
Link speed |
XXX Mbps |
|
Duplex mode |
String |
|
Bytes received |
XXX Bytes |
|
Bytes sent |
XXX Bytes |
|
Packets received |
XXX Packets |
|
Packets sent |
XXX Packets |
|
Errors received |
XXX Errors |
|
Errors sent |
XXX Errors |
|
Fiber (Optical) Connection
Detection
| Condition | Parameter |
|---|---|
Enabled |
|
Active |
|
Parameters
| Name | Value Format | Object/Parameter |
|---|---|---|
Connection type |
"Fiber" |
Detection based on above conditions |
Uptime |
dd:h:m |
|
IP Address |
IPv4: X.X.X.X/YY IPv6: X:X:X:X:X:X:X:X/YY |
|
Addressing type |
String |
|
Max Link speed |
XXX Mbps |
|
Optical Signal level |
XX dBm |
|
Transmit Optical level |
XX dBm |
|
Bytes received |
XXX Bytes |
|
Bytes sent |
XXX Bytes |
|
Packets received |
XXX Packets |
|
Packets sent |
XXX Packets |
|
Errors received |
XXX Errors |
|
Errors sent |
XXX Errors |
|
Mobile (Cellular) Connection
Detection
| Condition | Parameter |
|---|---|
Enabled |
|
Active |
|
Display Label
Display as: "Mobile (Technology)" where Technology is from CurrentAccessTechnology
Example: "Mobile (LTE)", "Mobile (5G NR)"
Note: If CurrentAccessTechnology is empty or parameter doesn’t exist, display only "Mobile" without technology in parentheses.
Parameters
| Name | Value Format | Object/Parameter |
|---|---|---|
Connection type |
"Mobile" or "Mobile (Technology)" |
|
Uptime |
dd:h:m |
|
IP Address |
IPv4: X.X.X.X/YY IPv6: X:X:X:X:X:X:X:X/YY |
|
Addressing type |
String |
|
IMEI |
String |
|
IMSI |
String |
|
ICCID |
String |
|
MSISDN |
String |
|
RSSI |
XXX dBm |
|
RSRP |
XXX dBm |
|
RSRQ |
XXX dB |
|
Download max speed |
XXX Mbps |
|
Upload max speed |
XXX Mbps |
|
Bytes received |
XXX Bytes |
|
Bytes sent |
XXX Bytes |
|
Packets received |
XXX Packets |
|
Packets sent |
XXX Packets |
|
Errors received |
XXX Errors |
|
Errors sent |
XXX Errors |
|
xDSL Connection
Detection
| Condition | Parameter |
|---|---|
Enabled |
|
Active |
|
Display Label
Display as: "DSL (Profile)" for VDSL where Profile is from CurrentProfile
Example: "DSL (17a)", "DSL (35b)"
Note: If CurrentProfile is empty or parameter doesn’t exist, display only "DSL" without profile in parentheses.
Parameters
| Name | Value Format | Object/Parameter |
|---|---|---|
Connection type |
"DSL" or "DSL (Profile)" |
|
Uptime |
dd:h:m |
|
IP Address |
IPv4: X.X.X.X/YY IPv6: X:X:X:X:X:X:X:X/YY |
|
Addressing type |
String |
|
DL SNR |
XX dB |
|
UL SNR |
XX dB |
|
DL Max speed |
XXX Mbps |
|
UL Max speed |
XXX Mbps |
|
DL Attenuation |
XX dB |
|
UL Attenuation |
XX dB |
|
Bytes received |
XXX Bytes |
|
Bytes sent |
XXX Bytes |
|
Packets received |
XXX Packets |
|
Packets sent |
XXX Packets |
|
Errors received |
XXX Errors |
|
Errors sent |
XXX Errors |
|
IP Address Display
Implementation Example
class InternetConnectivity:
def detect_connection_type(self):
# Check Ethernet (upstream interface)
for eth in self.get_ethernet_interfaces():
if eth.upstream and eth.enable and eth.status == "Up":
return self._build_ethernet_info(eth)
# Check Fiber
for optical in self.get_optical_interfaces():
if optical.enable and optical.status == "Up":
return self._build_fiber_info(optical)
# Check DSL
for dsl in self.get_dsl_lines():
if dsl.enable and dsl.status == "Up":
return self._build_dsl_info(dsl)
# Check Cellular
for cellular in self.get_cellular_interfaces():
if cellular.enable and cellular.status == "Up":
return self._build_mobile_info(cellular)
return None
def _build_mobile_info(self, cellular):
conn_type = "Mobile"
if cellular.current_access_technology:
conn_type = f"Mobile ({cellular.current_access_technology})"
return {
"connectionType": conn_type,
"uptime": self._calculate_uptime(cellular.last_change),
"ipAddress": self._get_ip_address(cellular),
"imei": cellular.imei,
"imsi": cellular.usim.imsi,
"iccid": cellular.usim.iccid,
"msisdn": cellular.usim.msisdn,
"rssi": cellular.rssi,
"rsrp": cellular.rsrp,
"rsrq": cellular.rsrq,
"downloadMaxSpeed": cellular.downstream_max_bit_rate,
"uploadMaxSpeed": cellular.upstream_max_bit_rate,
"stats": cellular.stats
}
def _build_dsl_info(self, dsl):
conn_type = "DSL"
if dsl.current_profile:
conn_type = f"DSL ({dsl.current_profile})"
return {
"connectionType": conn_type,
"uptime": self._calculate_uptime(dsl.last_change),
"ipAddress": self._get_ip_address(dsl),
"dlSnr": dsl.downstream_noise_margin,
"ulSnr": dsl.upstream_noise_margin,
"dlMaxSpeed": dsl.downstream_max_bit_rate,
"ulMaxSpeed": dsl.upstream_max_bit_rate,
"dlAttenuation": dsl.downstream_attenuation,
"ulAttenuation": dsl.upstream_attenuation,
"stats": dsl.stats
}
def _calculate_uptime(self, last_change):
if last_change is None:
return None
return int(time.time()) - last_change
Parameter Summary Table
| Parameter | Ethernet | Fiber | Mobile | DSL |
|---|---|---|---|---|
Connection Type |
Ethernet |
Fiber |
Mobile (Tech) |
DSL (Profile) |
Uptime |
LastChange |
LastChange |
LastChange |
LastChange |
IP Address |
IP.Interface |
IP.Interface |
IP.Interface |
IP.Interface |
Technology/Profile |
— |
— |
CurrentAccessTechnology |
CurrentProfile |
Signal Quality |
— |
OpticalSignalLevel |
RSSI, RSRP, RSRQ |
DL/UL SNR |
Speed |
CurrentBitRate |
MaxBitRate |
DL/UL MaxBitRate |
DL/UL MaxBitRate |
Attenuation |
— |
— |
— |
DL/UL Attenuation |
Traffic Stats |
Stats.* |
Stats.* |
Stats.* |
Stats.* |