# How do you add a network printer? [SOLVED]

## pente

Everytime I am faced with configuring wifi or a printer I think, surely this time I'll google the right words to find a webpage that just tells me what steps to follow. Alas no such luck.

I am on a home network, as is the target printer. I have the printer's ip address and it responds to ping. A Mac on the same network was able to automatically detect and add the printer with no configuration. (I don't know how one is supposed to normally get the ip address, I had to ask the mac user to tell me.)

Following these instructions: https://www.cups.org/doc/network.html

I added the user to the lp and lpadmin groups. The printer supports "Bonjour" (and I have its Bonjour "name", if that is useful), so I tried "lpinfo --include-schemes dnssd -v" and got no responses. Just "lpinfo -v" gives

```

$ lpinfo -v

network lpd

network beh

file cups-brf:/

network http

network https

network ipp

network ipps

network socket
```

In the cups administration interface, "find new printers" suggests only "Virtual Braille BRF Printer".

I go ahead and try to add the printer anyhow by manually giving its address as "ipp://192.168.1.xxx:xxx/ipp/port1" (I also tried without the final "port1") as from the documentation IPP seemed the most general way to connect to printers. I used "generic" model since cups didn't list Samsung as an option. In both cases, cups fails to connect to printer when I try to print a test page.

I didn't see anything on the gentoo or arch wikis that seemed relevant. The latter suggests "Avahi" but after some examination I think that is a red herring for my problem.

Any ideas? Thank you.

Edit: Printer is Samsung ML-2851ND on wirelessLast edited by pente on Wed Jan 06, 2021 12:39 pm; edited 1 time in total

----------

## dr_wulsen

Hi Pente,

if you don't have avahi enabled, you will most likely have to enter the details manually.

Avahi is the open source variant of apples "Bonjour".

So in order to "Bonjour" your printer, you will have to have at least CUPS installed with the "avahi" useflag.

here they recommend the postscript driver for this model.

Should your model not appear in the CUPS printer list, make sure that net-print/cups-filters is installed with the "postscript" useflag;

if it does not appear anyway - you can download the PPD file (Postscript Printer Definition aka "driver") here: https://openprinting.org/ppd-o-matic.php?driver=Postscript&printer=Samsung-ML-2851ND&show=0

You can manually select the file when adding the printer by hand.

Please let me know how it goes after

*avahi

*cups-filters +postscript

*the PPD file

Good luck!

----------

## figueroa

I configure all my network printers using lpd. Try:

```
lpd://192.168.0.206/lp
```

Change the IP to the actual IP of your printer.

----------

## figueroa

You can't just fake printer compatibility by selecting generic. Get the Linux Samsung drivers here:

https://support.hp.com/us-en/drivers/selfservice/samsung-ml-2851-laser-printer-series/19134804/model/19134812

This is what your printer is compatible with. Try an existing HP PCL-6 driver or a postscript driver. Trial and error should get you a driver that works well.

ADDED: dr_wulsen is spot on.

----------

## charles17

 *pente wrote:*   

> I didn't see anything on the gentoo or arch wikis that seemed relevant. 

 

What about the printerless driving wiki article which I created based on a system without dbus, and hence without avahi and without the the driverless command?

----------

## pente

Thanks for the help, this is now solved (not sure if I can mark that someway).

Following dr_wulsen I was able to automatically find and resolve the printer. I enabled the "zeroconf" option in cups (there was no avahi option). However I ended up not needing this (except for getting the printer ip address, which in this case I happened to already know). While the printer was added, if I tried to print anything it said "Unable to locate printer".

I tried a variety of ipp / http addresses without luck (I got a lot of gibberish that looked like raw http printed out, e.g. starting "POST / HTTP/1.1").

I spent some time using information in the printer manual but their steps didn't work.

Trying avahi-browse I saw the printer, but with no mention of ipp, rather "_airport._tcp". ippfind found nothing. It seemed the printer did not support ipp, or it was not configured (the manual made it sound like it supported ipp, but their configuration instructions didn't work).

At this point I gave up on IPP and found this: https://wiki.archlinux.org/index.php/AirPort which said not to use avahi. Following those instructions I used a socket:// address instead of ipp:// or http://.

Now it printed something that looked like bad postscript (maybe). While cups says ppd is deprecated and shouldn't be used, this seemed like a ppd problem, and it felt like this was an older setup anyhow. Installing the ppd that dr_wulsen linked solved the problem. (I saw the other comments belatedly.)

----------

## figueroa

That is the expected behavior. You might find lpd:// more stable than socket. LPD is totally stable. AFAIK, of course you need the proper PPD. CUPS does not automatically know what languages your printer might speak.

Mark solved [SOLVED] editing the original subject and adding that to the end of the line.

----------

## pente

For reference, here are some of the places saying ppds are deprecated, since March 2018. I assumed that if they were deprecated then I wouldn't need to use one, but I guess this is an older printer.

https://www.cups.org/doc/man-lpadmin.html#DEPRECATED_OPTIONS "Note: PPD files and printer drivers are deprecated and will not be supported in a future version of CUPS. "

https://www.cups.org/doc/api-ppd.html

https://wiki.archlinux.org/index.php/CUPS#Printer_Drivers

https://wiki.gentoo.org/wiki/Printing "Models other than "everywhere" are deprecated and will not be supported in a future version of CUPS." "PPD files and printer drivers are deprecated and will not be supported in a future version of CUPS."

Thanks again for the help. I'll be back with another question shortly....

----------

## figueroa

Speaking, without authority or authorization:

PPD: "The rumors of my demise, though widely circulated, are overstated."

----------

