[Nut-upsuser] usbhid-ups not loading with Arduino Leonardo on Ubuntu 23.10
Tim Dawson
tadawson at tpcsvc.com
Mon Oct 30 02:22:59 GMT 2023
"Is it possible I need to compile NUT myself instead of using the Ubuntu package?"
Certainly! For me, it's very rare that I install anything that isn't compiled from source.
As long as you have compilers and any prerequisite packages in place, it's close to a trivial process.
- Tim
On October 29, 2023 10:17:20 PM EDT, Kelly Byrd <kbyrd at memcpy.com> wrote:
>> VID 2341 doesn't show up in the NUT Git source tree.
>I was curious about this so just searched for Arduino and then 2341. I
>found a few hits, but the interesting one was in nut/drivers
>/arduino-hid.c
>
>I don't know enough about the project to know what a "subdriver" (that's
>what the comments says) is, but it looks to me like there's at least some
>people that have thought about Arduino support since 2021.
>
>Is it possible I need to compile NUT myself instead of using the Ubuntu
>package?
>
>
>On Sun, Oct 29, 2023 at 6:46 PM Charles Lepple <clepple at gmail.com> wrote:
>
>> > On Oct 29, 2023, at 9:25 PM, Kelly Byrd <kbyrd at memcpy.com> wrote:
>> >
>> > I have seen reports of folks claiming this just worked for them out of
>> the box,
>>
>> Here you're referring to just making things work on Windows or macOS,
>> right? I don't think it will be quite as simple with NUT, mostly because
>> the NUT drivers are trying to expose all of the variables and commands,
>> rather than just the simple shutdown bits.
>>
>> I'm not sure where a generic HID PDC driver sits in the priority list at
>> the moment, but IIRC the current driver is still fairly tightly coupled to
>> the USB VID and resulting model-specific mappings. So once you get the
>> permissions worked out, you would still need a new source file that maps
>> the HID Usage "paths" to NUT variable names. It's one of those things that
>> in hindsight, it would have been great to fall back to a generic mapping
>> that just looks at the OB and LB bits, but real-world UPSes are messy, and
>> we would have needed those model-specific mappings to be able to
>> distinguish things like input and output voltage.
>>
>> That said, if you change the VID/PID to something supported already,
>> things just might work. The "Couldn't retrieve descriptors" is likely a
>> result of the driver dropping root privileges, then not having enough
>> permissions to write to the /dev/bus/usb node to request the HID
>> descriptor. I don't know how your VID/PID got into the udev rules file -
>> VID 2341 doesn't show up in the NUT Git source tree.
>>
>> --
>> Charles Lepple
>> clepple at gmail
>>
>>
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20231029/d806ade3/attachment.htm>
More information about the Nut-upsuser
mailing list