From 7171332c99b884afde4eb436003f097c8fdf8d30 Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sat, 17 Aug 2024 14:27:32 +0200 Subject: [PATCH] Add route back and SNR lists to RouteDiscovery for traceroute --- meshtastic/mesh.options | 7 ++++++- meshtastic/mesh.proto | 21 ++++++++++++++++++--- meshtastic/portnums.proto | 4 ++-- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 9730a6e8..541e4c91 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -9,6 +9,11 @@ *User.short_name max_size:5 *RouteDiscovery.route max_count:8 +*RouteDiscovery.snr_towards max_count:8 +*RouteDiscovery.snr_towards int_size:8 +*RouteDiscovery.route_back max_count:8 +*RouteDiscovery.snr_back max_count:8 +*RouteDiscovery.snr_back int_size:8 # note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is # outside of this envelope @@ -67,4 +72,4 @@ *ChunkedPayload.chunk_count int_size:16 *ChunkedPayload.chunk_index int_size:16 -*ChunkedPayload.payload_chunk max_size:228 +*ChunkedPayload.payload_chunk max_size:228 \ No newline at end of file diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 4076bec1..aaf5adbd 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -695,13 +695,28 @@ message User { } /* - * A message used in our Dynamic Source Routing protocol (RFC 4728 based) + * A message used in a traceroute */ message RouteDiscovery { /* - * The list of nodenums this packet has visited so far + * The list of nodenums this packet has visited so far to the destination. */ repeated fixed32 route = 1; + + /* + * The list of SNRs (in dB, scaled by 4) in the route towards the destination. + */ + repeated int32 snr_towards = 2; + + /* + * The list of nodenums the packet has visited on the way back from the destination. + */ + repeated fixed32 route_back = 3; + + /* + * The list of SNRs (in dB, scaled by 4) in the route back from the destination. + */ + repeated int32 snr_back = 4; } /* @@ -1850,4 +1865,4 @@ message ChunkedPayloadResponse { */ resend_chunks resend_chunks = 4; } -} +} \ No newline at end of file diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index a8517c7f..1f8cdb9f 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -174,7 +174,7 @@ enum PortNum { /* * Provides a traceroute functionality to show the route a packet towards - * a certain destination would take on the mesh. + * a certain destination would take on the mesh. Contains a RouteDiscovery message as payload. * ENCODING: Protobuf */ TRACEROUTE_APP = 70; @@ -218,4 +218,4 @@ enum PortNum { * Currently we limit port nums to no higher than this value */ MAX = 511; -} +} \ No newline at end of file