home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / sun / admin / 9761 < prev    next >
Encoding:
Internet Message Format  |  1992-12-28  |  3.0 KB

  1. Path: sparky!uunet!dove!cam!jhazen
  2. From: jhazen@cam.nist.gov (Jonathan Hazen)
  3. Newsgroups: comp.sys.sun.admin
  4. Subject: Re: deciphering printcap fc,fs,xc,xs fields
  5. Message-ID: <9963@fs3.cam.nist.gov>
  6. Date: 28 Dec 92 19:42:45 GMT
  7. References: <9960@fs3.cam.nist.gov> <16088@auspex-gw.auspex.com>
  8. Sender: news@cam.nist.gov
  9. Organization: National Institute of Standards and Technology, Gaithersburg, MD
  10. Lines: 67
  11.  
  12. Having read the printcap, ttcompat, and termio manual pages I'm still
  13. quite confused about how to decipher the following fields from my 
  14. printcap file:
  15.  
  16.      fc#0000374:fs#00000003:xc#0:xs#0040040:
  17.  
  18. I need to translate these magic numbers into an equivalent ms field.
  19.  
  20. My first thought was to simply forget about these magic numbers 
  21. and use ms instead.   To figure out what to use for the ms field, I
  22. experimented by sending a postscript file directly out the serial port.
  23. The following worked perfectly:
  24.  
  25.     (stty -parity crtscts; cat root.ps ) > /dev/ttya
  26.  
  27. I was able to observe flow control in action
  28. on my breakout box and the entire postscript file printed correctly.
  29.  
  30. However, when I used the above stty values as the values for the ms
  31. field in /etc/printcap, nothing printed, and after a while lpq reported
  32. a printer error.  
  33.  
  34. Watching the breakout box,
  35. I saw that a dialog takes place between the Sun and the PostScript printer.
  36. I compared the dialog that takes place when I use the magic numbers fields
  37. with the dialog that takes place when I use the ms field.
  38.  
  39. When I use the magic numbers, the Sun sends something, a second or so
  40. later the printer sends something back, then transmission of the job 
  41. commences.  When I use ms=-parity,crtscts, the Sun sends something, a second or
  42. so later the printer sends something back but the job doesn't then commence
  43. transmission.  
  44.  
  45. Thus, my hypothesis is that I need to include some stty input option in
  46. the ms field so that the Sun can understand the reponse from the printer.
  47.  
  48. The options I've tried are:  igncr, and -istrip.  Neither of these in any
  49. combination work.  Sun suggested that I try -cread and -clocal.  I'm not
  50. completely clear what these options do, but they didn't work. 
  51.  
  52. I figure I could spend a long time guessing at what input options are necessary.
  53. However, clearly the magic numbers configure the port so that this initial
  54. dialog works.  Thus, if someone can tell me how to map the magic numbers 
  55. into the equivalent ms field, I should be able to spare myself a great deal of trouble.
  56.  
  57. Below is the actual dialog that occurs.  As you can see, the
  58. printer sends back a response with lines separated by CRLF, which is what made
  59. me try the igncr option.
  60.  
  61. I sure would appreciate some help, because I'm stumped.
  62.  
  63. Thanks,
  64. Jonathan
  65.  
  66.  
  67. I connected a data communications monitor between the Sun and the printer
  68. and captured the dialog.  The Sun sends:
  69.  
  70.      LF(%%[ pagecount: )print statusdict/pagecount get exec(                )
  71.      cvs print(, 2398 1 ]%%)=flushLFET
  72.  
  73. To which the printer replies:
  74.  
  75.      %%[ pagecount: 10132, 2398 1 ]%%CRLFET
  76.  
  77. (I've used LF for line feed, CR for carriage return and ET for end of
  78. transmission.)
  79.