Discussion:
[beagleboard] UART loopback
philippe.frossard
2015-01-16 08:48:55 UTC
Permalink
Hi,
I have a problem when I connect P9.24 (ttyO1.TX) with P9.26 (ttyO1.RX),
If I send data on serial port like this : echo 1 > /dev/ttyO1
And read data on serial port like this : cat /dev/ttyO1
The command output a lot of data indefinitely ... and my ssh link doesn't
respond,
If I remove the jumper the system come back ...
What wrong ?

Same problem with ttyO2,
Same problem with ttyO1 connected to ttyO2

I'm using kernel 3.8.13-bone69 (trying also 40 and 47) with debian 7.7,
Thanks.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stephen Agate
2015-01-16 21:29:05 UTC
Permalink
I have the same problem too on the 3.18.1 kernel.

It can be fixed by initialising the port first, with something like:
stty -F /dev/ttyO1 raw clocal -crtscts -echo

S.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Peter Hurley
2015-01-16 21:39:49 UTC
Permalink
Post by philippe.frossard
Hi,
I have a problem when I connect P9.24 (ttyO1.TX) with P9.26 (ttyO1.RX),
If I send data on serial port like this : echo 1 > /dev/ttyO1
And read data on serial port like this : cat /dev/ttyO1
The command output a lot of data indefinitely ... and my ssh link doesn't respond,
If I remove the jumper the system come back ...
What wrong ?
Same problem with ttyO2,
Same problem with ttyO1 connected to ttyO2
I'm using kernel 3.8.13-bone69 (trying also 40 and 47) with debian 7.7,
The initial state for all ttys in Linux is ECHO.
When you setup loopback, you need to turn echo off.

stty -a -F /dev/ttyO1 will show you the current termios settings for the port.
See "man termios" for the manual on Linux terminal control.

Regards,
Peter Hurley
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Philippe Frossard
2015-01-17 09:02:22 UTC
Permalink
Post by philippe.frossard
Hi,
I have a problem when I connect P9.24 (ttyO1.TX) with P9.26 (ttyO1.RX),
If I send data on serial port like this : echo 1 > /dev/ttyO1
And read data on serial port like this : cat /dev/ttyO1
The command output a lot of data indefinitely ... and my ssh link
doesn't respond,
If I remove the jumper the system come back ...
What wrong ?
Same problem with ttyO2,
Same problem with ttyO1 connected to ttyO2
I'm using kernel 3.8.13-bone69 (trying also 40 and 47) with debian 7.7,
Thanks.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google
Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
Hi,
I forgot this ...
I do this in my program

struct termios conf;
conf.c_lflag &= ~(ICANON | ECHO | ISIG);

Thank you very much.
--
Philippe Frossard
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...