diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index bb57f26..c28b91c 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -51,4 +51,6 @@ *Waypoint.name max_size:30 *Waypoint.description max_size:100 +*NeighborInfo.neighbors max_count:10 + *DeviceMetadata.firmware_version max_size:18 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 378555e..eadc0a6 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1387,6 +1387,39 @@ message Compressed { bytes data = 2; } +/* +* Full info on edges for a single node +*/ +message NeighborInfo { + /* + * The node ID of the node sending info on its neighbors + */ + uint32 node_id = 1; + /* + * Field to pass neighbor info for the next sending cycle + */ + uint32 last_sent_by_id = 2; + /* + * The list of out edges from this node + */ + repeated Neighbor neighbors = 3; +} + +/* +* A single edge in the mesh +*/ +message Neighbor { + /* + * Node ID of neighbor + */ + uint32 node_id = 1; + + /* + * SNR of last heard message + */ + float snr = 2; +} + /* * Device metadata response */ diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index 9c94a1b..984eb5d 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -142,6 +142,11 @@ enum PortNum { */ TRACEROUTE_APP = 70; + /* + * Aggregates edge info for the network by sending out a list of each node's neighbors + */ + NEIGHBORINFO_APP = 71; + /* * Private applications should use portnums >= 256. * To simplify initial development and testing you can use "PRIVATE_APP"