[Nut-upsdev] USB match but cannot open??

Jim Klimov
Tue, 26 Nov 2024 07:50:17 -0000

Cheers,

  This error message usually deals with a couple of situations:

1) Actual lack of permissions (POSIX bits in devfs) - usually solved by
`udev` or similar subsystem that handles hotplug HW for the OS. Or by
running the driver as root and not losing the privileges (user=root in
ups.conf) as a temporary fix and check that this is the case at all;

2) Someone else has hold of the device and libusb can't take it as
exclusively as NUT needs (lsof/fuser/... to check if any other programs
hold it - maybe another copy of your driver program in debugger etc).

Happy Thanksgiving,
Jim

On Tue, Nov 26, 2024 at 4:37?AM William R. Elliot <bill at wreassoc.com>
wrote:

> Hello again.
>
> The USB device table in the driver I am working on has two entries for the
> particular vendor ID I am working with, one for each of two product
> IDs...0x0001 and 0x0002. The driver properly matches and can open the
> device with the 0x0002 product ID. However, running the same driver with
> the 0x0001 ups attached matches but fails to open.
>
> This is the relevent output following a successful match and trying to
> open the device:
>
>    0.002511     [D2] Checking device 2 of 5 (1234/0001)
>    0.002564     [D1] Failed to open device (1234/0001), skipping: Access
> denied (insufficient permissions)
>
> My expectation would be that either device, once matched, would be able to
> be opened and then further steps can be taken to confirm that the driver is
> communicating with an expected device.
>
> I would appreciate any pointers toward something I may have missed.
>
> Thank you,
>
> Bill
>
> Happy Thanksgiving to the U.S. folks!
>
>
>
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> Virus-free.www.avg.com
>
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> <#m_-6725320979215136950_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> _______________________________________________
> Nut-upsdev mailing list
> Nut-upsdev at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20241126/5b3a5654/attachment.htm>