Can't read serial data from /dev/ttyUSB0

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I am using an RS485 to USB adapter in order to communicate with hardware, whose parameters can be changed by sending data strings in hex. I set:



sudo chmod o+rw /dev/ttyUSB0
stty -F /dev/ttyUSB0 19200 -parodd


Two terminals are open. The first is:



cat -v < /dev/ttyUSB0


The second being:



echo -e "x00x00x00x10x96x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x92" < /dev/ttyUSB0


The device should send back a similar string, but I receive nothing in the first terminal. The data string being sent has been verified as the correct format by the manufacturer. Why is there no response?



edit: Just to provide some more info on this, I have also attempted in terminal 1 hexdump < /dev/ttyUSB0 to no avail. I have also toggled each of the following stty settings on/off to determine if they had any effect:



parenb, ixon, crtscts, cread


This is currently what running stty -a < /dev/ttyUSB0 looks like:



speed 19200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O;
min = 1; time = 0;
parenb -parodd -cmspar cs8 hypcl -cstopb cread clocal crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inclr -igncr -icrnl ixon -ixoff -iuclc -ixany
-ixmabel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho
-extproc






share|improve this question





















  • are you sure your device is using even parity for error checking?
    – fcbsd
    Jun 25 at 20:12










  • @fcbsd I am fairly sure. I've attempted it with other parity settings (odd, even, none, and mark) but still was unable to get a response.
    – KShire
    Jun 25 at 20:22










  • okay - it's times like this when I use a bus pirate to debug issues...sorry that doesn't help you now...
    – fcbsd
    Jun 25 at 20:33







  • 1




    @fcbsd I was unaware of the pirate bus before this, I'll definitely give it a try. Thank you!
    – KShire
    Jun 25 at 22:27














up vote
1
down vote

favorite












I am using an RS485 to USB adapter in order to communicate with hardware, whose parameters can be changed by sending data strings in hex. I set:



sudo chmod o+rw /dev/ttyUSB0
stty -F /dev/ttyUSB0 19200 -parodd


Two terminals are open. The first is:



cat -v < /dev/ttyUSB0


The second being:



echo -e "x00x00x00x10x96x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x92" < /dev/ttyUSB0


The device should send back a similar string, but I receive nothing in the first terminal. The data string being sent has been verified as the correct format by the manufacturer. Why is there no response?



edit: Just to provide some more info on this, I have also attempted in terminal 1 hexdump < /dev/ttyUSB0 to no avail. I have also toggled each of the following stty settings on/off to determine if they had any effect:



parenb, ixon, crtscts, cread


This is currently what running stty -a < /dev/ttyUSB0 looks like:



speed 19200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O;
min = 1; time = 0;
parenb -parodd -cmspar cs8 hypcl -cstopb cread clocal crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inclr -igncr -icrnl ixon -ixoff -iuclc -ixany
-ixmabel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho
-extproc






share|improve this question





















  • are you sure your device is using even parity for error checking?
    – fcbsd
    Jun 25 at 20:12










  • @fcbsd I am fairly sure. I've attempted it with other parity settings (odd, even, none, and mark) but still was unable to get a response.
    – KShire
    Jun 25 at 20:22










  • okay - it's times like this when I use a bus pirate to debug issues...sorry that doesn't help you now...
    – fcbsd
    Jun 25 at 20:33







  • 1




    @fcbsd I was unaware of the pirate bus before this, I'll definitely give it a try. Thank you!
    – KShire
    Jun 25 at 22:27












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am using an RS485 to USB adapter in order to communicate with hardware, whose parameters can be changed by sending data strings in hex. I set:



sudo chmod o+rw /dev/ttyUSB0
stty -F /dev/ttyUSB0 19200 -parodd


Two terminals are open. The first is:



cat -v < /dev/ttyUSB0


The second being:



echo -e "x00x00x00x10x96x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x92" < /dev/ttyUSB0


