CUPS Doesn't Find Local USB Printer


#1

Trying to connect a Canon MP270 printer to my system (Trident 18.12 (Lumina)):

trident-2053% about
Project Trident Information
--------------------------------------
OS Version: 18.12-RELEASE
Build Date: 20190113173435
--------------------------------------
TrueOS Sources Used:
  Base Repository: https://github.com/trueos/trueos
  Base Commit Branch or Tag: trueos-stable-18.12
  Ports Repository: https://github.com/trueos/trueos-ports
  Ports Commit Branch or Tag: b42445dec15979dabc50c64073c0fe08dd870a9a
--------------------------------------
System Specs:
  Boot Method: BIOS
  Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz
  Physical CPUs: 4
  Physical Memory: 15.83 GB

CUPS doesn’t find it:
CUPSwolocalUSB2019-01-22-17-13-41
On TrueOS 18.03 (Lumina) this printer worked without any glitch.

These are my packages:

trident-2053% pkg info |grep foo
foomatic-db-20181226           Database for integrating printer drivers with common spoolers
lcms2-2.9                      Accurate, fast, and small-footprint color management engine

trident-2053% pkg info |grep cups
cups-2.2.10                    Common UNIX Printing System
cups-bjnp-2.0.1                CUPS backend for Canon USB over IP protocol
cups-filters-1.21.6            Additional backends, filters and other software for CUPS
cups-pdf-2.6.1_4               Virtual printer for CUPS to produce PDF files
cups-pk-helper-0.2.6           Helper that makes system-config-printer use PolicyKit

According to some hints I started the services dbus and cups_browsed (I even added the line rc_avahi_daemon_after=“pcdm” to /etc/rc.conf.
Unfortunately the thread CUPS no local printer on the FreeBSD forum finished without a solution. Also the backend on my system is finding the printer:

root@trident-2053:/usr/home/rudy # /usr/local/libexec/cups/backend/usb 
DEBUG: Loading USB quirks from "/usr/local/share/cups/usb".
DEBUG: Loaded 165 quirks.
DEBUG: list_devices
DEBUG: libusb_get_device_list=7
DEBUG2: Printer found with device ID: MFG:Canon;CMD:BJL,BJRaster3,BSCCe,IVEC,IVECPLI;SOJ:TXT01;MDL:MP270 series;CLS:PRINTER;DES:Canon MP270 series;VER:1.010;STA:10;FSI:00;HRI:EU;MSI:DAT,E3;PDR:4; Device URI: usb://Canon/MP270%20series?serial=02A9FB&interface=1
direct usb://Canon/MP270%20series?serial=02A9FB&interface=1 "Canon MP270 series" "Canon MP270 series" "MFG:Canon;CMD:BJL,BJRaster3,BSCCe,IVEC,IVECPLI;SOJ:TXT01;MDL:MP270 series;CLS:PRINTER;DES:Canon MP270 series;VER:1.010;STA:10;FSI:00;HRI:EU;MSI:DAT,E3;PDR:4;" ""

So far nothing changed this situation. (Also booting the system with the printer already switched to on didn’t help.) Is there something else I can do to get the local printer to be recognized by CUPS?

Edit: On my test system (different hardware, different printer but also Trident 18.12-RELEASE (Lumina)) I got the same situation. The local printer (there connected via parallel port) isn’t found by CUPS.


#2

how did you log into the cups web page? root or your account?

what happens if you try the canon network printer?


#3

I logged in as root.
Of course I can select the (not existing) network printer. Which would be the right connection URI?
I tried lpd://localhost, http://localhost/ipp/port1, and lpd://localhost/bjnp here:
CUPSnetwURI2019-01-22-20-41-49
without any success. The printer is established but never working. The bjnp is a default entry by the system.


#4

dumb question. have you tried rebooting with the printer plugged in?


#5

To quote the famous @RodMyers: there are no dumb questions! :wink:

Several times I did this. Still no change.

root@trident-2053:/usr/home/rudy # dmesg | grep -i mp2
ugen1.3: <Canon MP270 series> at usbus1

#6

at the moment, no more ideas


#7

Thank you for your time! I really appreciate your devotion to the user! :+1:


#8

welcome.

I asked on Telegram, and used this link. so maybe …


#9

Hi, @RJules3.
Maybe you have to use ulpt(4).


#10

Thank you for the suggestion @phantom!

Reading this:

The ulpt driver provides support for USB printers and parallel printer
     conversion cables, including the following:

     •   ATen parallel printer adapter
     •   Belkin F5U002 parallel printer adapter
     •   Canon BJ F850, S600
     •   Canon LBP-1310, 350
     •   Entrega USB-to-parallel printer adapter
     •   Hewlett-Packard HP Deskjet 3420 (P/N: C8947A #ABJ)
     •   Oki Data MICROLINE ML660PS
     •   Seiko Epson PM-900C, 880C, 820C, 730C

doesn’t give a lot of hope but as soon as I have time I will try it with the line ulpt_load="YES" added to /boot/loader.conf and report back about the outcome.


#11

Good luck.
Maybe needs to edit /etc/devfs.rules for output to the printer.
https://www.freebsd.org/doc/en/articles/cups/article.html


#12

Now the system is updated:

trident-2053% about
Project Trident Information
--------------------------------------
OS Version: 18.12-RELEASE-U1
Build Date: 20190121163841
--------------------------------------
TrueOS Sources Used:
Base Repository: https://github.com/trueos/trueos
Base Commit Branch or Tag: trueos-stable-18.12
Ports Repository: https://github.com/trueos/trueos-ports
Ports Commit Branch or Tag: 3404c9c7a1c17f1984edac9ebc111798149bb234
--------------------------------------

The file /boot/loader.conf has now the line ulpt_load="YES".
The file /etc/devfs.rules was created:

trident-2053% cat /etc/devfs.rules
[system=10]
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*' mode 0660 group cups
add path 'lpt*' mode 0660 group cups
add path 'usb/1.4.0' mode 0660 group cups

The lines:

cupsd_enable="YES"
devfs_system_ruleset="system"

were added to /etc/rc.conf (though I know with the init system OpenRC this file isn’t very helpful).
The rc-services dbus and cups_browsed are manually started.

So a lot of things have changed but one thing is unchanged. The local printer connected via USB is not detected by cups though:

root@trident-2053:/usr/home/rudy # dmesg |grep -i MP270
ugen1.4: <Canon MP270 series> at usbus1
ugen1.3: <Canon MP270 series> at usbus1
ulpt0: <Canon MP270 series, class 0/0, rev 2.00/0.01, addr 3> on usbus1

now the printer is three times in dmesg and the cups backend still finds it:

root@trident-2053:/usr/home/rudy # /usr/local/libexec/cups/backend/usb
DEBUG: Loading USB quirks from "/usr/local/share/cups/usb".
DEBUG: Loaded 165 quirks.
DEBUG: list_devices
DEBUG: libusb_get_device_list=7
DEBUG2: Printer found with device ID: MFG:Canon;CMD:BJL,BJRaster3,BSCCe,IVEC,IVECPLI;SOJ:TXT01;MDL:MP270 series;CLS:PRINTER;DES:Canon MP270 series;VER:1.010;STA:10;FSI:00;HRI:EU;MSI:DAT,E3;PDR:4; Device URI: usb://Canon/MP270%20series?serial=02A9FB&interface=1
direct usb://Canon/MP270%20series?serial=02A9FB&interface=1 "Canon MP270 series" "Canon MP270 series" "MFG:Canon;CMD:BJL,BJRaster3,BSCCe,IVEC,IVECPLI;SOJ:TXT01;MDL:MP270 series;CLS:PRINTER;DES:Canon MP270 series;VER:1.010;STA:10;FSI:00;HRI:EU;MSI:DAT,E3;PDR:4;" ""

#13

After reading this on telegram Trident channel:
CUPSusb2019-02-15-13-17-40
I edited my /etc/devd-openrc.conf accordingly and rebooted the system.
Again no change.
Then I disconnected the usb plug of the printer from the running system and reconnected it.
Voila - the printer was found and now I can print on the local printer again.
I don’t know, if any of the many changes were necessary or only the connecting process on the running system. Nevertheless a big thank you to Jim Brown for his post on Telegram!