home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / programm / 4493 < prev    next >
Encoding:
Text File  |  1992-08-30  |  2.2 KB  |  45 lines

  1. Newsgroups: comp.unix.programmer
  2. 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
  3. From: rob@marsh.cs.curtin.edu.au (Robert Alley)
  4. Subject: Reading from serial devices
  5. Message-ID: <rob.715170470@marsh>
  6. Sender: news@cujo.curtin.edu.au (News Manager)
  7. Organization: Curtin University of Technology
  8. Date: Sun, 30 Aug 1992 10:27:50 GMT
  9. Lines: 34
  10.  
  11. Apologies if this is a really stupid problem, but I'm no wizzard and its
  12. got me stumped.
  13.  
  14. I have recently had to modify some code for reading two devices connected to
  15. the serial ports on a PS/2 running AIX.  The code uses the low level open,
  16. and read commands to set up and read from the ports (well setup with IOCTL).
  17. One device (a grain analyser) is connected at 1200 baud, the other (a weigh-
  18. bridge) ate 4800 baud.  The code is linked to a database which is running as
  19. two processes, one reading each device.  Data from the 1200 baud device is
  20. being lost as it appears not to be buffered.  I tried changing to use higher
  21. level fget and fopen which I thought were buffered but still no luck.  They
  22. even fail when used in two small programs running in the background, do to
  23. much and the 1200 device drops characters.  Getty's are disabled in
  24. /etc/inittab fro the two ports for what its worth.
  25.  
  26. Any ideas on where I'm going wrong?  This is bugging the hell out of me, as
  27. it's obviously a pretty simple stuff up on my part, oh yeah catting from the
  28. devices never seems to drop characters no matter how much processing is 
  29. going on and how lower priority I run the cat at.
  30.  
  31. Many Thanks,
  32.  
  33. Rob.
  34.  
  35. --
  36. ----------------------------------------------------------------------------
  37. Robert Alley        | See the stars come falling down from the sky
  38. GIS Honours Student     | Gently passing, they kiss your tears as you cry
  39. Curtin Uni. Bentley WA  | See the wind come softly blow your hair from
  40. Australia        |   your face
  41. rob@cs.curtin.edu.au    | And the rain come falling down in its crazy way
  42.             | Still I'm sad, Still I'm sad
  43.             | (Samwell-Smith/McCarthy)
  44. ----------------------------------------------------------------------------
  45.