Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    stty and serial ports


    Hi,

    I'm trying to find the right set of stty parameter settings such that I can send the string "TEST \r" to the device hooked up on my serial port. I'm using the following command: echo "TEST \r" > /dev/xxx. I'm having difficulties managing all the permutations of mapping new line characters to carriage returns and vice versa and in the end it doesn't seem like I'm having success sending the actual CR to the device. Could someone help?

    Thanks

  2. #2
    Try using the "-e" flag to echo, e.g.:
    Code:
    [user@host]$ echo -e "\r\n" > foo
    [user@host]$ cat -v foo
    ^M
    
    [user@host]$

  3. #3
    yes, that was it, thank you.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •