I am using cutecom for serial port as it have a timestamp because i need to reference for two different data. But i can't log these datas with timestamp and need ms precise. Is there any suggestion?
Thanks, Selim.
21 Answer
If you don't need a terminal emulator, you can use socat with the -v option which logs all i/o with a timestamp. For example,
socat -v READLINE /dev/ttyS0,b19200,raw,echo=0 2>/tmp/logWhatever you type on the stdin of this command will be sent to the serial port ttyS0 at the given baud rate etc. And any input from the serial port will appear on stdout. In /tmp/log you will find lines like
> 2019/11/06 13:56:27.996129 length=6 from=0 to=5
hello
< 2019/11/06 13:56:37.024451 length=8 from=0 to=7
my replywhich corresponds to typing "hello\n" and getting "my reply" sent back.
1