LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-08-2008, 05:28 AM   #1
Jurrian
Member
 
Registered: Sep 2008
Posts: 58

Rep: Reputation: 15
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
 
Old 10-08-2008, 08:14 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
 
Old 10-09-2008, 12:15 AM   #3
Jurrian
Member
 
Registered: Sep 2008
Posts: 58

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by theNbomr View Post
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
 
Old 10-09-2008, 07:31 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
No. You want to read the receiving device. Redirecting standard output to it would make it a sender.
--- rod.
 
Old 10-14-2008, 07:31 AM   #5
Jurrian
Member
 
Registered: Sep 2008
Posts: 58

Original Poster
Rep: Reputation: 15
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
 
Old 10-14-2008, 08:05 AM   #6
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial Driver Failing to Register all Ports of my Quad Uart bramsey123 Linux - Newbie 0 09-13-2007 10:16 AM
Testing open ports, behind a router sekelsenmat Linux - Networking 7 06-28-2005 08:50 AM
UART : Unknown iceman911 Linux - Hardware 1 06-23-2005 10:14 PM
uart pantera Programming 5 05-21-2005 06:50 PM
Testing firewalled ports? jago25_98 Linux - Networking 12 06-06-2004 10:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration