Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add original hop limit to header to determine hops used #3321

Merged
merged 15 commits into from
Mar 8, 2024

Conversation

GUVWAF
Copy link
Member

@GUVWAF GUVWAF commented Mar 3, 2024

This adds the original hop limit of a packet (hopStart) to the unencrypted header using the three remaining bits such that we can derive with how many hops each packet was received. This will be saved in the NodeInfo as hopsAway. Also viaMQTT is now saved in the NodeInfo.

Using this, we can adapt the hopLimit of a response and real ACK to more or less hops if needed. This is implemented with RoutingModule::getHopLimitForResponse(). If the amount of hops used for the request was more than our setting, we use the amount of hops that was used for the request. When it used less than our setting, I chose a margin of 2 more hops for the response in case the path back is different.

This also allows us to determine neighbors even if others don’t have the NeighborInfo Module enabled, which is implemented as well.

Closes #3239.

Copy link
Contributor

github-actions bot commented Mar 3, 2024

🤖 Pull request artifacts

empty string

file commit
firmware-2.2.25.2c59e5d.zip 2c59e5d

thebentern added a commit to meshtastic/artifacts that referenced this pull request Mar 3, 2024
@thebentern thebentern merged commit 585805c into meshtastic:master Mar 8, 2024
6 checks passed
GUVWAF added a commit to GUVWAF/Meshtastic-device that referenced this pull request Mar 20, 2024
@GUVWAF GUVWAF deleted the hopStart branch September 28, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants