• Please review our updated Terms and Rules here

Unix printing problems

RichCini

Veteran Member
Joined
Aug 7, 2005
Messages
547
Location
Long Island, NY
All --

I'm making progress getting my IPX configured -- this weekend I was working on getting network printers to work, but not having much success yet. Here's what I've done so far, so maybe someone can tell me where I've gone sideway with it.

I have a Canon IP-enabled printer that can print using LPD on port 515 (which I think is standard). Everything is on the same subnet, and I can ping the printer @ 192.168.1.65 (fixed IP) from SunOS. I've done the following:

  1. Edited /etc/hosts to add an entry "192.168.1.65 CanonLPD"
  2. Added an entry in /etc/printcap for the printer: np|Network Printer:|np|Network Printer:\:rm=CanonLPD:\
    :sd=/var/spool/lpd/npd:\
    :lf=/usr/adm/lpd-errs:\
    🇸🇭\
    :pw#0:\
    :mx#0:
  3. Fiddled with the folder /var/spool/lpd/npd. "chown root npd", "chgrp daemon npd", and "chmod 755 npd"
  4. I've used "lpr -Pnpd {filename}" to print a file.
If I run "lpc stat", it reports that queueing and printing are enabled, it has no entries, and no daemon is present. So, I ran "lpc enable all" and it says the daemon is running. Still, nothing prints.

So, I think I'm pretty close to get this working, but I'm wondering where I've gone wrong with it.

Any input would be appreciated.

Rich
 
Thanks. What's interesting is that there are different on-line guides, supposedly for the same version of SunOS, with different instructions. Will need to thread my way through Chapter 7.

Rich
 
Some progress based on reading Chapter 7, but still no output -- the printer wakes-up, which is good. I'm using "lpr -Plp1 {filename}" to send a job. Here's my printcap entry:

#Printer #1 lp1|Canon LBP612:\ :lp=/dev/null:\ :rm=CanonLPD:\ :rp=lp1:\ :mx#0:\ :sh:\ :sd=/var/spool/lpd:\ :lf=/var/adm/lpd-errs:

Will continue to experiment and see if I can nudge this along. I have run "lpc enable all", which shows the daemon running, but "lpstat -a" says it's not.

Rich
 
Does the printer support raw ASCII text sent to it or does it want the print job sent in some other format? I guess you haven't told us what type of files you are trying to print.
 
Does the printer support raw ASCII text sent to it or does it want the print job sent in some other format? I guess you haven't told us what type of files you are trying to print.
I just looked at the printer specs -- it's a fairly new printer -- and it does work with Linux and supports IPP/LPD -- but it doesn't mention anything about input format, but I'd guess that it would accept PS, PCL and HPGL formats.

The test file I was sending was ASCII text, but I guess if I run OpenWindows, maybe PostScript. I just read something about a "auto select" parameter to the first line of the printcap entry. Will try that, but other suggestions would be appreciated.

Rich
 
With a laser printer (or any other "page rather than line printer) if you are sending plain text you may have to add a FF character or an equivalent "next page" to get the printer to print and eject the sheet of paper.

You might be able to do that from printcap as some form of page footer or post print command.
 
Is there a way to set up a "generic" printer that would be mostly similar to your real printers?
 
These printers should support both IPP and LPD, so they should work. The printers use a fixed IPs and I can ping the printers from the IPX so I know the pipe is there.

I took a Raspberry Pi 3B+ and installed CUPS to act as a Unix print server. As of now, I can print a test page from CUPS to my Canon multi-function printer (MF8200C), but I'm still unable to print from the IPX through the CUPS server. The SunOS error I get is "waiting for queue to be enabled on CupServer" (CupServer is the host name related to the IP of the RPI). I've used cupsenable and cupsaccept to make sure it's running, and "systemctl status cups" reports it's running. So, not sure where to go from here but at least half of the connection is working.

If I can get this running, I plan on documenting it on my IPX web page because I have to believe someone else is going to need this at some point.
 
You could try using wireshark to figure out what CUPS is doing that SunOS is not.
 
Wireshark revealed a few things. I can see the request going from the SparcStation to the CUPS server, its acknowledged, then it dies. So, I setup another printer on my Mac which uses Bonjour and IPP to communicate with the CUPS server. Seems like it's very sensitive to which driver is selected and which protocol (in this case, needs to be IPP + built-in CUPS filter; the PPD file from Canon's Linux 32-bit driver barfs). I can print from the Mac, so that's good (not that I need it for the Mac, but it proves the overall setup works). Wireshark shows the request, acknowledgement, and then the data transfer.

Next, I fired-up the IPX. Wireshark shows the inbound LPD request and the acknowledgement, but no data transfers. So, something's getting hung-up between the IPX and CUPS. Kind of wonder whether there may be subtle differences in the LPD protocol or if the CUPS configuration needs to be changed somehow.
 
Did some additional work tonight. I read that you also need to install the cups-bsd package on the RPI to enable lpd/lpr. Not sure why that's not installed with CUPS, but whatever. I restarted the service, but no success. Here are some pictures. The first, you can see the jobs and that they're in the spooling queue, and in the second, you can see that all looks fine. If anyone has suggestions for what I can try, let me know. I'm kind of stuck for now.

Thanks!
Rich

IMG_3206.jpgIMG_3207.jpg
 
Back
Top