hp deskjet 5150

The process seems error prone.

How would I send a simple text file to a printer which I have set up using lpadmin -p myprinter?
 
Not complete but with get you started. Others can fill the gaps.

1. pkg install cups hplip

2. enable CUPS in /etc/rc.conf
cupsd_enable="YES"

3. service cupsd start

4. check dmesg or run lpinfo -v to confirm your host recognizes the USB device.

5. Open a browser and point it to localhost:631

Follow the prompts under Administration to add the printer.
 
There is supposed to be a USB option.

CUPS comes with several standard backends that communicate with printers:

  1. dnssd: The Bonjour (DNS-SD) protocol.
  2. ipp: The Internet Printing Protocol (IPP) with optional encryption.
  3. ipps: The Internet Printing Protocol with mandatory encryption.
  4. lpd: The Line Printer Daemon protocol.
  5. socket: The AppSocket (JetDirect) protocol.
  6. usb: The Universal Serial Bus (USB) printer class.

but it doesn't come up when I run lpinfo -v. Should it?
 
While the problem is unclear to me, what I at least would make sure is that the printer shows up as selectable printer in the cupsd web-interface, and the file /usr/local/etc/cups/printers.conf exists after finishing the "add printer" procedure. Afaik, this has to be done at least 1 time because it contains a unique serial number. It may require foomatic-db, which contains many non-proprietary ppd files for HP printers.

Btw, you know the secret HP hardware testpage triggered by opening the cartidge-hatch 7 times?You can exclude possibe problems of the printer itself. No idea how long this exists...
 
Is there any way to try and print a test page?

The printer has not been used for a long time and I don't know what the state of the ink is like.

Maybe I should take it to a cartridge shop and someone may be able to tell me if it works if I buy some ink.
 
should be a test-page button from the web interface. are you getting any, like, meaningful errors? have you tried any amount of reading the documentation or looking at the web interface?
 
Assuming you got it installed with cups, there's a print test page option. Click the printer, and there will be, to the left a Maintenance option. Click the drop down arrow and there's an option to print a test page.
 
but it doesn't come up when I run lpinfo -v. Should it?
Yes it should. You may need a devd rule to make the dev node accessible to CUPS.

Try 'chgrp cups' on the /dev/usb/x.y.0 device node.

To test the printer alone, try this (from the manual):

1. load plain paper in the In tray.
2. Press and hold down the Resume button until the printer starts printing a self-
test page, then release the button.
Source: https://h10032.www1.hp.com/ctg/Manual/c00043998.pdf
 
I had lpadmin -p myprinter.
per man lpadmin the -p option is used to configure that specific printer. just above that is where it describes the -d option:

The first form of the command (-d) sets the default printer or class to destination. [snip]
The second form of the command (-p) configures the named printer or class. The additional options are described below.
 
we would probably just chmod 000 /usr/bin/lp /usr/bin/lpr /usr/bin/lpq /usr/bin/lprm and then enforce that with some kind of config management so it persists across upgrades
 
Back
Top