NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: APC UPS hid driver



On 10/07/2022 19:31, Greg Troxel wrote:

Dima Veselov <kab00m%lich.phys.spbu.ru@localhost> writes:

Greetings,

I am using NetBSD 9_STABLE and I would like to connect UPS via USB serial
port. UPS is detected as ugen device

  port 2 addr 3: low speed, self powered, config 1, Smart-UPS 750 FW:651.13.I USB FW:7.3(0x0002), American Power Conversion(0x051d), rev 0.06(0x0006), serial AS0714242055

Are you using the ups-nut package?  If so it will be user "nut".  CHeck
that this user can read/write the ugen device.  I use serial and have
the port symlinked to a stable name and chowned.

sysutils/ups-nut-usb can't detect UPS and my question is:

Is it neccesary for UPS to be detected as a hid device and this means that
kernel miss something or it is a problem of usbhid-ups/libusb ?

I really don't know as I have never used a hid UPS.  See uhid(4) but I
would more or less expect (without knowing or understanding) that it
could use libusb for this.

Don't know about nut but apcupsd detects non-hid APC UPS's just fine. My current one reports as:

ugen0 at uhub0 port 2
ugen0: American Power Conversion (0x51d) Back-UPS XS 1400U FW:926.T2 .I USB FW:T2 (0x02), rev 1.10/1.06, addr 2

Looking at the nut documentation you can then access the UPS via apcupsd for those UPS's it can't talk to directly.

If the UPS was a HID device I'd expected a uhid attachment as well but from memory there might be some logic in the kernel blocking that as libusb needs a ugen attachment to work.

Mike


Home | Main Index | Thread Index | Old Index