Re: Still looking for serial port setup
From: No, not THAT Michael Moore (michael.moore_at_nospam.com)
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.
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
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.