Can't read serial data from /dev/ttyUSB0
Clash 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
usb hardware serial-port
add a comment |Â
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
usb hardware serial-port
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
add a comment |Â
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
usb hardware serial-port
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
usb hardware serial-port
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
add a comment |Â
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
add a comment |Â
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
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
add a comment |Â
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
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
add a comment |Â
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
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
add a comment |Â
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
You have mixed up <
with >
. You have
echo -e ... < /dev/ttyUSB0
but it must be
echo -e ... > /dev/ttyUSB0
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
add a comment |Â
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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