home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / next / programm / 7144 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  3.2 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!sol.ctr.columbia.edu!ira.uka.de!chx400!urz.unibas.ch!lucy.ifi.unibas.ch!news
  2. Newsgroups: comp.sys.next.programmer
  3. Subject: Re: Serial port communication difficulties 
  4. Message-ID: <1992Nov11.091546.5251@urz.unibas.ch>
  5. From: frank@ifi.unibas.ch (Robert Frank)
  6. Date: Wed, 11 Nov 1992 09:15:46 GMT
  7. Reply-To: frank@ifi.unibas.ch
  8. Sender: news@urz.unibas.ch (USENET News System)
  9. References: <1992Nov10.115012.29368@doug.cae.wisc.edu>
  10. Organization: Institut fuer Informatik
  11. Nntp-Posting-Host: woodstock.ifi.unibas.ch
  12. Lines: 55
  13.  
  14. In article <1992Nov10.115012.29368@doug.cae.wisc.edu>  writes:
  15. > Friends,
  16. > This may be more UNIX than NeXT, but here goes.
  17. > I've been trying to get two way communication between a cheapy slave computer
  18. > and to a Next through their serial ports to shuffle data back and forth.
  19. > On the slave I can easily check the ports status, and if there is data,
  20. > I can read it off byte by byte. Writing is also smooth.  There are
  21. > good routines to make sure it doesn't get hung. 
  22. > But on the Next, it seems much harder.  I simply thought by opening
  23. > a file being /dev/cua, I could check the ports status via feof().
  24. > But alas, it always says theres more data there, and so it continially
  25. > gets hung on reading after the lasst charachter is read.  I tried all 
  26. > sorts of variations with the cable, conecting various permutaions of 
  27. > RTS/CTS and so on, but to no avail.
  28. > In sum, the Next has no trouble reading the data from the port.
  29. > But its only problem is that it can not find a correct answer 
  30. > for the status of the port.
  31. > Is there a simple solution or a better way?
  32. > I'll sumarize if theres enough interest.
  33. > Thanks,
  34. > Victor
  35. > v_white@janus.ece.wisc.edu
  36.  
  37. Just went through NeXT answers and found this about the serial devices and flow  
  38. control. It's possibly not what's causing you headaches but you mentioned  
  39. trying different RTS / CTS settings:
  40.  
  41. On 68040 systems, the /dev/ttyfa, /dev/ttydfa, and /dev/cufa (and corresponding  
  42. serial port B devices) may be used to enable flow control on the serial port  
  43. via the RTS and CTS signals. When the serial port is accessed via these  
  44. devices, output on the port will be halted whenever the CTS signal is  
  45. deasserted and resumed when CTS is asserted by the remote host. The RTS signal  
  46. will be asserted by the NeXT system whenever the NeXT system can receive input  
  47. on the port and will be deasserted when further input can not be accepted. When  
  48. the /dev/ttyfa, etc. devices are not used (e.g., the port is opened as  
  49. /dev/ttya), RTS is always asserted while the device is open and CTS is ignored.
  50.  
  51. To enable RTS and CTS you must use the /dev/ttyfa or /dev/cufa devices.
  52. But does this change the behavior of EOF???
  53. -Robert
  54. --
  55. Robert Frank                         tel. + (061) 321 99 67                 
  56. Institut fuer Informatik             fax  + (061) 321 99 15                 
  57. University of Basel, Switzerland                                            
  58. Mittlere Strasse 142      rfc822: frank@ifi.unibas.ch (NeXT mail accepted)  
  59. CH-4056 Basel          X400: S=frank;OU=ifi;O=unibas;P=switch;A=arcom;C=ch
  60.                    ( if all fails try frank@urz.unibas.ch )
  61.