Confused about hop_limit being 0

I have got 3 ttgos.

I want that node1 can communicate with node2 either
directly or via repeater.

And node2 can communicate with node1 either directly
or via repeater as well.

repeater sends messages to node1 and node2 from time to time on i’ts own,
via a conneted raspberry pi using meshtatic python cli tool.

       repeater
      /       \
     /         \
    /           \
node1-----------node2

To reduce tx air time I want to make sure that node1 never forwards messages
and node2 never forwards messages (in this case messages from repeater)

So I wanted to set hop_limit to 0 on node1 and node2 and to 1 on repeater.
Does that make sense, doesn’t it ?

But I just noticed that all my nodes report that hop_limit is 0, now I am confused.

On all three nodes I get 0 for hop_limit, I would have expected 3 as per

https://meshtastic.org/docs/software/settings/misc#hop_limit hop_limit

(cli) me@host:~# meshtastic --port /dev/ttyACM0 --get hop_limit
Connected to radio
hop_limit: 0
Completed getting preferences

Please let me know what I am thinking wrong.
Thanks Lixus

settings with a value of 0 means default. hop_limit default is 3.

there is active development going on to introduce routing in 1.3, but until then, router mode is just a power setting. there is no difference on how a router handles packets compared to other nodes.

hop_limit is set at the origin. after receiving a packet with hop_limit greater than zero, each node will decrement it by 1 and attempt retransmission.

1 Like

General rule of thumb is we use ‘0’ to mean any of our values are set to the default.

:slight_smile:

1 Like

Okay, thank you.
I learned

  1. 0 usually means default value
  2. setting hop_limit to e.g. 1 does not make sense or would not decrease tx time for me
2 Likes