4

I'm trying to use this old technology called USB ;) I call it old because all the tutorial that I find on-line deal with wireless printers or IP ones.

The man for lpadmin is very unclear how to go about adding a USB printer, and so I come here for some help.

When I print dmesg I can see my printer being detected over USB

usb 1-1.3: new high-speed USB device number 7 using dwc_otg
usb 1-1.3: New USB device found, idVendor=03f0, idProduct=2b17
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.3: Product: HP LaserJet 1020
usb 1-1.3: Manufacturer: Hewlett-Packard
usb 1-1.3: SerialNumber: FN0JW5E
usblp 1-1.3:1.0: usblp0: USB Bidirectional printer dev 7 if 0 alt 0 proto 2 vid 0x03F0 pid 0x2B17

My question is

How can I add it, because it seams this command is adding the printer but there is no communication, and I'm not sure if I have malformed the USB part:

lpadmin -p HP1020 -E -v "usb://Hewlett-Packard/HP%20LaserJet%201020?serial=FN0JW5E" -m lsb/usr/hplip/HP/hp-laserjet_1020-hpijs.ppd

Also, what would be the simplest command to check if I can communicate with the printer. I don't need to print anything, just to be able to see there is communication. This will help me debug the drivers.

David Gatti
  • 255
  • 2
  • 4
  • 11

1 Answers1

3

I found this on

http://www.openprinting.org/download/kpfeifle/LinuxKongress2002/Tutorial/VI.CUPS-Connections/VI.tutorial-handout-cups-connections.html

Local printers: Parallel, USB, serial, FireWire, SCSI

The important part here is the "device-URI". This way you tell CUPS which backend it shall use with the printer "printername". The backends for most types of local printers are already part of the CUPS package. CUPS 1.1.x contains backends for parallel, serial, and USB printers, CUPS 1.2.x will also support FireWire (IEEE 1394) and SCSI printers.

The backends do not only send data to the appropriate devices. They are also called when CUPS is started. They auto-detect which printer models are connected to which ports. So you should set up your BIOS for the parallel ports to allow bi-directional communication. Then your printer(s) can answer to the auto-detection requests.

To see which devices the CUPS backends auto-detect currently, execute them without command line options:

/usr/lib/cups/backend/usb DEBUG: list_devices DEBUG: libusb_get_device_list=13 DEBUG2: Printer found with device ID: MFG:Samsung;CMD:GDI;MDL:ML-2510 Series;CLS:PRINTER;STATUS:BUSY; Device URI: usb://Samsung/ML-2510%20Series?serial=3V61BKAQ411232V. direct usb://Samsung/ML-2510%20Series?serial=3V61BKAQ411232V. "Samsung ML-2510 Series" "Samsung ML-2510 Series" "MFG:Samsung;CMD:GDI;MDL:ML-2510 Series;CLS:PRINTER;STATUS:BUSY;" ""

In the example above my USB URI is usb://Samsung/ML-2510%20Series?serial=3V61BKAQ411232V.

You can also use the wizard GUI in Gnoime on CENTOS 7 with command

/usr/bin/python /usr/share/system-config-printer/system-config-printer.py

Link with instructions: https://www.maketecheasier.com/set-up-a-printer-in-linux/

Greg Long
  • 43
  • 5