From 2e7d9a2db0ac29e696d2387dc40c50f7e991554b Mon Sep 17 00:00:00 2001 From: Florent de Lamotte Date: Sat, 1 Mar 2025 08:52:25 +0100 Subject: [PATCH] Store only meaningfull part of path --- mccli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mccli.py b/mccli.py index f998d68..bba3b36 100755 --- a/mccli.py +++ b/mccli.py @@ -114,7 +114,10 @@ class MeshCore: c["type"] = data[33] c["flags"] = data[34] c["out_path_len"] = data[35] - c["out_path"] = data[36:100].hex() + plen = data[35] + if plen == 255 : + plen = 0 + c["out_path"] = data[36:36+plen].hex() c["adv_name"] = data[100:132].decode().replace("\0","") c["last_advert"] = int.from_bytes(data[132:136], byteorder='little') c["adv_lat"] = int.from_bytes(data[136:140], byteorder='little',signed=True)