[wplug] Re: [wplug-bsd] CUPSD and USB printer "USB Port Busy..."

Brian A. Seklecki lavalamp at spiritual-machines.org
Mon Sep 26 21:51:08 EDT 2005


Brandon, all:

	When an application such as CUPS (or anything, really, that has to is
multi-platform, i.e. / e.x., SANE (scanning), Net-SNMP, X/Windows --
Video* - xv, v4l, other crap.), needs to talk to a platform-specific
kernel interface, it runs into trouble.

"Big trouble in Little Endian?" (bad John Carpenter joke)

	Normally this means the application developer has to write a hardware
abstraction API/Layer.  They're normally wayyyy too lazy to do so, so
what you end up with is "it doesn't work on os Y on playform Z with
hardware X".  So what the port maintainer does for that non-standard
platform is provide a handful of buggy patches consisting of #ifdef's.

	For example, the CUPS people have to take into account that when
talking to a Sun Microsystems parallel port on the SPARC platform , the
host OS could be Solaris, FreeBSD, NetBSD, OpenBSD, Linux.

	The core code will still compile, and the kernel interface my even be
the same (such as a common /dev/ device name), but the IOCTLs and other
bits change in the kernel from platform-to-platform.

It's even more fun in Linux when there are at least 4 discrete ways of
populating /dev

And then, of course, there's USB where the device name and the USB API
are different on every platform..

...and then you've got companies like HP, stuck in the 80s, protecting
the secrets of their Postscript-driven printer like the holy grail.

	It's just all bad; printing, scanning, video capture, all a
shit-state-of-affairs in UNIX because it's impossible to get two or more
groups of people to agree on an API layering scheme.

~BAS


On Mon, 2005-09-26 at 20:50, Brandon Kuczenski wrote:
> So I just found out that in fact the OS does matter when running CUPS.  So 
> I have moved my line of questioning to the FreeBSD list.
> 
> I have installed an HP LaserJet 2550 series printer.  Thanks to Bill 
> Moran's suggestion about path, I have modified root's path to put 
> /usr/local/bin before /usr/bin, which is something that the cups 
> installation documentation actually specified.
> 
> So, on to the next problem, which I fear is a FreeBSD/USB problem rather 
> than a CUPS problem.  Currently, lpstat is telling me "USB Port Busy; will 
> retry in 30 seconds...".  It will continue to tell me that until I unplug 
> the USB cable and plug it into a different USB port.  At that point, the 
> printer roars back to life and prints another document from its job queue. 
> Sometimes it finishes that job; sometimes it doesn't; in any case, the 
> printer then returns to a stalled state, even when there are jobs in the 
> queue.
> 
> Then I try to poke at stuff.  I pause and restart the printer, for 
> example... that returns me to "USB Port Busy; will retry in 30 
> seconds...".  Holding and releasing the print job doesn't seem to do 
> anything.  Restarting the daemon doesn't do anything.
> 
> Setting LogLevel debug in CUPS doesn't give me anything useful ... it just 
> seems like the whole daemon is sitting on its hands waiting for something 
> magical to happen with the USB port.
> 
> I noticed there is no section for USB in the handbook.  I don't really 
> know how it works or what sorts of settings to look at, but it certainly 
> isn't reasonable for me to unplug the USB cable every time someone wants 
> to print.
> 
> I did see somewhere that the 'uhid' kernel module (for "Human Interface 
> Devices") can interfere with the 'usb' kernel module -- that was when I 
> was researching UPSs[1].  My kernel has uhid enabled.  Could that be an 
> issue here?
> 
> -Brandon
> 
> 
> [1] http://www2.apcupsd.com/3.10.x-manual/Apcupsd_Known_USB_Issues.html -- 
> towards the bottom of the page.
> _______________________________________________
> wplug-bsd mailing list
> wplug-bsd at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug-bsd



More information about the wplug mailing list