menna@mips.COM (Randy Menna) (08/05/88)
I am having some trouble getting serial printers to work under microport 386. I have a compac 386 running 2.2, with 16 computone serial ports. These ports work great when connected to a terminal, but I am unable to get them to talk to a serial printer (panisonic 1090i). I turned off the getty for the port attached to the printer, and I did a "lpadmin" to configure that port as "lp1", this seemed to work ok. However, lpstat claims files are being printed but nothing comes out of the printer. Also I do not get output when I do a "cat" to that device. I thought that this meant that the electrical signals weren't correct, but if I put a getty on that port, then it prints "login" on the printer, and files can also be "cat"ed to the printer. Any help would truly be appreciated. Thanks -Randy Menna -- Randy Menna home: 408-292-0628 UUCP: {decvax,ucbvax,ihnp4}!decwrl!mips!menna play: 408-991-0249
dave@micropen (David F. Carlson) (08/06/88)
In article <2712@quacky.mips.COM>, menna@mips.COM (Randy Menna) writes: > I am having some trouble getting serial printers to work under > microport 386. I have a compac 386 running 2.2, with 16 computone > serial ports. These ports work great when connected to a terminal, > but I am unable to get them to talk to a serial printer (panisonic 1090i). > > I thought that this meant that the electrical signals weren't correct, > but if I put a getty on that port, then it prints "login" on the printer, > and files can also be "cat"ed to the printer. You must remember that cat(1) does nothing to set up the port for serial communication. Use cu(1) or ( stty 1200 ; cat file ) < /dev/ttylp. Running the stty within the subshell makes its effects apply to the cat(1). Otherwise, on close, the port will be reset most likely to 300 baud. fodder fodder fodder fodder fodder fodder -- David F. Carlson, Micropen, Inc. micropen!dave@ee.rochester.edu "The faster I go, the behinder I get." --Lewis Carroll
hack@bellboy.UUCP (Greg Hackney) (08/06/88)
In article <2712@quacky.mips.COM> menna@mips.COM (Randy Menna) writes: >I am having some trouble getting serial printers to work under >microport 386. I bet a nickel that the problem is the baud rate setting in the "stty" line in /usr/spool/lp/interface/*. Or,a missing stty line, i.e. stty -parenb -parodd 9600 cs8 cread clocal ixon 0<&1 -- Greg
jmsully@uport.UUCP (John M. Sully) (08/08/88)
In article <2712@quacky.mips.COM> menna@mips.COM (Randy Menna) writes: >I am having some trouble getting serial printers to work under >microport 386. I have a compac 386 running 2.2, with 16 computone >serial ports. These ports work great when connected to a terminal, >but I am unable to get them to talk to a serial printer (panisonic 1090i). You probably need to change the comm line parameters to match those of your printer. The port defaults to 300 baud and you probably need to bring it up to 1200 or 9600 baud. You can do this by modifying the file /usr/spool/lp/ interface/<destination> (<destination> is the name of your printer) and adding an stty command to it which sets up the comm paramters properly. John
keith@uport.UUCP (Keith Hankin) (08/09/88)
In article <2712@quacky.mips.COM> menna@mips.COM (Randy Menna) writes: |I am having some trouble getting serial printers to work under |microport 386. I have a compac 386 running 2.2, with 16 computone |serial ports. These ports work great when connected to a terminal, |but I am unable to get them to talk to a serial printer (panisonic 1090i). | |I turned off the getty for the port attached to the printer, and I did |a "lpadmin" to configure that port as "lp1", this seemed to work ok. |However, lpstat claims files are being printed but nothing comes out |of the printer. Also I do not get output when I do a "cat" to that |device. | |I thought that this meant that the electrical signals weren't correct, |but if I put a getty on that port, then it prints "login" on the printer, |and files can also be "cat"ed to the printer. | The reason the "cat" was not working for you without the getty is because the default communications parameters for opening the serial device did not match those of your terminal. In particular, the default baud rate is 300 without a getty on the port. The proper way to cat to the device without a getty is to type "(stty 1200 0<&1; cat FILE) >/dev/tty??", assuming your printer is at 1200 baud. This is also probably why you cannot get the printer working properly. You should be using the prx, dumb or serial model (-m option to lpadmin) for a serial printer. In addition, you need to check the interface file in /usr/spool/lp/interface to make sure that the proper communications parameters (including baud rate) are set with an "stty" command. -- Keith Hankin keith@uport Microport Systems