Serial port capture in Linux

I do a fair amount of debugging via serial port, and I usually use minicom as a terminal, where all the debug output gets dumped. Sometimes, however, I want to run experiments and just log the output. This is an area where minicom struggles.

I am now using a program called interceptty which can sit between a real or fake serial port and an application. I’m using it to redirect serial port data to a local network socket, and then using netcat to log the data to a file. Interceptty can log the data itself, but it is designed around logging binary data, and I am actually in a situation where most of what comes through is displayable ASCII.


interceptty -s 'ispeed 115200 ospeed 115200' -o interceptty.raw.log /dev/ttyS1 @localhost:6666


netcat localhost 6666 | tee -a serial_ascii.txt

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s