feat: Auto-detect serial port from /dev/serial/by-id/

When MC_SERIAL_PORT=auto, bridge scans /dev/serial/by-id/ and:
- Uses the device if exactly one found
- Fails with helpful message if multiple devices (list provided)
- Fails if no devices found

docker-compose.yml now uses device_cgroup_rules instead of explicit
device mapping, allowing auto-detection inside the container.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-01-15 15:18:07 +01:00
parent b8a77285ab
commit b2496b17b0
4 changed files with 79 additions and 11 deletions
+5 -4
View File
@@ -5,10 +5,11 @@
# MeshCore Device Configuration
# ============================================
# Serial port path (use /dev/serial/by-id for stable device names)
# Find your device: ls /dev/serial/by-id/
# Example: usb-Espressif_Systems_heltec_wifi_lora_32_v4__16_MB_FLASH__2_MB_PSRAM__90706984A000-if00
MC_SERIAL_PORT=/dev/serial/by-id/[YOUR_DEVICE_ID]
# Serial port path
# Use "auto" for automatic detection (recommended if only one USB device)
# Or specify manually: /dev/serial/by-id/usb-xxx or /dev/ttyUSB0
# Find available devices: ls /dev/serial/by-id/
MC_SERIAL_PORT=auto
# Your MeshCore device name (used for .msgs file)
# Use "auto" for automatic detection from meshcli (recommended)