home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!mcsun!Germany.EU.net!math.fu-berlin.de!Sirius.dfn.de!darwin.sura.net!wupost!usc!cs.utexas.edu!sun-barr!ames!pacbell.com!network.ucsd.edu!munnari.oz.au!uniwa!cujo!marsh!rob
- From: rob@marsh.cs.curtin.edu.au (Robert Alley)
- Subject: Reading from serial devices
- Message-ID: <rob.715170470@marsh>
- Sender: news@cujo.curtin.edu.au (News Manager)
- Organization: Curtin University of Technology
- Date: Sun, 30 Aug 1992 10:27:50 GMT
- Lines: 34
-
- 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)
- ----------------------------------------------------------------------------
-