[Nut-upsdev] support for newer mustek powermust model 06da:0003

Arjen de Korte nut+devel at de-korte.org
Mon Nov 26 17:13:18 UTC 2007


> "Arjen de Korte" <nut+devel at de-korte.org> writes:
>> You'll have to fix your udev rules or else run the driver as root.
>
> The udev rules in svn look correct to me
>
> /etc/udev/rules.d/52_nut-usbups.rules:SYSFS{idVendor}=="0665",
> SYSFS{idProduct}=="5161", MODE="664", GROUP="nut"
>
> but they just don't apply until I reboot. I first thought that
> udevtrigger would have been the method to apply these changes without
> reboot but the debian udev maintainer told me that manual chmod/chown
> really would be the preferred solution:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=435624

That's dealing with something completely different. This device will
always be on the same node, so changing that one is easy. Not related to
USB.

> Anyways, the strace output shows that after the kernel driver is
> detached nut manages to claim the interface:
>
> 16040 ioctl(4, USBDEVFS_CLAIMINTERFACE, {0}) = -1 EBUSY (Device or
> resource busy)
> 16040 write(2, "failed to claim USB device, trying 2 more time(s)...\n",
> 53) = 53
> 16040 write(2, "detaching kernel driver from USB device...\n", 43) = 43
> 16040 ioctl(4, USBDEVFS_IOCTL, {ifno=0, ioctl_code=21782}) = 0
> 16040 write(2, "trying again to claim USB device...\n", 36) = 36
> 16040 ioctl(4, USBDEVFS_CLAIMINTERFACE, {0}) = 0
>
> So, I'm guessing it's not a permission problem but the old mustek too
> wants 8-byte reads and zero-padded 8-byte writes.

The latter may be the case too, but you certainly had a permissions
problem too.

> If I add phoenix_subdriver to subdriver_list
>
> Index: drivers/megatec_usb.c
> ===================================================================
> --- drivers/megatec_usb.c       (revision 1163)
> +++ drivers/megatec_usb.c       (working copy)
> @@ -87,6 +87,7 @@
>  static subdriver_t *subdriver_list[] = {
>         &agiler_subdriver,
>         &krauler_subdriver,
> +       &phoenix_subdriver,
>         NULL    /* end of list */
>  };

I wanted to do that when we are certain that the phoenix subdriver is OK.

But I'm really starting to doubt that this may be related to the libusb
library that is installed on your system. What version is it?

Best regards, Arjen




More information about the Nut-upsdev mailing list