LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   testing UART ports (https://www.linuxquestions.org/questions/linux-newbie-8/testing-uart-ports-675008/)

Jurrian 10-08-2008 05:28 AM

testing UART ports
 
Hi all,

I am using embedded linux, with busybox and ash shell.

I connected 2 uart ports following the manual, but I want to test if I can send and receive between them. So I thought I open 2 minicoms and test it, only problem is that minicom is not installed..

Is there any other way to send and receive via uart ports with only the command line?

Thanx in advance,

Jurrian

theNbomr 10-08-2008 08:14 AM

In one shell:
Code:

cat > /dev/ttyS0
type some characters here. Newlines may be required to flush buffers. Ctrl-D to close.

In another shell:
Code:

cat /dev/ttyS1
You may want to configure the ports using setserial if it is available.

--- rod.

Jurrian 10-09-2008 12:15 AM

Quote:

Originally Posted by theNbomr (Post 3304061)
In one shell:
Code:

cat > /dev/ttyS0
type some characters here. Newlines may be required to flush buffers. Ctrl-D to close.

In another shell:
Code:

cat /dev/ttyS1
You may want to configure the ports using setserial if it is available.

--- rod.

Shouldn't the code of the second shell be cat > /dev/ttyS1 ??

Thanx for your answer,

Jurrian

theNbomr 10-09-2008 07:31 AM

No. You want to read the receiving device. Redirecting standard output to it would make it a sender.
--- rod.

Jurrian 10-14-2008 07:31 AM

I understand,

I tried your test, but I get a clean ttyS1, but my ttyS0 does have the input I inserted, that indicates that they are not correctly combined right?

Thanx,

Jurrian

jf.argentino 10-14-2008 08:05 AM

Maybe sounds silly, but do you use a cross cable? Sine the Rx of ttyS0 must be the Tx of ttyS1 and vice-versa


All times are GMT -5. The time now is 11:07 PM.