From f3ebec9cb1b93e467c0d15d56b501c7c9b350fa8 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Thu, 22 Oct 2026 21:22:10 +0200 Subject: [PATCH] Added ifstat parameters --- RNS/Interfaces/RNodeInterface.py | 1 + RNS/Interfaces/RNodeMultiInterface.py | 2 +- RNS/Reticulum.py | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/RNS/Interfaces/RNodeInterface.py b/RNS/Interfaces/RNodeInterface.py index bf623672..b890b09d 100644 --- a/RNS/Interfaces/RNodeInterface.py +++ b/RNS/Interfaces/RNodeInterface.py @@ -262,6 +262,7 @@ class RNodeInterface(Interface): self.r_st_alock = None self.r_lt_alock = None self.r_random = None + self.r_modulation = "LoRa" self.r_airtime_short = 0.0 self.r_airtime_long = 0.0 self.r_channel_load_short = 0.0 diff --git a/RNS/Interfaces/RNodeMultiInterface.py b/RNS/Interfaces/RNodeMultiInterface.py index 6e0f5fc9..b3e6dc54 100644 --- a/RNS/Interfaces/RNodeMultiInterface.py +++ b/RNS/Interfaces/RNodeMultiInterface.py @@ -278,7 +278,7 @@ class RNodeMultiInterface(Interface): self.interface_ready = False self.announce_rate_target = None self.reports_phy_stats = True - + self.r_modulation = "LoRa" self.validcfg = True if id_interval != None and id_callsign != None: diff --git a/RNS/Reticulum.py b/RNS/Reticulum.py index 13cd18ea..48f362d1 100755 --- a/RNS/Reticulum.py +++ b/RNS/Reticulum.py @@ -1535,6 +1535,16 @@ class Reticulum: else: ifstats["tunnelstate"] = None + if hasattr(interface, "r_stat_rssi"): ifstats["rssi"] = interface.r_stat_rssi + if hasattr(interface, "r_stat_snr"): ifstats["snr"] = interface.r_stat_snr + if hasattr(interface, "r_stat_q"): ifstats["signal_quality"] = interface.r_stat_q + if hasattr(interface, "r_frequency"): ifstats["frequency"] = interface.r_frequency + if hasattr(interface, "r_bandwidth"): ifstats["bandwidth"] = interface.r_bandwidth + if hasattr(interface, "r_txpower"): ifstats["txpower"] = interface.r_txpower + if hasattr(interface, "r_sf"): ifstats["sf"] = interface.r_sf + if hasattr(interface, "r_cr"): ifstats["cr"] = interface.r_cr + if hasattr(interface, "r_channel"): ifstats["channel"] = interface.r_channel + if hasattr(interface, "modulation"): ifstats["modulation"] = interface.modulation if hasattr(interface, "r_airtime_short"): ifstats["airtime_short"] = interface.r_airtime_short if hasattr(interface, "r_airtime_long"): ifstats["airtime_long"] = interface.r_airtime_long if hasattr(interface, "r_channel_load_short"): ifstats["channel_load_short"] = interface.r_channel_load_short