|
I'm trying to understand how path length and hop count interact, sharing a byte. I added this code at the start of Mesh.cpp Mesh::onRecvPacket Using a companion near my test repeater, I sent a direct message without a path. As expected I saw a hop count of 0. However, when I set the path to 11 (a repeater that doesn't exist locally) I was expecting to see hop count of 0 again, as no repeater could have repeated the packet, but I saw hop count of 1. Am I misunderstanding something? |
Replies: 1 comment 2 replies
|
The low six bits are the number of path hashes, not a live count of repeaters that already forwarded the packet. |
The low six bits are the number of path hashes, not a live count of repeaters that already forwarded the packet.
getPathHashCount()is literallypath_len & 63, while the upper two bits encode hash size (Packet.h). Therefore a configured direct path containing one repeater hash reports1even if that nonexistent repeater never retransmits it; the field describes the supplied route.