Hello to this wonderful community.
I use a computer with MX Linux as OS. I want to access a device with a serial/UART console (Specifically, the device is a minimal computer made from 74-series ICs. See https://github.com/slu4coder/Minimal-UART-CPU-FLASH-Edition). To connect from the computer to the device, I hardwarewise use a USB-to-UART converter with a (genuine) FTDI FT232RL chip. Softwarewise, I use minicom.
It generally works, but I experience a very specific issue:
The device expects a Linefeed (LF) as newline signal (it says so on its PCB silkscreen). I can't get linux+minicom to send a LF on RETURN or ENTER. It will send a carriage return (CR).
If I connect from my computer to the device via the USB-to-UART converter and start up minicom on my computer, it will show me the device serial console - so far, so good.
But if I type in device commands into minicom and press RETURN or ENTER, the device won't process them.
However, if I use CTRL+J instead of RETURN or ENTER after my command, which gives a LF, it works fine. Equally, it works if I do not use my standard input/keyboard + minicom, but send the command from the bash like this:
echo foo > /dev/ttyUSB0
I have tried to modify my computer/linux behavior with
sudo stty -F /dev/ttyUSB0 icrnl
but to no avail.
I believe this is in principle the right command, but I tried other commands as well just to be 100% sure, like:
sudo stty icrnl
sudo stty ocrnl
sudo stty cooked
sudo stty raw
sudo stty sane
but they also did not help.
I also tried to get minicom itself to send a LF instead of a CR on RETURN or ENTER, using the "Add Linefeed" (A) option in the minicom settings menu. This did not help, either.
Do you have any suggestions how to resolve this? It is not a critical issue really as I could always use CTRL+J instead of RETURN or ENTER, but that gets a bit inconvenient over time.
Thank you!
(And sorry if my description of the problem is not very good - hobbyist and first time posting on here. Let me know if you need more information or pictures.)
According to its manual, minicom
has a CONFIGURATION setup menu with Screen and keyboard, O - Character conversion, C - edit char where you are asked the character value (in decimal) whose conversion you want
to change and you'll be asked what you
want to be sent out when you enter that character from your keyboard. If you specify for value 13 (CR) 10 (NL) to be sent, it should do want you want.