Skip to content

Conversation

@cartpauj
Copy link

@cartpauj cartpauj commented Aug 7, 2025

Resolve #456

Fix SondeHub timeout issues causing device hangs

Fixes issue where the device would get stuck indefinitely in "Waiting for ACK from server" state when SondeHub requests don't receive responses.

Problem:
The SondeHub client had no timeout mechanism for waiting for server acknowledgments or import responses. If the server didn't respond or the connection was lost mid-request, the device would hang in WAITACK or WAITIMPORTRES states indefinitely, requiring a manual restart.

Solution:

  • Added timeout variables for both WAITACK (15 seconds) and WAITIMPORTRES (30 seconds) states
  • Implemented timeout checks in the state machine that automatically trigger reconnection
  • Different timeout values based on expected response size: smaller for HTTP ACKs, larger for import data
  • Proper cleanup of timeout variables on state transitions and error conditions

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.

tracking of DFM17

1 participant