# Network printing using CUPS with non-postscript printer

## ptfoof

Guys and Gals,

I have a Brother 3820CN.  It is a nice "Multi-function center".  It includes a printer, scanner fax, etc... but I have been unable to print to this printer.  According to Brother this is a network, non-postscript capable printer (although there is a queue on it called POSTSCRIPT_P1 - go figure).  Brother has some instructions on setting this up using LPD print services at http://solutions.brother.com/Library/sol/printer/linux/lpr_install.html but I am not sure of how to translate this into the cups world.  They do have a filter that I installed.

Some very specific questions would be:

1. I did, but do I need to start the CUPS server?

2. Once I start the cups server and go to localhost:631 what driver do I choose for a non-postscript printer?

It appears from what I have read that I need to send my printing through ghostscript.  I know how to emerge this, but there is no Brother driver in ghostscript, do I choose any or am I hosed.  I kinda get the feeling I am missing some big picture thingy about ghostscript.

I know that I need CUPS, but if someone could tell me If I am right that I need GHOSTSCRIPT it would help me a lot.  Do I also need GIMP-PRINT with the CUPS use flag set?

I hope that I didn't miss this information somewhere in the forums.  It seems like the other posts for network printers are for postscript capable printers.  Thanks in advance for the help.

----------

## nielchiano

sorry not to help you; I'm no printing expert too; but take a look at http://www.linuxprinting.org/

----------

## ptfoof

Thanks for the suggestion.  I have been to this site.  I find the directions there a little on the erratic side.

Here is some things about my printer.  I DO have a ppd file, and tried to install that into CUPS, but no luck.  I'm not sure that it is a problem with the PPD file as the printer does nothing.  Look at the output below and you will see that in it's default mode it has a 'service' listed as postscript.  I'm not sure if this means it will actually support PS printing directly or that this is a queue for PS files after their windows driver has massaged them.

```

Local> sh ip

IP address    192.168.1.242             Boot tries    3

Subnet mask   255.255.255.240           Boot method   STATIC

IP Gateway    192.168.1.241             Max window    4096

LPD banner    Disabled                  Timeout       60 min

LPD retry     Enabled         

LPD type      TYPE1           

 Service        Port  TCP port

 BRN_44E038_P1   P1     9100

DNS server method is AUTO

Primary DNS server address is 67.36.128.26

Secondary DNS server address is 206.141.192.60

Timeout for gateway is 5 seconds

Local> sh netbios

NetBIOS IP is Enabled

WINS server method is AUTO

Primary WINS server address is 0.0.0.0

Secondary WINS server address is 0.0.0.0

Computer name: BRN_44E038

Local> sh port

  PORT                   Port Parameters

Local> sh server

 Brother NC-100h

Name    : BRN_44E038     Serial # -

Address : 00-80-77-44-e0-38

Identification : Network Print Server

Local> sh service

 * 1 Service Name : BRN_44E038_P1     Port Name : P1

       Filter=0  BOT=1  EOT=1  Option : BQ

       Protocol :  IP   TCP Port : 9100

   2 Service Name : BINARY_P1     Port Name : P1

       Filter=0  BOT=1  EOT=1  Option : BQ

       Protocol :  IP NBI   TCP Port : 9100

   3 Service Name : TEXT_P1     Port Name : P1

       Filter=1  BOT=1  EOT=11  Option : BQ

       Protocol :  IP   TCP Port : 9100

   4 Service Name : POSTSCRIPT_P1     Port Name : P1

       Filter=0  BOT=5  EOT=4  Option : BQ

       Protocol :  IP   TCP Port : 9100

   5 Service Name : PCL_P1     Port Name : P1

       Filter=0  BOT=9  EOT=4  Option : BQ

       Protocol :  IP   TCP Port : 9100

   6 Service Name : BRN_44E038_P1_AT     Port Name : P1

       Filter=4  BOT=1  EOT=1  Option : BQ

       Protocol :  IP   TCP Port : 9100

```

Here is the output from an NMAP...

```

PORT     STATE SERVICE

21/tcp   open  ftp

23/tcp   open  telnet

25/tcp   open  smtp

515/tcp  open  printer

9100/tcp open  jetdirect

```

So it appears that somehow this supports postscript at some level.  I know it has a GDI driver and a PCL driver.  I think PCL ~ postscript.

I have tried various URI's in CUPS including different forms of:

lpd://slate/BINARY_P1

lpd://slate:9100/BINARY_P1

lpd://slate:515/BINARY_P1

lpd://slate/TEXT_P1

socket://slate:9100/POSTSCRIPT_P1

etc...

In the windows 2000 printer driver it does have a dialog box in the printer options that has "LPR" checked off and the other option (I forget what) is not checked off, so I assume that the windows printer is using LPR as well.

----------

## ptfoof

I used ethereal on my windows machine and found out that the printer driver there is using LPD commands and also that it is using port 515, not 9100.  Brother has NOT been very forthcoming with details about the printer and it's server.

