3

I am working with a serial port (RS232), and i have come across the following.

When i list serial port settings with

stty -F /dev/ttyS0

i get, among other things:

... eof = ^D; eol = ; eol2 =

How can i set end of line charater to the line feed? That is - i do not know where to get table of character representations (so that i could understand what all ^C mean) and how should it be entered in the following command:

sudo stty /dev/ttyS0 9600 eol=<line feed>

When i try to send or recieve character data from it with

echo 'hello' > /dev/ttyS0
cat < /dev/ttyS0

all i get is blinking cursor, and no data seem to transmit.

3
  • 1
    From this I understand that the standard line feed character is CTRL+J or ^J. You could try that.
    – Jos
    Apr 18 '16 at 10:26
  • 1
    It seems your answer is correct; please post it as such; although it seems that does not resolve my actual problem
    – Srv19
    Apr 18 '16 at 12:12
  • 1
    Note...I have been collecting data from devices with RS232. Some devices have settings (mine has...Keithley) where you set which char do you want to be EOL. Apr 18 '16 at 12:52
0

From this wiki page I understand that the standard line feed character is CTRL+J or ^J. You could try that.

– Jos

Just note, that while on setting you need to type ^ as it is, while on runtime you should use CTRL itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.