Re: udev-ish replacement for hal-cups-utils?
On Thu, 2009-07-23 at 00:10 +0200, Till Kamppeter wrote: > >> The very last change is to take into account that serial numbers can be > >> shorter than 12 characters. > > > > Serial numbers from the Device ID field can be any length, yes, but > > 'serial' in that context is the USB serial number. As I understand it > > these must have a minimum of 12 characters. > > > > But as usually serial numbers of the hardware devices get used here, we > must support also these, so we must use any non-empty string. What I'm saying is that the 'serial' variable is *always* the USB serial number, and never the SERN field (that's id->sern). Tim. */ signature.asc Description: This is a digitally signed message part ___ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel
Re: udev-ish replacement for hal-cups-utils?
On Thu, 2009-07-23 at 12:21 +0200, Till Kamppeter wrote: > "hp:/usb/HP_Color_LaserJet_CM3530_MFP?serial=CNFND01964" contains a USB > serial number, but this serial number has only 10 characters. OK, we'll have to be less strict about that then. That's a shame. Tim. */ signature.asc Description: This is a digitally signed message part ___ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel
Re: udev-ish replacement for hal-cups-utils?
On Thu, 2009-07-23 at 10:49 +0200, Till Kamppeter wrote: > You are missing the NULL check here (musb.c, line 2083): > > ieee1284_id = udev_device_get_sysattr_value (ddev, "ieee1284_id"); > strncpy (device_id, ieee1284_id, len); > device_id[len - 1] = '\0'; Thank you, fixed. > An additional strange thing here is that we reach this point as without > usblp the libusb method should always obtain the device ID. So perhaps > the code has another bug and I got my device IDs always by the kernel > module/udev method? Perhaps the permissions are not correct on /dev/bus/usb/xxx/yyy? Tim. */ signature.asc Description: This is a digitally signed message part ___ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel
Re: udev-ish replacement for hal-cups-utils?
On Wed, 2009-07-22 at 22:11 +0200, Till Kamppeter wrote: > How do you handle the enabling and disabling the Fax queues when the > printer is connected or disconnected? I didn't, but I've added that. The way udev-configure-printer does it now is to identify the device URIs that match the device, then look for "paired" device URIs where the URI is the same as one of our matching ones but the scheme is different. We then consider that device URI as associated with the device as well. > And if you add a fax queue with > udev-add-printer triggered by the missing print queue, do you make sure > thatb there was no fax queue yet? No, thank you for spotting it. Fixed. > My suggestion is to also check hpfax: URIS and to match them with the > device ID of the detected device by searching manufacturer name, model > name, and serial number in the device URI (not the device ID), like you > do already with serial numbers. I don't want to make any assumptions about the structure of a device URI because (a) there's no standard way of forming them for backends to adhere to, and (b) any given backend may decide to change the format of its advertised URIs. Looking for the USB serial number is a special case, and is done as a last resort. Even then, it is done in an entirely generic manner, not expecting it to appear anywhere particular in the URI, but hoping it will appear somewhere. It happens that this is the case for at least two CUPS backends. Tim. */ signature.asc Description: This is a digitally signed message part ___ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel
Re: udev-ish replacement for hal-cups-utils?
On Thu, 2009-07-23 at 17:02 +0200, Till Kamppeter wrote: > OK, have you already implemented that? Can you commit it to the git repo? I merged the udev branch in 1.1.x yesterday and further fixes have been going there. Tim. */ signature.asc Description: This is a digitally signed message part ___ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel
Re: udev-ish replacement for hal-cups-utils?
Tim Waugh wrote: > On Thu, 2009-07-23 at 17:02 +0200, Till Kamppeter wrote: > >> OK, have you already implemented that? Can you commit it to the git repo? >> > > I merged the udev branch in 1.1.x yesterday and further fixes have been > going there. > I've tested it with an ML-1610 and it worked fine except it gets configured two times because of the udev rule which triggers the helper upon the low-level addition and the lp one. Will test it further with some other different printers tomorrow. Thanks, ___ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel
Re: udev-ish replacement for hal-cups-utils?
On Thu, 2009-07-23 at 19:15 +0300, Ozan Çağlayan wrote: > I've tested it with an ML-1610 and it worked fine except it gets > configured two times because of the udev rule which triggers the helper > upon the low-level addition and the lp one. I think I know how that might have happened. I've just checked in the fix. Tim. */ signature.asc Description: This is a digitally signed message part ___ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel
Re: udev-ish replacement for hal-cups-utils?
On Thu, 2009-07-23 at 16:55 +0200, Till Kamppeter wrote: > I have applied it to our Ubuntu HPLIP package and now the segfault goes > away, but if there is no usblp kernel module, most device IDs do not get > read from the printers. See below. I have run the backend twice and on > both runs the same printers did not report their device IDs, all > PCL-based inkjets. I've been looking at this today. I've changed my hplip patch so that it uses some of the existing hpmud machinery to fetch the Device ID using libusb. Could you try again with CVS revision 1.3 of devel/hplip/hplip-device-id.patch? http://cvs.fedoraproject.org/viewvc/devel/hplip/hplip-device-id.patch?revision=1.3 > Is it possible that they do not get set in time before > udev-configure-printer gets started (they are set by another udev rule > file)? Yes, it's possible. Is that actually what the problem is? Can you look with strace (i.e. strace -f cupsd) to see? Which rule sets the permissions, anyway? Is it 70-acl.rules from /lib/udev/rules.d? Perhaps printers.rules ought to be set later than that (although since 'p'>'a' it already should be). Thanks for helping out with testing. Tim. */ signature.asc Description: This is a digitally signed message part ___ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel