Edited:
I have data acquisition hardware that sends out serial data via UART into FTDI (serial to USB) device. The FTDI is plugged into USB port and its port name is /dev/ttyUSB0
. This device outputs data in the following format:
data line 1\r
data line 2\r
...
data line n\r
I tried using screen to view the data by entering the following command:
screen /dev/ttyUSB0 115200
The screen begins to show all data on one line, so I see a single line flashing. How can I add a newline character at the end of each line so that the screen begins to separate the lines?
Original:
I am using a serial device that terminates lines with just carriage return. Is it possible to configure screen to add a nl (new-line) character for every cr character?
Thanks…
EDIT: Was not able to get this working with screen, picocom works great. I use the following command picocom -b 115200 --imap crcrlf /dev/ttyUSB0
.
Best Answer
I know this isn't answering the exact question you have, but I normally jump to
miniterm.py
when presented with this kind of device because I've never found a way to do what you want with screen.miniterm.py
is minimal like screen and does the 'right thing' by default with\n
. On the downside, my fingers don't know how jump around, quit and log, etc, so I still live in hope there's a way to do the right thing inscreen
On OS X:
gives me nice output when screen would have scrawled all over the place.
pySerial comes with
miniterm.py
as far as I understand