I have a micro-controller device that is sending newline-terminated strings through the USB-attached serial port and (so far) I'm using minicom
version 2.6 to read from /dev/ttyACM0
. I've setup the terminal application for line wrapping but I'd like it to go to the beginning of the next line when receiving a line feed character from my serial device. Can [and how does] minicom
do that?
EDIT: I've also tried ways known by me such as stty /dev/ttyACM0 ...,inlcr
and screen /dev/ttyACM0 ...,inlcr
, which I know have options to translate incoming new-line into carriage-return+line-feed (CR+LF) and none of these work either. I've tried other options as well (such as ocrnl
, in case my logic was wrong, nl
and -nl
), none work and I don't know why.
Ah, and I'm running Manjaro 16.06-rc1.
Best Answer
Took me long enough but here I am at last! I've had to download minicom source code to get an idea what to do to avoid the hassle of constantly pressing Ctrl+Z, U... Here it is.
minicom
stores its parameters in a configuration file, which defaults to$HOME/.minirc.dfl
. Put the following line, to the letter:and now
minicom
adds a carriage return to all incoming lines. I have no idea why it didn't save that option along with its configuration file in the first place but, heck, I don't care now!Beware that every option after
pu
must take exactly 16 characters, padded with spaces to the right.