CUPS USB Madness

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

CUPS USB Madness

Stephan Schindel
Hey,

First off: I'm new to OpenBSD :). I'm running 5.6-STABLE with stable 5.6
ports tree. I've updated my CUPS installation which had some USB patches
in it. However, I cannot see my printer via
webinterface/Administration/Add Printer. The only options I can choose
from are "Other Network Printer".

However, CUPS does see my printer from the command line:

# /usr/local/libexec/cups/backend/usb
DEBUG: Loading USB quirks from "/usr/local/share/cups/usb".
DEBUG: Loaded 68 quirks.
DEBUG: list_devices
DEBUG: libusb_get_device_list=6
DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPLC;MDL:CLP-310
Series;CLS:PRINTER;STATUS:BUSY; Device URI:
usb://Samsung/CLP-310%20Series?serial=1434BAFQ600490E
direct usb://Samsung/CLP-310%20Series?serial=1434BAFQ600490E "Samsung
CLP-310 Series" "Samsung CLP-310 Series"
"MFG:Samsung;CMD:SPLC;MDL:CLP-310 Series;CLS:PRINTER;STATUS:BUSY;" ""

Here is the error.log from CUPS:

# cat /var/log/cups/error_log
E [21/Jan/2015:19:04:38 +0100] [cups-deviced] PID 18679 (dnssd) stopped
with status 1!
E [21/Jan/2015:19:05:03 +0100] [cups-deviced] PID 15727 (dnssd) stopped
with status 1!
E [21/Jan/2015:19:07:47 +0100] [cups-deviced] PID 32424 (dnssd) stopped
with status 1!
E [21/Jan/2015:19:10:17 +0100] [cups-deviced] PID 20718 (dnssd) stopped
with status 1!
E [21/Jan/2015:20:10:46 +0100] [cups-deviced] PID 28822 (dnssd) stopped
with status 1!
E [21/Jan/2015:22:32:35 +0100] [cups-deviced] PID 9479 (dnssd) stopped
with status 1!
E [21/Jan/2015:22:33:05 +0100] [cups-deviced] PID 22373 (dnssd) stopped
with status 1!
E [25/Jan/2015:21:25:02 +0100] [cups-deviced] PID 12030 (dnssd) stopped
with status 1!
E [25/Jan/2015:21:30:18 +0100] [cups-deviced] PID 19567 (dnssd) stopped
with status 1!
E [25/Jan/2015:21:31:03 +0100] [cups-deviced] PID 12766 (dnssd) stopped
with status 1!
E [25/Jan/2015:21:36:08 +0100] [cups-deviced] PID 27817 (dnssd) stopped
with status 1!
E [25/Jan/2015:21:40:54 +0100] [cups-deviced] PID 22098 (dnssd) stopped
with status 1!
E [26/Jan/2015:10:16:27 +0100] [cups-deviced] PID 6356 (dnssd) stopped
with status 1!
E [26/Jan/2015:10:17:40 +0100] [cups-deviced] PID 29329 (dnssd) stopped
with status 1!
E [26/Jan/2015:10:24:19 +0100] [cups-deviced] PID 3869 (dnssd) stopped
with status 1!
E [26/Jan/2015:10:40:47 +0100] [cups-deviced] PID 16580 (dnssd) stopped
with status 1!
E [26/Jan/2015:10:41:31 +0100] [cups-deviced] PID 22541 (dnssd) stopped
with status 1!
E [26/Jan/2015:10:54:49 +0100] [cups-deviced] PID 31656 (dnssd) stopped
with status 1!

dmesg output:

ulpt0 at uhub0 port 6 configuration 1 interface 0 "Samsung Electronics
Co., Ltd. CLP-310 Series" rev 2.00/1.00 addr 3
ulpt0: using bi-directional mode

Not sure if it's related to dnssd, so I hope somebody of you could help
me :)

Cheers,
Stephan

Reply | Threaded
Open this post in threaded view
|

Re: CUPS USB Madness

Maurice McCarthy
Hi,

This one comes up a lot for new users. I had it too about a year or so
ago when I started. Not on an OpenBSD machine just now but I'll rake the
memory.

