home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / programm / 4624 < prev    next >
Encoding:
Text File  |  1992-09-10  |  2.5 KB  |  55 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!think.com!unixland!public!comet!andrew
  3. From: andrew@comet.public.sub.org (Andrew Fleming)
  4. Subject: Re: Reading from serial devices
  5. Message-ID: <Bu88oq.Ix0@comet.public.sub.org>
  6. Organization: Unisys Germany
  7. X-Newsreader: Tin 1.1 PL4
  8. References: <rob.715170470@marsh>
  9. Date: Mon, 7 Sep 1992 21:22:02 GMT
  10. Lines: 43
  11.  
  12. rob@marsh.cs.curtin.edu.au (Robert Alley) writes:
  13. : Apologies if this is a really stupid problem, but I'm no wizzard and its
  14. : got me stumped.
  15. : I have recently had to modify some code for reading two devices connected to
  16. : the serial ports on a PS/2 running AIX.  The code uses the low level open,
  17. : and read commands to set up and read from the ports (well setup with IOCTL).
  18. : One device (a grain analyser) is connected at 1200 baud, the other (a weigh-
  19. : bridge) ate 4800 baud.  The code is linked to a database which is running as
  20. : two processes, one reading each device.  Data from the 1200 baud device is
  21. : being lost as it appears not to be buffered.  I tried changing to use higher
  22. : level fget and fopen which I thought were buffered but still no luck.  They
  23. : even fail when used in two small programs running in the background, do to
  24. : much and the 1200 device drops characters.  Getty's are disabled in
  25. : /etc/inittab fro the two ports for what its worth.
  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. : Many Thanks,
  31. : Rob.
  32. : --
  33. : ----------------------------------------------------------------------------
  34. : Robert Alley        | See the stars come falling down from the sky
  35. : GIS Honours Student     | Gently passing, they kiss your tears as you cry
  36. : Curtin Uni. Bentley WA  | See the wind come softly blow your hair from
  37. : Australia        |   your face
  38. : rob@cs.curtin.edu.au    | And the rain come falling down in its crazy way
  39. :             | Still I'm sad, Still I'm sad
  40. :             | (Samwell-Smith/McCarthy)
  41. : ----------------------------------------------------------------------------
  42. Hello Robert,
  43.         Sounds like flow control is not being  used ???
  44.           
  45. --
  46. /* Andrew Fleming   andrew@comet.public.sub.org  Unisys Deutschland SC-U    */
  47. /*             Am Unisys Park 1  W-6231 Sulzbach Ts.                       */
  48.  
  49. Any opinions expressed here, are my own and NOT those of my employer.
  50.