I am still pursuing this and will take a few more days of staring at the CUPS paperwork.    :Embarassed: 

----------

## myuser

Brother MFC3820CN

Any news on this printer as I am trying to get it working at the moment under LPRNG.

Useful links:

http://russnelson.com/Brother-MFC-3820CN.html

http://solutions.brother.com/linux/

http://solutions.brother.com/Library/sol/printer/linux/lpr_drivers.html

http://www.lprng.com/LPRng-Reference-Multipart/index.htm

I also have a version mfc3820cnlpr-1.0.1-1.i386.deb package which has not been released on the site yet (PM me if you want this pacakge).

I am not having too much luck at the moment, but I am soldiering on  :Smile: 

I am now getting:

done   root@tech2+320               A   320 ./hi.txt                 6 22:33:19

from an lpstat, whereas before it was being refused (but still no printout).

The USB device is also proving hard to get working (I have been trying to get it working through the LAN port mainly), it does get recognised sort of under knoppix, but I have had to:

mknod /dev/usb/lp0 c 180 0

In gentoo

Which still results in checkpc -V reporting :

cannot open lp device '/dev/usb/lp0

There also appears to be a dependancy with 

libscupsimage.so.2 

## A=<NULL> number=0 process=7322

IF filter 'filterMFC3820CN' filter msg - '/usr/bin/gs: error while loading shared libraries: libcupsimage.so.2:

The above happens when I send a postscript (.ps) file through the filter.

But, I have removed CUPS from the system and LPRNG cannot be installed whilst CUPS is installed (conflict).

Anyone who has this printer and wishes to pool resource (or just knows the tricks) please PM me or post here  :Smile: 

----------

## myuser

I have managed to get the printer appearing on lsusb -v

had to add :

none        /proc/bus/usb   usbfs       defaults      0 0

to /etc/fstab

though this does appears to conflict with the:

none                /proc           proc        defaults            0 0

for some odd reason.

I can now get the lcd display to show recieving data when I use the USB connection, though no printout happens. 

The LAN connection still shows nothing. 

No errors are being reported, and all looks ok in the 

/var/spool/lpd/{printer}/status.pr files.

----------

## myuser

I had cups installed previously, and have tracked down ghostscript as being the program that assumes the use of the libscupsimage.so.2.

With -cups now added to the USE variable in /etc/make.conf

I have just removed ghostscript and am emerging it again.

Linux support at Brother adovcates using a file sent through /usr/local/Brother/lpd/filterMFC3820CN

e.g.

man a2ps | a2ps | /usr/local/Brother/lpd/filterMFC3820CN > ~/a2ps.prn

and then sending that directly to the printer

lpr -v ~/a2ps.prn

With /bin/gs using libcupsimage.so.2 and cups not installed because of the clash with lprng this initially resulted in a broken pipe.

Well, this appears to have sent something to the printer and started a little bit of printing, but now it hangs just reporting receiving data on the lcd.

-- Edit

Correction 'Data Remaining' on the LCD.

----------

## myuser

I have just been flipping the drivers around version 1.0.0 (available on the Brother site) and version 1.0.1 (emailed to me from Brother Linux Support in Japan).

Version 1.0.0 results in a broken pipe when filtering a .ps into a .prn.

Version 1.0.1 allows a filter of a .ps into a .prn without error.

e.g.

cat hello.ps | /usr/local/Brother/lpd/filterMFC3820CN > hello.prn

Unfortunatley I think the USB side has now given up the ghost (no pun intended and I am geting a connection refused, after a reboot), so i will probably flip back to sorting out the USB fully, or perhaps flipping the default printer to the LAN port and see what happpens now.

Edit:

Just in case someone is not sure where the printcap file is, it is /etc/lrpng/printcap. A printcap file can sometimes be found at /etc/printcap  but this one does not appear to belong to lprng on a default gentoo emerge of lprng, coudl have something to do with the remenants of a cups emerge.

----------

## myuser

If lsusb ever hangs it proves very hard to get rid of that process  :Smile: 

Anyone know of something stronger than kill -9 ?

----------

## myuser

Using coldplug (ACCEPT_KEYWORDS="~x86" emerge -av coldplug) managed to find the USB device, without having the /proc/bus/usb line in fstab.

----------

## myuser

I just installed debian to a spare partition and started to configure it up, got bored and booted back into gentoo.

I then fired off

echo hi | lpr

and hey presto hi got printed.

now oddly if I add a -v (for verbose)

i.e. lpr -v

nothing gets printed.

So it would appear for some very odd reason it doesn't work if -v is specified.

And of course checking the man pages apart from assuming -v is verbose has proved a good idea as -v is obsolete and refers to a raster image  :Smile: 

----------

## myuser

Finally I have it working through the network connection.

ps, pdf, text and images all work.

The USB port tends to go busy and never returns though, oh well could be my motherboard.

----------

## shwag

 *myuser wrote:*   

> Finally I have it working through the network connection.
> 
> ps, pdf, text and images all work.
> 
> 

 

Please do share!

----------

