I'm sorry I was not clear.  Could someone please post an example script of
a generic opening, reading, and writing to a serial port on a Linux
system? I'd like to see how to configure the port (baud rate, stop bits,
etc.) Thanks.

-----Original Message-----
From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 09, 2001 1:50 PM
To: chris morris
Cc: [EMAIL PROTECTED]
Subject: Re: Wanted: Serial Port Communication Example


On Thu, 9 Aug 2001, chris morris wrote:

> Can someone post a sample Perl script(is that what they are called,
> scripts?) that communicates with the serial port (for *nix OS).  Just
> something that opens for read/write, sends "Hello" then reads a reply
> would be great.  I've read the info in perlfaq8 and termios but I am
> having trouble putting it all together.  Thanks.


>Under Unixish systems, usually opening the appropriate device under /dev
>will give you access to the serial port.  Under Linux, for instance, you'd
>probably open /dev/ttyS0 (equivalent to COM1: under DOS).  Under Solaris,
>I believe, it's /dev/cua/a.  This is all part of the Unix philosophy
>'everything is a file'.  If you can read and write to that /dev file, you
>should be able to read and write to the serial port.

-- Brett
                                   http://www.chapelperilous.net/btfwk/




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to