FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 06-20-2011, 03:45 PM
Mike Wright
 
Default howto read from serial port?

Hi all,

This sure feels like a blast from the past

I'm trying to figure out how to use com ports to communicate between two
fedora boxes.

I've figured out how to set the flow rate (stty /dev/ttyS0 115200) and
to send data: I have an 80k text file that I "cat textfile >
/dev/ttyS0" and by measuring the TX pin I see the voltage change from
-11.34v to +4.4v for about 10 seconds. Seems to be working.

The problem comes on the other end of the wire. The receiving machine
is connected by a "null modem" cable. It seems that standard
redirection should work but I can't figure out the proper shell syntax.

Input should listen to /dev/ttyS0 and whenever something is received be
sent to /dev/stdout.

Any takers? Should be fun ;D

Thanx,
Mike Wright


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-20-2011, 03:52 PM
"Dr. Michael J. Chudobiak"
 
Default howto read from serial port?

On 06/20/2011 11:45 AM, Mike Wright wrote:
> Hi all,
>
> This sure feels like a blast from the past
>
> I'm trying to figure out how to use com ports to communicate between two
> fedora boxes.

I don't know how to do that at the command line, but you could try using
moserial instead.

http://live.gnome.org/moserial

- Mike
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-20-2011, 05:05 PM
Alan Cox
 
Default howto read from serial port?

On Mon, 20 Jun 2011 08:45:02 -0700
Mike Wright <mike.wright@mailinator.com> wrote:

> Hi all,
>
> This sure feels like a blast from the past
>
> I'm trying to figure out how to use com ports to communicate between two
> fedora boxes.
>
> I've figured out how to set the flow rate (stty /dev/ttyS0 115200) and
> to send data: I have an 80k text file that I "cat textfile >
> /dev/ttyS0" and by measuring the TX pin I see the voltage change from
> -11.34v to +4.4v for about 10 seconds. Seems to be working.
>
> The problem comes on the other end of the wire. The receiving machine
> is connected by a "null modem" cable. It seems that standard
> redirection should work but I can't figure out the proper shell syntax.
>
> Input should listen to /dev/ttyS0 and whenever something is received be
> sent to /dev/stdout

cat /dev/ttyS0

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-20-2011, 05:12 PM
Rick Stevens
 
Default howto read from serial port?

On 06/20/2011 10:05 AM, Alan Cox wrote:
> On Mon, 20 Jun 2011 08:45:02 -0700
> Mike Wright <mike.wright@mailinator.com> wrote:
>
>> Hi all,
>>
>> This sure feels like a blast from the past
>>
>> I'm trying to figure out how to use com ports to communicate between two
>> fedora boxes.
>>
>> I've figured out how to set the flow rate (stty /dev/ttyS0 115200) and
>> to send data: I have an 80k text file that I "cat textfile >
>> /dev/ttyS0" and by measuring the TX pin I see the voltage change from
>> -11.34v to +4.4v for about 10 seconds. Seems to be working.
>>
>> The problem comes on the other end of the wire. The receiving machine
>> is connected by a "null modem" cable. It seems that standard
>> redirection should work but I can't figure out the proper shell syntax.
>>
>> Input should listen to /dev/ttyS0 and whenever something is received be
>> sent to /dev/stdout
>
> cat /dev/ttyS0
>

Yup, on the sending side:

# cat filename >/dev/ttyS0

On the receiving side:

# cat /dev/ttyS0 >filename

Or, better yet, "yum install minicom" on both machines and run "minicom
-D /dev/ttyS0" on each. Use "CTRL-A, S" to send a file on one and
"CTRL-A, R" to receive the file on the other, complete with error
checking using X-, Y- or Z-modem protocols.

Man, takes me back to the days of CompuServe, GEnie and dial-up BBSs!


--
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, C2 Hosting ricks@nerd.com -
- AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 -
- -
- Lottery: A tax on people who are bad at math. -
----------------------------------------------------------------------
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 04:56 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org