BUG : HP Laserjet 1000, hotplug & hald

David Zeuthen david at fubar.dk
Sun Sep 5 09:34:48 PDT 2004


On Mon, 2004-08-30 at 23:17 -0400, Louis-Philippe Savoie wrote:
> There seems to be a strange incompatibility between both : hald, when the
> computer starts, seems to send data or poll the printer - I'm saying this
> because of the Laserjet 1000's weird reaction to direct cats. cat file >
> /dev/usb/lp0 sends the firmware to the printer. Therefore, maybe hald sends
> some data to the printer in a "standard" manner, ruining its firmware and
> therefore requiring it to be unplugged, replugged, and the firmware re-catted.
> 
> Annoying at best.
> 

Indeed. Sorry for the lag, btw. 

First off, what a broken way to upload firmware if I may be so bold; my
USB 802.11b does something else: it appears as one device; get it's
firmware uploaded by the kernel driver, then it does a hotplug rem and a
"new" USB device appears with a hotplug add. I think this is pretty
standard. I'm curious whether the same applies to your printer...

So, I found an interesting page that confirms what you're saying

 http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1000

this page says "The firmware of the printer must be uploaded after
turning it on. Note that you cannot simply upload it by commands like
"cat sihp1000.img > /dev/usb/lp0". The "foo2zjs" driver package contains
a script to do the upload". Do you use the foo2zjs driver package?

FWIW, the only thing we do to the printer special device file is this

	fd = open (hal_device_property_get_string (d, "printer.device"),
		   O_RDWR | O_EXCL);
	if (fd < 0)
		return;
	if (ioctl (fd, LPIOC_GET_DEVICE_ID (sizeof (device_id)),
		   device_id) < 0) {
		close (fd);
		return;
	} else
	    HAL_ERROR(("LPIOC_GET_DEVICE_ID failed: %s\n", strerror(errno)));
	close (fd);

> Anyway, I'm sending as an appendix the messages hald sent to syslog as well as
> the hotplug bootup maneuver. I'm running Debian GNU/Linux Testing/Unstable on
> an Athlon XP 2500+.
> 
> Hoping this will help,
> 

My hunch feeling is that we're racing against the linux-hotplug usb
hotplug agent (the program that uploads the firmware), but I'm not too
sure. I need some more information before it makes sense to discuss how
to fix this. I'm sure we can fix this somehow; I'm just not sure what
the best approach is.

So, please include the information requested here

 http://freedesktop.org/Software/HalTraces

especially the /var/log/messages (or whatever it's called) and the hald
traces will be useful - need to correlate timings. You will need a
recent version of HAL; 0.2.97 won't cut it (because of the debug output
format lacks timestamps).

Also please include the output of 'tree /etc/hotplug.d/default'. 

Thanks,
David

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list