First disable ulpt in the kernel config. In OpenBSD some printers just
work with ulpt but for cups you will be on /dev/usb0 or whatever.

$ sudo config -ef /bsd
ukc> help
...
ukc> quit

Can't recall the command. Might be "disable ulpt*".  You'll have to
look at man config too. The kernel (i.e. the file /bsd) will rebuild
itself for you.

Check out /usr/local/share/doc/pkg_readmes/cups* about changing device
ownership to _cups:_saned or something and run

$ sudo usbdevs -dv | more

to see which usbdevice your printer is on.

Good Luck
Moss

Reply | Threaded
Open this post in threaded view
|

Re: CUPS USB Madness

Stefan Sperling-5
In reply to this post by Stephan Schindel
On Mon, Jan 26, 2015 at 11:02:21AM +0100, Stephan Schindel wrote:

> However, CUPS does see my printer from the command line:
>
> # /usr/local/libexec/cups/backend/usb
> DEBUG: Loading USB quirks from "/usr/local/share/cups/usb".
> DEBUG: Loaded 68 quirks.
> DEBUG: list_devices
> DEBUG: libusb_get_device_list=6
> DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPLC;MDL:CLP-310
> Series;CLS:PRINTER;STATUS:BUSY; Device URI:
> usb://Samsung/CLP-310%20Series?serial=1434BAFQ600490E
> direct usb://Samsung/CLP-310%20Series?serial=1434BAFQ600490E "Samsung
> CLP-310 Series" "Samsung CLP-310 Series" "MFG:Samsung;CMD:SPLC;MDL:CLP-310
> Series;CLS:PRINTER;STATUS:BUSY;" ""

> dmesg output:
>
> ulpt0 at uhub0 port 6 configuration 1 interface 0 "Samsung Electronics Co.,
> Ltd. CLP-310 Series" rev 2.00/1.00 addr 3
> ulpt0: using bi-directional mode
>
> Not sure if it's related to dnssd, so I hope somebody of you could help me

cups can't use ulpt(4) devices because it uses libusb to access USB printers.
As far as I understand libusb requires a raw ugen(4) interface.

Remove ulpt from your kernel with config(8), something like this should
do but please refer to the man page before trying this:

  config -o bsd.new /bsd
  ukc> disable ulpt
  ukc> quit

When booting the modified kernel your printer should show up as a
ugen device and CUPS should be able to make proper use of it.

Alternatively, use lpd(8) instead of CUPS.

Reply | Threaded
Open this post in threaded view
|

Re: CUPS USB Madness

Martin Pieuchot-2
In reply to this post by Stephan Schindel
On 26/01/15(Mon) 11:02, Stephan Schindel wrote:
> Hey,
>
> First off: I'm new to OpenBSD :). I'm running 5.6-STABLE with stable 5.6
> ports tree. I've updated my CUPS installation which had some USB patches in
> it. However, I cannot see my printer via webinterface/Administration/Add
> Printer. The only options I can choose from are "Other Network Printer".

I believe you forgot some of the steps described in:

        /usr/local/share/doc/pkg-readmes/cups-*

M.

Reply | Threaded
Open this post in threaded view
|

Re: CUPS USB Madness

Stephan Schindel
Uhh yes. Thanks! It works now :)). I really missed the
after-installation note and everything is well documented there.

Steps to repduce:

- Disable ulpt in the kernel
- Reboot the new kernel
- Set correct permissions to /dev/usb and /dev/ugen according to the printer

Now everything works on my OpenBSD installation, yeehaw :)

Cheers,
Stephan

On 01/26/15 11:43, Martin Pieuchot wrote:

> On 26/01/15(Mon) 11:02, Stephan Schindel wrote:
>> Hey,
>>
>> First off: I'm new to OpenBSD :). I'm running 5.6-STABLE with stable 5.6
>> ports tree. I've updated my CUPS installation which had some USB patches in
>> it. However, I cannot see my printer via webinterface/Administration/Add
>> Printer. The only options I can choose from are "Other Network Printer".
> I believe you forgot some of the steps described in:
>
> /usr/local/share/doc/pkg-readmes/cups-*
>
> M.