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 the device uptime reported in Device.DeviceInfo.UpTime.
Connection Type Detection
Detection Rules
A connection type is active when both conditions are met:
%.Enable == True
%.Status == Up
Uptime:
Uptime = Device.DeviceInfo.UpTime
The uptime is the device uptime, not the interface LastChange. It is the same for all connection types.
Where %.Status == Up for the relevant connection type object.
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 |
|
Uptime Calculation
Source
Uptime = Device.DeviceInfo.UpTime (seconds)
The value is the latest stored Device.DeviceInfo.UpTime of the device, a snapshot taken when the device last reported it, not a live clock. InternetGatewayDevice.DeviceInfo.UpTime (TR-098) is not processed.
DeviceInfo.UpTime is accepted only as plain non-negative digits (up to 18). Missing, encrypted, invalid or negative values are treated as unknown.
Days Uptime
Days uptime = UpTime / 86400 (whole days, rounded down)
Days uptime is empty when the device uptime is unknown.
Display Format
Format uptime as dd:hh:mm:ss, the same format as the Uptime column of the device list:
def format_uptime(seconds):
days = seconds // 86400
hours = (seconds % 86400) // 3600
minutes = (seconds % 3600) // 60
secs = seconds % 60
return f"{days:02d}:{hours:02d}:{minutes:02d}:{secs:02d}"
# Example: 90061 seconds → "01:01:01:01" (1 day, 1 hour, 1 minute, 1 second)
# Example: 9472457 seconds → "109:15:14:17"; 0 seconds → "00:00:00:00"
When the device uptime is unknown, Additional info shows N/A.
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._format_uptime(self.device_uptime_seconds),
"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._format_uptime(self.device_uptime_seconds),
"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 _format_uptime(self, uptime_seconds):
# uptime_seconds = latest stored Device.DeviceInfo.UpTime, None when unknown
if uptime_seconds is None:
return "N/A"
return format_uptime(uptime_seconds)
Parameter Summary Table
| Parameter | Ethernet | Fiber | Mobile | DSL |
|---|---|---|---|---|
Connection Type |
Ethernet |
Fiber |
Mobile (Tech) |
DSL (Profile) |
Uptime |
DeviceInfo.UpTime |
DeviceInfo.UpTime |
DeviceInfo.UpTime |
DeviceInfo.UpTime |
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.* |