mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 18:52:30 +00:00
Add two-way traceroute result with SNR per hop (#4485)
* Add two-way traceroute result with SNR per hop * Update protos
This commit is contained in:
@@ -187,6 +187,8 @@ typedef enum _meshtastic_HardwareModel {
|
||||
/* RadioMaster 900 Bandit, https://www.radiomasterrc.com/products/bandit-expresslrs-rf-module
|
||||
SSD1306 OLED and No GPS */
|
||||
meshtastic_HardwareModel_RADIOMASTER_900_BANDIT = 74,
|
||||
/* Minewsemi ME25LS01 (ME25LE01_V1.0). NRF52840 w/ LR1110 radio, buttons and leds and pins. */
|
||||
meshtastic_HardwareModel_ME25LS01_4Y10TD = 75,
|
||||
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
||||
------------------------------------------------------------------------------------------------------------------------------------------ */
|
||||
@@ -502,11 +504,20 @@ typedef struct _meshtastic_User {
|
||||
meshtastic_User_public_key_t public_key;
|
||||
} meshtastic_User;
|
||||
|
||||
/* A message used in our Dynamic Source Routing protocol (RFC 4728 based) */
|
||||
/* A message used in a traceroute */
|
||||
typedef struct _meshtastic_RouteDiscovery {
|
||||
/* The list of nodenums this packet has visited so far */
|
||||
/* The list of nodenums this packet has visited so far to the destination. */
|
||||
pb_size_t route_count;
|
||||
uint32_t route[8];
|
||||
/* The list of SNRs (in dB, scaled by 4) in the route towards the destination. */
|
||||
pb_size_t snr_towards_count;
|
||||
int8_t snr_towards[8];
|
||||
/* The list of nodenums the packet has visited on the way back from the destination. */
|
||||
pb_size_t route_back_count;
|
||||
uint32_t route_back[8];
|
||||
/* The list of SNRs (in dB, scaled by 4) in the route back from the destination. */
|
||||
pb_size_t snr_back_count;
|
||||
int8_t snr_back[8];
|
||||
} meshtastic_RouteDiscovery;
|
||||
|
||||
/* A Routing control Data packet handled by the routing module */
|
||||
@@ -1054,7 +1065,7 @@ extern "C" {
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_Position_init_default {false, 0, false, 0, false, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, false, 0, false, 0, 0, 0, 0, 0, false, 0, false, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_User_init_default {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
||||
#define meshtastic_RouteDiscovery_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||
#define meshtastic_RouteDiscovery_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||
#define meshtastic_Routing_init_default {0, {meshtastic_RouteDiscovery_init_default}}
|
||||
#define meshtastic_Data_init_default {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0}
|
||||
@@ -1079,7 +1090,7 @@ extern "C" {
|
||||
#define meshtastic_ChunkedPayloadResponse_init_default {0, 0, {0}}
|
||||
#define meshtastic_Position_init_zero {false, 0, false, 0, false, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, false, 0, false, 0, 0, 0, 0, 0, false, 0, false, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_User_init_zero {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
||||
#define meshtastic_RouteDiscovery_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||
#define meshtastic_RouteDiscovery_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||
#define meshtastic_Routing_init_zero {0, {meshtastic_RouteDiscovery_init_zero}}
|
||||
#define meshtastic_Data_init_zero {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0}
|
||||
@@ -1136,6 +1147,9 @@ extern "C" {
|
||||
#define meshtastic_User_role_tag 7
|
||||
#define meshtastic_User_public_key_tag 8
|
||||
#define meshtastic_RouteDiscovery_route_tag 1
|
||||
#define meshtastic_RouteDiscovery_snr_towards_tag 2
|
||||
#define meshtastic_RouteDiscovery_route_back_tag 3
|
||||
#define meshtastic_RouteDiscovery_snr_back_tag 4
|
||||
#define meshtastic_Routing_route_request_tag 1
|
||||
#define meshtastic_Routing_route_reply_tag 2
|
||||
#define meshtastic_Routing_error_reason_tag 3
|
||||
@@ -1298,7 +1312,10 @@ X(a, STATIC, SINGULAR, BYTES, public_key, 8)
|
||||
#define meshtastic_User_DEFAULT NULL
|
||||
|
||||
#define meshtastic_RouteDiscovery_FIELDLIST(X, a) \
|
||||
X(a, STATIC, REPEATED, FIXED32, route, 1)
|
||||
X(a, STATIC, REPEATED, FIXED32, route, 1) \
|
||||
X(a, STATIC, REPEATED, INT32, snr_towards, 2) \
|
||||
X(a, STATIC, REPEATED, FIXED32, route_back, 3) \
|
||||
X(a, STATIC, REPEATED, INT32, snr_back, 4)
|
||||
#define meshtastic_RouteDiscovery_CALLBACK NULL
|
||||
#define meshtastic_RouteDiscovery_DEFAULT NULL
|
||||
|
||||
@@ -1612,8 +1629,8 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
|
||||
#define meshtastic_NodeRemoteHardwarePin_size 29
|
||||
#define meshtastic_Position_size 144
|
||||
#define meshtastic_QueueStatus_size 23
|
||||
#define meshtastic_RouteDiscovery_size 40
|
||||
#define meshtastic_Routing_size 42
|
||||
#define meshtastic_RouteDiscovery_size 256
|
||||
#define meshtastic_Routing_size 259
|
||||
#define meshtastic_ToRadio_size 504
|
||||
#define meshtastic_User_size 113
|
||||
#define meshtastic_Waypoint_size 165
|
||||
|
||||
@@ -341,7 +341,7 @@ typedef struct _meshtastic_ModuleConfig_CannedMessageConfig {
|
||||
/* Enable/disable CannedMessageModule. */
|
||||
bool enabled;
|
||||
/* Input event origin accepted by the canned message module.
|
||||
Can be e.g. "rotEnc1", "upDownEnc1" or keyword "_any" */
|
||||
Can be e.g. "rotEnc1", "upDownEnc1", "scanAndSelect", "cardkb", "serialkb", or keyword "_any" */
|
||||
char allow_input_source[16];
|
||||
/* CannedMessageModule also sends a bell character with the messages.
|
||||
ExternalNotificationModule can benefit from this feature. */
|
||||
|
||||
@@ -113,7 +113,7 @@ typedef enum _meshtastic_PortNum {
|
||||
ENCODING: Protobuf (?) */
|
||||
meshtastic_PortNum_SIMULATOR_APP = 69,
|
||||
/* 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 */
|
||||
meshtastic_PortNum_TRACEROUTE_APP = 70,
|
||||
/* Aggregates edge info for the network by sending out a list of each node's neighbors
|
||||
|
||||
Reference in New Issue
Block a user