The device should send back a similar string, but I receive nothing in the first terminal. The data string being sent has been verified as the correct format by the manufacturer. Why is there no response?



edit: Just to provide some more info on this, I have also attempted in terminal 1 hexdump < /dev/ttyUSB0 to no avail. I have also toggled each of the following stty settings on/off to determine if they had any effect:



parenb, ixon, crtscts, cread


This is currently what running stty -a < /dev/ttyUSB0 looks like:



speed 19200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O;
min = 1; time = 0;
parenb -parodd -cmspar cs8 hypcl -cstopb cread clocal crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inclr -igncr -icrnl ixon -ixoff -iuclc -ixany
-ixmabel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho
-extproc






share|improve this question













I am using an RS485 to USB adapter in order to communicate with hardware, whose parameters can be changed by sending data strings in hex. I set:



sudo chmod o+rw /dev/ttyUSB0
stty -F /dev/ttyUSB0 19200 -parodd


Two terminals are open. The first is:



cat -v < /dev/ttyUSB0


The second being:



echo -e "x00x00x00x10x96x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x92" < /dev/ttyUSB0


The device should send back a similar string, but I receive nothing in the first terminal. The data string being sent has been verified as the correct format by the manufacturer. Why is there no response?



edit: Just to provide some more info on this, I have also attempted in terminal 1 hexdump < /dev/ttyUSB0 to no avail. I have also toggled each of the following stty settings on/off to determine if they had any effect:



parenb, ixon, crtscts, cread


This is currently what running stty -a < /dev/ttyUSB0 looks like:



speed 19200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O;
min = 1; time = 0;
parenb -parodd -cmspar cs8 hypcl -cstopb cread clocal crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inclr -igncr -icrnl ixon -ixoff -iuclc -ixany
-ixmabel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho
-extproc








share|improve this question












share|improve this question




share|improve this question








edited Jun 28 at 19:16
























asked Jun 25 at 19:01









KShire

85




85











  • are you sure your device is using even parity for error checking?
    – fcbsd
    Jun 25 at 20:12










  • @fcbsd I am fairly sure. I've attempted it with other parity settings (odd, even, none, and mark) but still was unable to get a response.
    – KShire
    Jun 25 at 20:22










  • okay - it's times like this when I use a bus pirate to debug issues...sorry that doesn't help you now...
    – fcbsd
    Jun 25 at 20:33







  • 1




    @fcbsd I was unaware of the pirate bus before this, I'll definitely give it a try. Thank you!
    – KShire
    Jun 25 at 22:27
















  • are you sure your device is using even parity for error checking?
    – fcbsd
    Jun 25 at 20:12










  • @fcbsd I am fairly sure. I've attempted it with other parity settings (odd, even, none, and mark) but still was unable to get a response.
    – KShire
    Jun 25 at 20:22










  • okay - it's times like this when I use a bus pirate to debug issues...sorry that doesn't help you now...
    – fcbsd
    Jun 25 at 20:33







  • 1




    @fcbsd I was unaware of the pirate bus before this, I'll definitely give it a try. Thank you!
    – KShire
    Jun 25 at 22:27















are you sure your device is using even parity for error checking?
– fcbsd
Jun 25 at 20:12




are you sure your device is using even parity for error checking?
– fcbsd
Jun 25 at 20:12












@fcbsd I am fairly sure. I've attempted it with other parity settings (odd, even, none, and mark) but still was unable to get a response.
– KShire
Jun 25 at 20:22




@fcbsd I am fairly sure. I've attempted it with other parity settings (odd, even, none, and mark) but still was unable to get a response.
– KShire
Jun 25 at 20:22












okay - it's times like this when I use a bus pirate to debug issues...sorry that doesn't help you now...
– fcbsd
Jun 25 at 20:33





okay - it's times like this when I use a bus pirate to debug issues...sorry that doesn't help you now...
– fcbsd
Jun 25 at 20:33





