Re: Still looking for serial port setup

From: No, not THAT Michael Moore (michael.moore_at_nospam.com)
Date: 06/29/04


Date: Tue, 29 Jun 2004 14:17:21 -0500

John Henderson <jhenRemoveThis@talk21.com> wrote:

>"(No, not THAT Michael Moore)" wrote:
>
>> I'm still confused about serial port setup...
>> I've seen setserial, I've seen rc.serial, but I don't see what
>> I want, which is exactly the same thing as the
>> thousand-year-old DOS commands
>
>I've been watching these threads of yours for inspiration,
>because I have a similar requirement.
>
>> mode COM1:9600,n,8,1
>> mode COM2:4800,e,7,1
>>
>> I don't care about all the handshaking stuff - not right now,
>> anyway - I just want to set the baud rate, parity, data bits,
>> and stop bits...
>
> info stty
>
>seems to be the best bet for information. Because of the
>sophisticated uses to which that serial lines can be put on
>Linux systems, they are highly configurable and have many
>defaults that would make them differ from a DOS/Windows system
>(like the ability to login on a dumb terminal, and interpet
>certain control characters).
>
>If I've understood what I've read correctly, your two basic
>commands would be something like
>
> stty -F /dev/ttyS0 9600 cs8 -parenb
> stty -F /dev/ttyS1 4800 evenp
>
>You might need to add the likes of
>
> cread clocal -icanon
>
>to each to get them behaving more like the DOS equivalents, but
>that will depend on what's on the end of these lines and what
>you're doing with them.
>
>So maybe the above is a start.
>
>John

I'll give those a try when I get back to the site after the Great Pate
Ree Autic Holly Daze. I'll let you know how it goes... these devices
are pretty stoopid, so the handshaking et cetera is basically
meaningless - they're only receiving from around 6 or 7 characters
(The change machines) to maybe 40 (the customer displays), so there
really aren't any grave concerns... it just has to be the right speed
and format!

Thanks for the pointers!

 

<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>
     Yes, Michael Moore. No, not THAT Michael Moore.

     Of COURSE that's not my real email address - my
     inbox is bad enough already.
<<<<<<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>>>>



Relevant Pages

  • Still looking for serial port setup
    ... I'm still confused about serial port setup... ... No, not THAT Michael Moore. ... inbox is bad enough already. ...
    (alt.os.linux.redhat)
  • Filtering control characters in the expect buffer
    ... sends and receives data via the serial port. ... application receives control characters along with human readable data. ... nothing but the VT terminal codes. ... I am attaching a sample of the expected buffer and the actual buffer. ...
    (comp.lang.tcl)
  • Re: Adding LF to CR s when monitoring serial port in a Decterm
    ... Phil Pulley wrote: ... > I am trying to view a text stream received on a serial port by using a ... "show control characters" to debug such things. ... DECterm really needs to be spruced up to support that missing feature (show ...
    (comp.os.vms)
  • Looking for a program to read through serial Port
    ... I have a user who wants to read datas through the serial port of an ... interval.Eventhough the datas are ... His program runs on IBM as well as on a linux systems without problems. ... Tru64 version V5.1A with PK4. ...
    (Tru64-UNIX-Managers)