I want to log the serial output of a device.
To do so, I need to
- Send a 1 second DTR pulse that resets the device
- Use a non-interactive serial monitor that outputs to stdout
So far I have not found any shell tools that can do any of the two in non-interactive mode. The idea is to start it from a systemd user service so the program can run persistently after user session stops.
Example
$ pulse-dtr /dev/ttyUSB0
$ serial-read /dev/ttyUSB0 | multilog s10000000 n5 ~/logs/
PS: I'm open to simple python scripts too