Results 1 to 3 of 3
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. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-10-2011 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 4
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
- 10-11-2011 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,745
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]$
- 10-12-2011 #3Just Joined!
- Join Date
- Feb 2008
- Posts
- 4
yes, that was it, thank you.


Reply With Quote
