In a separate discussion, on 6/26/17 4:04 AM, Arnaud Quette wrote: > Hi > > If you're sure it's a HID device, add an entry in drivers/powercom-hid.c > { USB_DEVICE(POWERCOM_VENDORID, 0x0002), NULL }, > > Then autogen.sh + configure... > Please also report back so that I can update the code > > Cheers > Arno
Thanks! I don't *know* whether or not it's an HID device, but I made the change anyway. This is what I now see: root@pine64-a# drivers/usbhid-ups -DD -a mb-powercom Network UPS Tools - Generic HID driver 0.41 (2.7.4) USB communication driver 0.33 0.000000 debug level is '2' 0.003220 upsdrv_initups... 0.319601 Checking device (1D6B/0001) (003/001) 0.409525 - VendorID: 1d6b 0.409589 - ProductID: 0001 0.409625 - Manufacturer: unknown 0.409658 - Product: unknown 0.409690 - Serial Number: unknown 0.409722 - Bus: 003 0.409753 - Device release number: 0310 0.409784 Trying to match device 0.409880 Device does not match - skipping 0.409969 Checking device (1D6B/0002) (001/001) 0.410120 - VendorID: 1d6b 0.410161 - ProductID: 0002 0.410194 - Manufacturer: unknown 0.410226 - Product: unknown 0.410258 - Serial Number: unknown 0.410290 - Bus: 001 0.410322 - Device release number: 0310 0.410354 Trying to match device 0.410390 Device does not match - skipping 0.430089 Checking device (0D9F/0002) (004/002) 0.438445 - VendorID: 0d9f 0.439423 - ProductID: 0002 0.440289 - Manufacturer: POWERCOM CO., LTD. 0.441156 - Product: USB to Serial 0.442018 - Serial Number: unknown 0.442872 - Bus: 004 0.443725 - Device release number: 0000 0.444579 Trying to match device 0.445447 Device matches 0.447497 HID descriptor length 37 0.450449 Report Descriptor size = 37 0.451062 Using subdriver: PowerCOM HID 0.5 0.451996 3 HID objects found 0.453502 Path: ffa00001.ffa00001, Type: Input, ReportID: 0x00, Offset: 0, Size: 8, Value: 0 0.453677 Path: ffa00001.ffa00002, Type: Output, ReportID: 0x00, Offset: 0, Size: 8, Value: 0 0.454070 Path: ffa00001.ffa00003, Type: Feature, ReportID: 0x00, Offset: 0, Size: 8, Value: 0 0.454462 Report descriptor retrieved (Reportlen = 37) 0.454818 Found HID device 0.454943 Detected a UPS: POWERCOM CO., LTD./USB to Serial 0.456645 find_nut_info: unknown info type: load.off.delay 0.457544 find_nut_info: unknown info type: load.on.delay 0.458423 find_nut_info: unknown info type: load.off.delay 0.459406 upsdrv_initinfo... 0.459786 upsdrv_updateinfo... 0.710456 libusb_get_interrupt: Connection timed out 0.711368 Got 0 HID objects... 0.712229 Quick update... 0.713434 dstate_init: sock /var/run/nut/usbhid-ups-mb-powercom open on fd 5 0.714370 upsdrv_updateinfo... 0.965459 libusb_get_interrupt: Connection timed out 0.966355 Got 0 HID objects... 0.967261 Quick update... 2.716170 upsdrv_updateinfo... 2.967535 libusb_get_interrupt: Connection timed out 2.968722 Got 0 HID objects... 2.969626 Quick update... 4.717950 upsdrv_updateinfo... 4.970580 libusb_get_interrupt: Connection timed out 4.971507 Got 0 HID objects... 4.972369 Quick update... 6.719745 upsdrv_updateinfo... 6.970635 libusb_get_interrupt: Connection timed out 6.971649 Got 0 HID objects... 6.972520 Quick update... 8.721529 upsdrv_updateinfo... 8.972695 libusb_get_interrupt: Connection timed out 8.973878 Got 0 HID objects... 8.974748 Quick update... 10.723330 upsdrv_updateinfo... 10.974746 libusb_get_interrupt: Connection timed out 10.975674 Got 0 HID objects... 10.976556 Quick update... 12.725120 upsdrv_updateinfo... 12.977799 libusb_get_interrupt: Connection timed out 12.978700 Got 0 HID objects... 12.979613 Quick update... 14.726901 upsdrv_updateinfo... 14.978869 libusb_get_interrupt: Connection timed out 14.980103 Got 0 HID objects... 14.980977 Quick update... ^C Am I on the right track? I'm still interested in figuring out how to get this UPS talking to NUT. H -- > Le 25 juin 2017 22:55, "Harlan Stenn" <st...@nwtime.org> a écrit : > >> Hi Arno, >> >> I'm trying to get a Powercom unit talking with nut. It's a 0d9f:0002, >> which is not currently listed. >> >> The powercom driver won't talk to it because it doesn't present as a >> serial device. >> >> The usbhid-ups driver won't talk to it because it doesn't recognize a >> 0002 device. >> >> I'm in the A.pine64 build directory, and I see: >> >> harlan@pine64-a> find .. -type f | xargs grep -li 0d9f >> ../drivers/powercom-hid.c >> ../ChangeLog >> ../NEWS >> ../A.pine64/scripts/devd/nut-usb.conf >> ../A.pine64/scripts/udev/62-nut-usbups.rules >> ../A.pine64/scripts/udev/nut-usbups.rules >> ../scripts/upower/95-upower-hid.rules >> ../scripts/devd/nut-usb.conf.in >> ../scripts/udev/nut-usbups.rules.in >> ../scripts/hotplug/libhid.usermap >> ../tools/nut-scanner/nutscan-usb.h >> harlan@pine64-a> >> >> scripts/upower/95-upower-hid.rules (automatically generated) >> scripts/devd/nut-usb.conf.in (automatically generated) >> scripts/udev/nut-usbups.rules.in (automatically generated) >> scripts/hotplug/libhid.usermap (automatically generated) >> tools/nut-scanner/nutscan-usb.h (NOT automatically generated) >> >> I manually edited all the files, as it's taking a while for me to >> understand your build system and I'm not seeing Makefile.am rules to >> automatically update the generated files. Is this documented somewhere? >> >> I'm hoping that if I just add the entries for the product ID 0002 that >> this model will be close enough to the others that it will either work >> or get me closer to a working solution. >> >> I've installed the modified code, but: >> >> root@pine64-a# upsdrvctl start >> Network UPS Tools - UPS driver controller 2.7.4 >> Network UPS Tools - Generic HID driver 0.41 (2.7.4) >> USB communication driver 0.33 >> This Powercom device (0d9f/0002) is not supported by usbhid-ups. >> Please use the 'powercom' driver instead. >> >> No matching HID UPS found >> Driver failed to start (exit status=1) >> root@pine64-a# >> >> and when I run: >> >> root@pine64-a# drivers/usbhid-ups -DD -a mb-powercom |& less >> 0.000000 debug level is '2' >> 0.003151 upsdrv_initups... >> 0.335431 Checking device (1D6B/0001) (003/001) >> 0.424559 - VendorID: 1d6b >> 0.424761 - ProductID: 0001 >> 0.424916 - Manufacturer: unknown >> 0.425073 - Product: unknown >> 0.425237 - Serial Number: unknown >> 0.425395 - Bus: 003 >> 0.425550 - Device release number: 0310 >> 0.425710 Trying to match device >> 0.425925 Device does not match - skipping >> 0.426181 Checking device (1D6B/0002) (001/001) >> 0.426557 - VendorID: 1d6b >> 0.426723 - ProductID: 0002 >> 0.426874 - Manufacturer: unknown >> 0.427029 - Product: unknown >> 0.427178 - Serial Number: unknown >> 0.427333 - Bus: 001 >> 0.427476 - Device release number: 0310 >> 0.427634 Trying to match device >> 0.427797 Device does not match - skipping >> 0.444471 Checking device (0D9F/0002) (004/002) >> 0.452707 - VendorID: 0d9f >> 0.452742 - ProductID: 0002 >> 0.452763 - Manufacturer: POWERCOM CO., LTD. >> 0.452784 - Product: USB to Serial >> 0.452804 - Serial Number: unknown >> 0.452823 - Bus: 004 >> 0.452843 - Device release number: 0000 >> 0.452862 Trying to match device >> 0.452913 This Powercom device (0d9f/0002) is not supported by >> usbhid-ups. >> Please use the 'powercom' driver instead. >> >> 0.452937 Device does not match - skipping >> 0.452979 Checking device (1D6B/0001) (004/001) >> ... >> >> so I must have missed something. >> >> ... _______________________________________________ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser