Files
meshcore_py/src/meshcore
Matthew Wolter ae0aa33dc8 G3: F02 — inject reconnect callback for send_appstart after reconnect
ConnectionManager._attempt_reconnect called self.connection.connect()
directly, bypassing MeshCore.connect() which runs send_appstart().
Firmware requires CMD_APP_START after every transport-level connection
to initialize the session.  Without it, the reconnected transport has
no active session — sends go unanswered, tcp_no_response fires after
5 attempts, handle_disconnect re-enters _attempt_reconnect, and the
reconnect storm begins.

Fix: add an optional reconnect_callback parameter to
ConnectionManager.__init__.  MeshCore passes self._on_reconnect which
calls send_appstart() after the transport reconnects.  The callback
is invoked inside _attempt_reconnect immediately after a successful
connect(), before the CONNECTED event is emitted.  Callback failures
are logged as warnings but do not break the reconnect — the transport
is up regardless.  Default None keeps the API backwards-compatible
for direct ConnectionManager users.

Refs: Forensics report finding F02
2026-04-11 19:47:49 -07:00
..
2025-09-07 12:28:26 -07:00
2026-03-07 21:05:00 -04:00
2026-03-07 17:42:41 -04:00
2026-03-18 17:31:17 -07:00