1




1




@fcbsd I was unaware of the pirate bus before this, I'll definitely give it a try. Thank you!
– KShire
Jun 25 at 22:27




@fcbsd I was unaware of the pirate bus before this, I'll definitely give it a try. Thank you!
– KShire
Jun 25 at 22:27










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










You have mixed up < with >. You have



echo -e ... < /dev/ttyUSB0


but it must be



echo -e ... > /dev/ttyUSB0





share|improve this answer





















  • I've attempted your fix and unfortunately still receive nothing back in the first terminal.
    – KShire
    Jun 25 at 19:29










  • It seems there were some previously unknown driver and device issues which I have found since posting this question. I've marked this as correct now, since if these issues had been solved at the time of posting the question, this answer would be the correct solution.
    – KShire
    Jul 6 at 18:44










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451824%2fcant-read-serial-data-from-dev-ttyusb0%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote



accepted










You have mixed up < with >. You have



echo -e ... < /dev/ttyUSB0


but it must be



echo -e ... > /dev/ttyUSB0





share|improve this answer





















  • I've attempted your fix and unfortunately still receive nothing back in the first terminal.
    – KShire
    Jun 25 at 19:29










  • It seems there were some previously unknown driver and device issues which I have found since posting this question. I've marked this as correct now, since if these issues had been solved at the time of posting the question, this answer would be the correct solution.
    – KShire
    Jul 6 at 18:44














up vote
2
down vote



accepted










You have mixed up < with >. You have



echo -e ... < /dev/ttyUSB0


but it must be



echo -e ... > /dev/ttyUSB0





share|improve this answer





















  • I've attempted your fix and unfortunately still receive nothing back in the first terminal.
    – KShire
    Jun 25 at 19:29










  • It seems there were some previously unknown driver and device issues which I have found since posting this question. I've marked this as correct now, since if these issues had been solved at the time of posting the question, this answer would be the correct solution.
    – KShire
    Jul 6 at 18:44












up vote
2
down vote



accepted







up vote
2
down vote



accepted






You have mixed up < with >. You have



echo -e ... < /dev/ttyUSB0


but it must be



echo -e ... > /dev/ttyUSB0





share|improve this answer













You have mixed up < with >. You have



echo -e ... < /dev/ttyUSB0


but it must be



echo -e ... > /dev/ttyUSB0






share|improve this answer













share|improve this answer



share|improve this answer











answered Jun 25 at 19:20









Hauke Laging

53k1281130




53k1281130











  • I've attempted your fix and unfortunately still receive nothing back in the first terminal.
    – KShire
    Jun 25 at 19:29










  • It seems there were some previously unknown driver and device issues which I have found since posting this question. I've marked this as correct now, since if these issues had been solved at the time of posting the question, this answer would be the correct solution.
    – KShire
    Jul 6 at 18:44
















  • I've attempted your fix and unfortunately still receive nothing back in the first terminal.
    – KShire
    Jun 25 at 19:29










  • It seems there were some previously unknown driver and device issues which I have found since posting this question. I've marked this as correct now, since if these issues had been solved at the time of posting the question, this answer would be the correct solution.
    – KShire
    Jul 6 at 18:44















I've attempted your fix and unfortunately still receive nothing back in the first terminal.
– KShire
Jun 25 at 19:29




I've attempted your fix and unfortunately still receive nothing back in the first terminal.
– KShire
Jun 25 at 19:29












It seems there were some previously unknown driver and device issues which I have found since posting this question. I've marked this as correct now, since if these issues had been solved at the time of posting the question, this answer would be the correct solution.
– KShire
Jul 6 at 18:44




It seems there were some previously unknown driver and device issues which I have found since posting this question. I've marked this as correct now, since if these issues had been solved at the time of posting the question, this answer would be the correct solution.
– KShire
Jul 6 at 18:44












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451824%2fcant-read-serial-data-from-dev-ttyusb0%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay