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

send a heartbeat every 60 seconds to keep serial connections alive #33

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

liamcottle
Copy link
Contributor

This PR sends a heartbeat packet every 60 seconds to keep the serial connection alive.

Without this, after a while (15 minutes or more), packets stop being received when connecting a Pi Pico to a Meshtastic device over serial.

@ianmcorvidae
Copy link

Unsure if it's worth harmonizing between clients, but python and rust both use 300 seconds for the heartbeat interval. It does look like js is using 60s, but wondering if that's too fast really.

@liamcottle
Copy link
Contributor Author

liamcottle commented Dec 11, 2024

I hadn't looked at the implementations of those clients for heartbeat, so just assumed the value in the js lib was what I should go with. I'm happy to push another commit to adjust this to 300 seconds if preferred.

This would only allow for 3 failed serial packets going through, as opposed to 15 ;) but unsure if that matters...

Copy link
Member

@GUVWAF GUVWAF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

60 seconds sounds good to me.

@thebentern thebentern merged commit edfaa9d into meshtastic:master Dec 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants