michael@orcisi.UUCP (11/25/86)
Scenario: A COM port on an IBM PC is connected to a serial line on a Unix machine. On the PC, I copy/print a file to the COM port. The tty server on the unix machine receives the file and spools it to a laser printer attached to the unix machine. Assume that only simple ascii files are to be printed and transmitted. The only problem I can forsee is how will the tty server detect the end of the file? Has anyone ever tried this? Michael Herman Optical Recording Corporation 141 John Street, Toronto, Ontario, Canada M5V 2E4 UUCP: utcsri!oscvax!orcisi!michael CSNET: michael%orcisi.UUCP%omnitor.ARPA@csnet-relay.CSNET ARPA: michael%orcisi.UUCP%omnitor.ARPA@csnet-relay.ARPA ALSO: mwherman@watcgl.waterloo.edu
campbell@maynard.UUCP (Larry Campbell) (11/26/86)
In article <549@orcisi.UUCP> michael@orcisi.UUCP writes: >A COM port on an IBM PC is connected to a serial line on a Unix >machine. On the PC, I copy/print a file to the COM port. The tty >server on the unix machine receives the file and spools it to a laser >printer attached to the unix machine. Assume that only simple ascii >files are to be printed and transmitted. > >The only problem I can forsee is how will the tty server detect the end >of the file? Why not just run a KERMIT server on the UNIX tty line and use KERMIT on the PC to send the file? Not only does this solve the end of file problem, it also guarantees correct transmission of the file. -- Larry Campbell MCI: LCAMPBELL The Boston Software Works, Inc. UUCP: {alliant,wjh12}!maynard!campbell 120 Fulton Street, Boston MA 02109 ARPA: campbell%maynard.uucp@harvisr.harvard.edu (617) 367-6846 DOMAINIZED ADDRESS (for the adventurous): campbell@maynard.BSW.COM
reintom@rocky2.UUCP (Tom Reingold) (11/30/86)
In article <549@orcisi.UUCP>, michael@orcisi.UUCP writes: >A COM port on an IBM PC is connected to a serial line on a Unix >machine. On the PC, I copy/print a file to the COM port. The tty >server on the unix machine receives the file and spools it to a laser >printer attached to the unix machine. Assume that only simple ascii >files are to be printed and transmitted. > >The only problem I can forsee is how will the tty server detect the end >of the file? > >Has anyone ever tried this? > >Michael Herman Why not add a line to the file you are sending through the COM port? You can do this with a batch file rather that modifying the file. Use a batch file like the following: copy %1 COM1 echo ^D > COM1 It would send an extra newline to the port, but that should not present any severe problems. -- Tom Reingold -- Rockefeller Univ, 1230 York Av, NY 10021; (212) 570-7709 UUCP: {seismo|philabs|phri|harvard|ihnp4}!cmcl2!rna!rocky2!reintom ARPANET: reintom@rockefeller.arpa <<<<<<<->>>>>> BITNET: REINTOM@ROCKVAX -- ######################################################################## Tom Reingold -- Rockefeller Univ, 1230 York Av, NY 10021; (212) 570-7709 UUCP: {seismo|philabs|phri|harvard|ihnp4}!cmcl2!rna!rocky2!reintom ARPANET: reintom@rockefeller.arpa <<<<<<<->>>>>> BITNET: REINTOM@ROCKVAX
cforeman@dasys1.UUCP (Charles F. Foreman) (12/02/86)
In article <549@orcisi.UUCP>, michael@orcisi.UUCP writes: > Scenario: > > A COM port on an IBM PC is connected to a serial line on a Unix > machine. On the PC, I copy/print a file to the COM port. The tty > server on the unix machine receives the file and spools it to a laser > printer attached to the unix machine. Assume that only simple ascii > files are to be printed and transmitted. > > The only problem I can forsee is how will the tty server detect the end > of the file? > > Has anyone ever tried this? > > > > Michael Herman > Optical Recording Corporation > 141 John Street, Toronto, Ontario, Canada M5V 2E4 > > UUCP: utcsri!oscvax!orcisi!michael > CSNET: michael%orcisi.UUCP%omnitor.ARPA@csnet-relay.CSNET > ARPA: michael%orcisi.UUCP%omnitor.ARPA@csnet-relay.ARPA > > ALSO: mwherman@watcgl.waterloo.edu I am currently faced with a very similar (in fact, identical) situation. We are purchasing a Sperry IT, and plan to redirect all printer output to a serial port on our UNIX system. I dealt with this problem by writing a simple daemon which watches the serial port for data and writes it to a temporary file. A second program (called "unspool") sends a signal to the daemon which causes it to close the output file and pipe it into the printer spooler (or deletes it without printing if desired). Of course, using this type of arrangement you would have to go over to the UNIX system and type "unspool" after each printing. Alternatively, you could insert a special character at the end of everything sent from the PC, which would be caught and interpreted as the end of file. ---------------------------- | \/ \/ New York |------------------------ | ||\ || Mets | Charles F. Foreman | | || \ || | Datamerica Systems | | -|- \ -|- N | 101 Fifth Avenue | | / ||\ /|| \ Y | New York, NY 10003 | | /\ \/ /\ | | | || 1986 | phri!dasys1!cforeman | | /\ World Champs|------------------------ ----------------------------
tj@utcs.UUCP (12/10/86)
There are a number of solutions to this. Novell networking software (and for that matter almost any netware) must catch printer output and send it to the network printer. Their approach has two schemes. One is that every time you exit an application program in DOS you close the printer port file. The other is that after N seconds of inactivity on the printer port it is reopened and closed. This latter scheme could actually be done quite easily on unix side if you wanted. By far the better approach is to actually network the IBM PC to unix using something like 3 Com or Tops (not sure if either of these have this software quite ready yet) and use unix as a file or print server. I have seen the tops working between apple Mac and IBM PC and it is impressive. (sit on the mac and do a dir of the pc hard drive, grab a file from the pc and print it on the laserWriter on appletalk... it puts the pc on appletalk, really well too...) good luck.