mirror of
https://github.com/daniviga/django-ram.git
synced 2026-03-20 23:32:30 +01:00
DCC Serial-to-Network Bridge
This directory provides two ways to bridge a serial port to a network port using ncat from nmap:
- Auto-Start with systemd + udev (Recommended) - Automatically starts/stops when USB device is plugged/unplugged
- Container-based - Manual control using Podman/Docker
Important
Other variants of
ncorncatmay not work as expected.
Option 1: Auto-Start with systemd + udev (Recommended)
Automatically start the bridge when USB device 1a86:7523 is connected to /dev/ttyUSB0 and stop it when removed.
Quick Install
./install-udev-rule.sh
Features
- ✅ Auto-start when device connected
- ✅ Auto-stop when device removed
- ✅ User-level service (no root needed)
- ✅ Runs on boot (with lingering enabled)
See INSTALL.md for detailed documentation.
Test
# Run the test script
./test-udev-autostart.sh
# Or manually check
systemctl --user status dcc-usb-connector.service
telnet localhost 2560
Option 2: Container-based (Manual)
Build and run the container
$ podman build -t dcc/bridge .
$ podman run -d --group-add keep-groups --device=/dev/ttyACM0:/dev/arduino -p 2560:2560 --name dcc-bridge dcc/bridge
Test
It can be tested with telnet:
$ telnet localhost 2560