home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!think.com!unixland!public!comet!andrew
- From: andrew@comet.public.sub.org (Andrew Fleming)
- Subject: Re: Reading from serial devices
- Message-ID: <Bu88oq.Ix0@comet.public.sub.org>
- Organization: Unisys Germany
- X-Newsreader: Tin 1.1 PL4
- References: <rob.715170470@marsh>
- Date: Mon, 7 Sep 1992 21:22:02 GMT
- Lines: 43
-
- rob@marsh.cs.curtin.edu.au (Robert Alley) writes:
- : Apologies if this is a really stupid problem, but I'm no wizzard and its
- : got me stumped.
- :
- : I have recently had to modify some code for reading two devices connected to
- : the serial ports on a PS/2 running AIX. The code uses the low level open,
- : and read commands to set up and read from the ports (well setup with IOCTL).
- : One device (a grain analyser) is connected at 1200 baud, the other (a weigh-
- : bridge) ate 4800 baud. The code is linked to a database which is running as
- : two processes, one reading each device. Data from the 1200 baud device is
- : being lost as it appears not to be buffered. I tried changing to use higher
- : level fget and fopen which I thought were buffered but still no luck. They
- : even fail when used in two small programs running in the background, do to
- : much and the 1200 device drops characters. Getty's are disabled in
- : /etc/inittab fro the two ports for what its worth.
- :
- : Any ideas on where I'm going wrong? This is bugging the hell out of me, as
- : it's obviously a pretty simple stuff up on my part, oh yeah catting from the
- : devices never seems to drop characters no matter how much processing is
- : going on and how lower priority I run the cat at.
- :
- : Many Thanks,
- :
- : Rob.
- :
- : --
- : ----------------------------------------------------------------------------
- : Robert Alley | See the stars come falling down from the sky
- : GIS Honours Student | Gently passing, they kiss your tears as you cry
- : Curtin Uni. Bentley WA | See the wind come softly blow your hair from
- : Australia | your face
- : rob@cs.curtin.edu.au | And the rain come falling down in its crazy way
- : | Still I'm sad, Still I'm sad
- : | (Samwell-Smith/McCarthy)
- : ----------------------------------------------------------------------------
- Hello Robert,
- Sounds like flow control is not being used ???
-
- --
- /* Andrew Fleming andrew@comet.public.sub.org Unisys Deutschland SC-U */
- /* Am Unisys Park 1 W-6231 Sulzbach Ts. */
-
- Any opinions expressed here, are my own and NOT those of my employer.
-