DashboardCodeAVR serial bridge: /dev/ttyUSB0 must al…

AVR serial bridge: /dev/ttyUSB0 must always be a char device — shell <> operator creates regular files

Category: architecture
Confidence: 1.00
ID: 019ec737-b90a-7973-b11a-4f71799b7597
Project ID: ffa98226-3908-4f0c-936b-969018c62abf
Cross-project: No
Recalled in other projects: 1
Source session: 0Fx6yy0GQlxM3LrWk
Created: 2026-06-14 17:39:38
Updated: 2026-06-14 17:39:38

Cross-Project Recalls

ProjectHitsLast recalled
opencode 1 9d ago

Content

Trap: when pl2303 module unloads or USB disconnects, devtmpfs removes the char device node. Bridge's _open_session() runs exec 3<>/dev/ttyUSB0 — shell <> operator creates a regular file if path doesn't exist. Regular file permanently shadows the device: writes succeed silently (go to disk, not serial port), termios fails with 'Inappropriate ioctl', reads return stale TX data. Looks like driver bug or AVR not responding. Fix: watchdog (/jffs/scripts/pl2303-watchdog.sh) must verify /dev/ttyUSB0 is a char device ([ -c ]), remove regular-file impostor if present, and mknod the correct char device (major 188, minor 0). _open_session() SSH command exits 3 if not a char device; is_on() treats exit 3 as None (comms failure) — never kills stream.

Move to: