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/
------------------------------------------------------------------------
Your motives for doing whatever good deed you may have in mind will be
misinterpreted by somebody.



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

Reply via email to