# How to print and scan with the HP deskjet 2721e all-in-one printer/scanner ?



## honeybear (Nov 29, 2022)

Hello,

How to print and scan with the HP deskjet 2721e all-in-one-drucker ?
I run FreeBSD AMD64 Stable.
It seems to not work with CUPS.

However, in Ubuntu Stable AMD64, I can print well so far.

Kind regards
Honeybear


----------



## SirDice (Nov 29, 2022)

honeybear said:


> I run FreeBSD AMD64 Stable.


Ambiguous version, most people use some -RELEASE version, so either 12.3-RELEASE or 13.1-RELEASE. There are -STABLE versions too (12-STABLE and 13-STABLE) but contrary to what you might think those are _development_ versions (the 'stable' here refers to the ABI, not its fitness to run).


----------



## T-Daemon (Nov 29, 2022)

Try print/hplip

pkg-descr

```
HPLIP (HP Linux Imaging & Printing) is an HP-developed solution for printing,
scanning, and faxing with HP inkjet and laser printers in Linux. The HPLIP
project provides printing support for 3,171 printer and scanner models,
including Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business
Inkjet, LaserJet, Edgeline Multi-function Printers,LaserJet MFPs and ScanJets.
```


----------



## tuxador (Nov 29, 2022)

With CUPS you can add the printer in the web interface and choose Generic=> IPPEverywhere driver.


----------



## honeybear (Dec 2, 2022)

tuxador said:


> With CUPS you can add the printer in the web interface and choose Generic=> IPPEverywhere driver.


On ubuntu, no idea how it works, but it works readily out the box.

no idea if it uses HPLIP


----------



## CuatroTorres (Dec 2, 2022)

I have never used a printer on FreeBSD. Is CUPS running?

For the scanner I added a program, for example skanlite or xsane, and followed the configuration instructions:
`pkg info -D sane-backends`


----------



## l2f (Dec 3, 2022)

I use cups with FreebSD on 13.1, 13.0, 12.3 without any problems: I have samsung and canon printers.

plug you printer and see if FreeBSD recognized it:
`$ dmesg -a`

you should see something as:
`ulpt0 on uhub1
ulpt0: <Name of your printer_HERE> on usbus0
ulpt0: using bi-directional mode`

You need to download the ppd from https://openprinting.org/driver/

With cups you can try to run the backend depending of the connexion used by your printer:
`/usr/local/libexec/cups/backend/dnssd
/usr/local/libexec/cups/backend/http
/usr/local/libexec/cups/backend/https
/usr/local/libexec/cups/backend/ipp
/usr/local/libexec/cups/backend/ipps
/usr/local/libexec/cups/backend/lpd
/usr/local/libexec/cups/backend/snmp
/usr/local/libexec/cups/backend/socket
/usr/local/libexec/cups/backend/usb`


This the output when I ran the usb backend:

`$ /usr/local/libexec/cups/backend/usb
DEBUG: Loading USB quirks from "/usr/local/share/cups/usb".
DEBUG: Loaded 118 quirks.
DEBUG: list_devices
DEBUG: libusb_get_device_list=10
DEBUG2: iSerialNumber="3961BKBP224686D."
DEBUG2: Printer found with device ID: MFG:Samsung;CMD:GDI;MDL:ML-1610;CLS:PRINTER;MODE:GDI;STATUS:IDLE; Device URI: usb://Samsung/ML-1610?serial=3961BKBP224686D.
direct usb://Samsung/ML-1610?serial=3961BKBP224686D. "Samsung ML-1610" "Samsung ML-1610" "MFG:Samsung;CMD:GDI;MDL:ML-1610;CLS:PRINTER;MODE:GDI;STATUS:IDLE;" ""`

For the scanner (may be, do not have an all-in-one printer yet):
You need to install:

graphics/sane-backends
graphics/xsane if you use X11
Plug your printer and see if FreeBSD recognized it:
`$ dmesg -a`

you should see something as:
`ugen0.3: <YOUR_SCANNER_NAME Scanner> at usbus0`


----------



## shepper (Dec 4, 2022)

The issue your run into is that Linux/BSD_Unix probe usb connections during boot, match the usb id and attach a driver.  For all-in-one printer/scanners, in cups or lpr, you can either attach the printer driver or a scanner driver - not both.  print/hplip will provide both printer and scanner to the usb port.   If you want printing and scanning via the usb port, you need to use hplip and grant user access via /etc/devfs.rules(5).  This would be the easiest way for a fully functional device.

Based on these Product Specifications for the HP DeskJet 2721e All-in-One Printer
you can use ghostscript drivers for PCL 3 and PCLm and wireless connectivity.

It is possible in linux to access both the scanner and the printer over the wireless network.  I have not set this up in FreeBSD but theoretically, you could split access with printing over wireless and scanning over usb.


----------



## tuxador (Dec 4, 2022)

honeybear said:


> On ubuntu, no idea how it works, but it works readily out the box.
> 
> no idea if it uses HPLIP


No it uses a generic driver which supports many models of printers.
It's popular thanks to Mac OS


----------



## alexseitsinger (Dec 5, 2022)

Ya, good *LUCK PRINTING*. Its not even worth it since we're all basically digital, now so who cares. Sadly, around these parts--whether your unexpectedly enthusiastic about having to install additional (OPTIONAL) software _(a.k.a using CUPS)_ or settling with the very inclusive (btw happy about that) base system of essential, need-to-have, executables--doing something as arcane as arranging ink on a single slice of your finest off-white 8 11 paper so my boss still doesnt fire me is still technically "not possible", but more of a pipe dream. *You're way better off transmitting that message by scrawling it in cursive.*


----------



## alexseitsinger (Dec 5, 2022)

BTW, I know that I shouldn't have wasted the last fourteen days trying to print "alexseitsinger" because it never worked--nope for both LPR and CUPS. But I think it was worth it because I learned about my printer and I didn't realize how much unused printing paper I have. Like a lot. It covers my entire adult men's t-bed (twin).


----------



## CuatroTorres (Dec 5, 2022)

Open, abandoned and looking down on threads. It's time to move on to something else.


----------

