Improve serial bridge reliability#13
Conversation
- Add clocal and cs8 to socat serial options to prevent false carrier detect drops and ensure proper 8-bit framing for protobuf data - Add set -e for strict error handling in setup phase - Add configurable DEVICE_TIMEOUT (default 60s) to prevent indefinite hangs when device is missing; Docker restart policy handles retries - Quote variables in socat command to prevent word splitting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code ReviewOverall this is a solid set of improvements. The changes are well-scoped, fix real problems, and align with the project's simplicity goals. A few observations below: ✅ What's good
|
Summary
clocalandcs8to socat serial options — prevents false carrier detect drops on USB serial adapters and ensures proper 8-bit framing for protobuf binary dataset -efor strict error handling during setup phase, with appropriate guards (|| true) on functions that can legitimately failDEVICE_TIMEOUTenv var (default 60s) —wait_for_device()no longer hangs indefinitely; Docker'srestart: unless-stoppedhandles retriesTest plan
docker build -t meshtastic-serial-bridge -f src/Dockerfile src/docker compose up -dmeshtastic --host localhost --info🤖 Generated with Claude Code