06.05.2019 18:01, Charles Lepple пишет:> On May 2, 2019, at 6:22 PM, Vladimir Zaitchikov wrote:
>> pi at raspberrypi:~ $ lsusb -v
>>
>> Bus 001 Device 004: ID 0d9f:0004 Powercom Co., Ltd
> What are the permissions on /dev/bus/usb/001/004?
>
> If the group is not "nut", and you installed NUT after plugging
in the UPS USB cable, you may need to run udevadm as mentioned here:
>
>
https://networkupstools.org/docs/FAQ.html#_my_usb_ups_is_supported_but_doesn_8217_t_work
I did receive a "permissions error" message. But this only happens
during the first post-install run.
pi at raspberrypi:~ $ sudo /lib/nut/usbhid-ups -DD -a SPIDER
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
0.000000 debug level is '2'
0.002803 upsdrv_initups...
0.003910 Checking device (0D9F/0004) (001/005)
0.004078 - VendorID: 0d9f
0.004107 - ProductID: 0004
0.004132 - Manufacturer: unknown
0.004155 - Product: unknown
0.004178 - Serial Number: unknown
0.004201 - Bus: 001
0.004226 - Device release number: 0002
0.004248 Trying to match device
0.004292 Device matches
0.004326 failed to claim USB device: could not claim interface 0:
Operation not permitted
0.004364 failed to detach kernel driver from USB device: could
not detach kernel driver from interface 0: Operation not permitted
0.004401 failed to claim USB device: could not claim interface 0:
Operation not permitted
0.004435 failed to detach kernel driver from USB device: could
not detach kernel driver from interface 0: Operation not permitted
0.004470 failed to claim USB device: could not claim interface 0:
Operation not permitted
0.004506 failed to detach kernel driver from USB device: could
not detach kernel driver from interface 0: Operation not permitted
0.004541 failed to claim USB device: could not claim interface 0:
Operation not permitted
0.004590 failed to detach kernel driver from USB device: could
not detach kernel driver from interface 0: Operation not permitted
0.004632 Can't claim USB device [0d9f:0004]: could not detach
kernel driver from interface 0: Operation not permitted
But after restarting Raspberry and reconnecting UPS, I get the error
"Broken pipe"
pi at raspberrypi:~ $ sudo /lib/nut/usbhid-ups -DD -a SPIDER -u root
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
0.000000 debug level is '2'
0.002598 upsdrv_initups...
0.003554 Checking device (0424/7800) (001/005)
0.003659 - VendorID: 0424
0.003692 - ProductID: 7800
0.003727 - Manufacturer: unknown
0.003765 - Product: unknown
0.003797 - Serial Number: unknown
0.003832 - Bus: 001
0.003864 - Device release number: 0300
0.003895 Trying to match device
0.003943 Device does not match - skipping
0.003991 Checking device (0D9F/0004) (001/004)
0.005670 - VendorID: 0d9f
0.005746 - ProductID: 0004
0.005788 - Manufacturer: unknown
0.005821 - Product: unknown
0.005854 - Serial Number: unknown
0.005886 - Bus: 001
0.005918 - Device release number: 0002
0.005952 Trying to match device
0.005998 Device matches
0.006796 Unable to get HID descriptor (error sending control
message: Broken pipe)
0.006911 HID descriptor length 996
0.007424 Unable to get Report descriptor: Broken pipe
The file "/lib/udev/rules.d/62-nut-usbups.rules" is present
immediately
after installation. Priority is set correctly. I understood correctly?
I have a Powercom SPIDER. There is no such UPS name in the file, but
VendorID: 0d9f ProductID: 0004 is present in the file
"62-nut-usbups.rules". This is probably why I had no problems with the
Debian for desktop.
I suspect, problems with Raspberry have arisen due to changes in the
core of its operating system (I read, it programmatically emulates some
hardware algorithms of desktop computers). Probably It began to work
differently with USB. And this leads to an error during the replacement
of the USB driver by the current NUT algorithm.
--
С уважением
Зайчиков В А