From f7b0fa8d5fbfd64807cf3ada1bf67a6a3e932414 Mon Sep 17 00:00:00 2001 From: geeksville Date: Sat, 30 May 2020 16:15:27 -0700 Subject: [PATCH] add packet_id_bits to work with old devices --- mesh.proto | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/mesh.proto b/mesh.proto index a976ec5..52481e4 100644 --- a/mesh.proto +++ b/mesh.proto @@ -546,9 +546,25 @@ message MyNodeInfo { /// the last time we discarded preferences) uint32 error_count = 9; - /// How many bits are used for the nodenum. If zero it is assumed we use eight bit node nodenums - /// New device loads will user 32 bit nodenums. - uint32 nodenum_bits = 10; + /// How many bits are used for the packetid. If zero it is assumed we use eight bit packetids + /// New device loads will user 32 bit packetid. + uint32 packet_id_bits = 10; + + /** The current ID this node is using for sending new packets (exposed so that the phone + can self assign packet IDs if it wishes by picking packet IDs from the opposite side of the pacekt + ID space). + + Old device loads (older that 0.6.5 do not populate this field, but all newer loads do). + + FIXME: that we need to expose this is a bit of a mistake. Really the phones should be modeled/treated + as 1st class nodes like any other, and the radio connected to the phone just routes like any other. + This would allow all sorts of clean/clever routing topologies in the future. + **/ + uint32 current_packet_id = 11; + + /// How many bits are used for the nodenum. If zero it is assumed we use eight bit nodenums + /// New device loads will user 32 bit nodenum. + uint32 node_num_bits = 12; /// FIXME - add more useful debugging state (queue depths etc) }