Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When i send data via /dev/ttyUSB0 which is created by the driver pl2303 , it is always sending the data that is last time i wondering send. That meaning : if i type the command as below:

echo hello > /dev/ttyUSB0 ## the receiver can`t get any infomation
echo 1 > /dev/ttyUSB0 ## the receiver get "hello"
echo 123 > /dev/ttyUSB0 ## the receiver get "1"

that is quite odd issue...i have no idea to fix it.

BTW: my linux kernel version is 2.6.24-26-generic(Ubuntu 8.04)

share|improve this question
    
No longer supported –  Ringtail Mar 12 '12 at 20:00
add comment

1 Answer

Try appending either "\n" or "\r" to each echo statement.

i.e.

echo "hello\n" > /dev/ttyUSB0

or

echo "hello\r" > /dev/ttyUSB0

or even

echo "hello\r\n" > /dev/ttyUSB0
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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