Commit Graph
4 Commits
Author SHA1 Message Date
jensandClaude Sonnet 5 eb18b1485f network_backend: use resolved device name in console output
NetworkBackend's connect/send/lost/error prints always used the
connect-time registration name, so GUI console output kept showing
the placeholder counter ID even after MON-VER resolved the real
device name. Add a display_name per socket (defaults to name, kept
separate from the routing key used by find_by_name/register_xcvr) and
have the GUI update it once MON-VER responds.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XM4FNUjhu9x8df5Dp1hHvd
2026-07-16 20:43:45 +02:00
jensandClaude Sonnet 5 b3447a28c5 harden UBX parsing/dispatch and report peer-side disconnects in GUI
A struct size-mismatch or any other parse error in a listener could
propagate uncaught out of the socket-reading thread and silently kill
it. Catch broadly in the event loop and per-listener in call_listener,
and make the NAV-SAT/NAV-SIG/RXM-RAWX group parsers tolerate a
payload length that isn't an exact multiple of the group size instead
of crashing on a short struct.unpack.

Also wire NetworkBackend's socket-loss detection through to
ReceiverManager (via a queued signal, since the callback fires from
the backend thread) so the GUI reflects a peer-initiated disconnect
instead of leaving the row stuck showing "connected". Verified against
a real ZED-X20P: it drops the TCP session on its own after ~20-28s
regardless of traffic; the GUI now marks the receiver disconnected and
frees its ID for reconnecting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AzmCaNjDb3TAqPpTwunKTY
2026-07-15 22:00:29 +02:00
jensandClaude Sonnet 4.6 3f6f403b7b network_backend: fix crash on lost/refused connection
getpeername() raised ENOTCONN when a connect failed or the peer
closed the socket, crashing the event loop thread. Identify sockets
via the selector key's data (set at register time) instead, and
catch OSError on recv/send to cleanly close and unregister a dead
socket rather than crashing.

Also fix select(timeout=100) which waited 100 seconds instead of
100ms, causing stop() to hang after a dead socket was unregistered.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 20:48:17 +02:00
jensandClaude Sonnet 4.6 68f8196fbb backend: rename network.py to network_backend.py
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 11:21:50 +02:00