From c92474cf365b3bb06726cac4717892b1dce012d4 Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Mon, 26 Aug 2024 20:32:11 +0200 Subject: [PATCH] HopStart should be set for route back to be valid --- meshtastic/mesh_interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/mesh_interface.py b/meshtastic/mesh_interface.py index 2eb66f8..c061534 100644 --- a/meshtastic/mesh_interface.py +++ b/meshtastic/mesh_interface.py @@ -571,9 +571,9 @@ class MeshInterface: # pylint: disable=R0902 print(routeStr) # Print the route towards destination - # Only if there is an SNR entry (for the origin) it's valid, even though route might be empty (direct connection) + # Only if hopStart is set and there is an SNR entry (for the origin) it's valid, even though route might be empty (direct connection) lenBack = 0 if "routeBack" not in asDict else len(asDict["routeBack"]) - backValid = "snrBack" in asDict and len(asDict["snrBack"]) == lenBack + 1 + backValid = "hopStart" in p and "snrBack" in asDict and len(asDict["snrBack"]) == lenBack + 1 if backValid: print("Route traced back to us:") routeStr = self._nodeNumToId(p["from"], False) or f"{p['from']:08x}" # Start with origin of response