janc at telefonica.net
2014-Dec-11 10:43 UTC
[Nut-upsuser] 06da:0002 Phoenixtec Power Co., Ltd UPS
Hi! Charles. This is the output with 'explore' # ./usbhid-ups -DDDD -u root -x explore -x vendorid=06da -a CENER_LA900_usb Network UPS Tools - Generic HID driver 0.37 (2.6.4) USB communication driver 0.32 0.000000 debug level is '4' 0.000676 upsdrv_initups... 0.288980 Checking device (06DA/0002) (008/004) 0.316956 - VendorID: 06da 0.317057 - ProductID: 0002 0.317087 - Manufacturer: Phoenixtec Power 0.317113 - Product: USB Cable (V2.00) 0.317142 - Serial Number: unknown 0.317168 - Bus: 008 0.317189 Trying to match device 0.317243 Device matches 0.324987 HID descriptor, method 1: (9 bytes) => 09 21 00 01 21 01 22 51 00 0.325083 i=0, extra[i]=09, extra[i+1]=21 0.325116 HID descriptor, method 2: (9 bytes) => 09 21 00 01 21 01 22 51 00 0.325144 HID descriptor length 81 0.338984 Report Descriptor size = 81 0.339082 Report Descriptor: (81 bytes) => 05 8c 09 01 a1 01 85 01 09 03 15 00 25 01 0.339123 75 08 95 01 b1 82 85 02 09 02 15 00 25 01 75 01 81 82 75 07 81 83 85 02 09 0.339161 02 75 01 b1 82 75 07 b1 83 85 03 09 04 15 00 26 ff 00 75 08 81 82 85 03 09 0.339191 04 b1 82 85 04 09 05 15 00 26 ff 00 75 08 b1 82 c0 0.339253 Using subdriver: EXPLORE HID 0.1 0.339329 Entering libusb_get_report 0.342986 Report[get]: (2 bytes) => 01 00 0.343085 Path: 008c0001.008c0003, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 0 0.343120 Entering libusb_get_report 0.346953 Report[get]: (2 bytes) => 02 00 0.346993 Path: 008c0001.008c0002, Type: Input, ReportID: 0x02, Offset: 0, Size: 1, Value: 0 0.347015 Report[buf]: (2 bytes) => 02 00 0.347036 Path: 008c0001.008c0002, Type: Feature, ReportID: 0x02, Offset: 0, Size: 1, Value: 0 0.347055 Entering libusb_get_report 0.350988 Report[get]: (2 bytes) => 03 0c 0.351102 Path: 008c0001.008c0004, Type: Input, ReportID: 0x03, Offset: 0, Size: 8, Value: 12 0.351138 Report[buf]: (2 bytes) => 03 0c 0.351166 Path: 008c0001.008c0004, Type: Feature, ReportID: 0x03, Offset: 0, Size: 8, Value: 12 0.351196 Entering libusb_get_report 0.354990 Report[get]: (2 bytes) => 04 00 0.355104 Path: 008c0001.008c0005, Type: Feature, ReportID: 0x04, Offset: 0, Size: 8, Value: 0 0.355150 Report descriptor retrieved (Reportlen = 81) 0.355182 Found HID device 0.355210 Detected a UPS: Phoenixtec Power/USB Cable (V2.00) 0.355234 find_nut_info: unknown info type: load.off.delay 0.355256 find_nut_info: unknown info type: load.on.delay 0.355278 find_nut_info: unknown info type: load.off.delay 0.355305 upsdrv_initinfo... 0.355333 upsdrv_updateinfo... 0.607995 libusb_get_interrupt: Connection timed out 0.608075 Got 0 HID objects... 0.608109 Quick update... 0.608182 dstate_init: sock /var/run/nut/usbhid-ups-CENER_LA900_usb open on fd 5 0.608229 upsdrv_updateinfo... 0.859959 libusb_get_interrupt: Connection timed out 0.860036 Got 0 HID objects... 0.860064 Quick update... 2.610049 upsdrv_updateinfo... 2.862002 libusb_get_interrupt: Connection timed out Keeps going the same all the time... Thanks. Regards. -- Jose Angel Navarro Cortes email: janc at telefonica.net web: http://janc.es/ Usuario Linux: #49178 El 14.12.04 22:18:44 > Charles Lepple dijo:> On Dec 4, 2014, at 7:01 AM, janc at telefonica.net wrote: > > > 0.339848 Report[get]: (2 bytes) => 01 00 > > 0.339928 Path: 008c0001.008c0003, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 0 > > 0.343852 Report[get]: (2 bytes) => 02 00 > > 0.343931 Path: 008c0001.008c0002, Type: Input, ReportID: 0x02, Offset: 0, Size: 1, Value: 0 > > 0.343975 Report[buf]: (2 bytes) => 02 00 > > 0.344002 Path: 008c0001.008c0002, Type: Feature, ReportID: 0x02, Offset: 0, Size: 1, Value: 0 > > 0.347849 Report[get]: (2 bytes) => 03 0c > > 0.347947 Path: 008c0001.008c0004, Type: Input, ReportID: 0x03, Offset: 0, Size: 8, Value: 12 > > 0.347987 Report[buf]: (2 bytes) => 03 0c > > 0.348014 Path: 008c0001.008c0004, Type: Feature, ReportID: 0x03, Offset: 0, Size: 8, Value: 12 > > 0.351848 Report[get]: (2 bytes) => 04 00 > > 0.351943 Path: 008c0001.008c0005, Type: Feature, ReportID: 0x04, Offset: 0, Size: 8, Value: 0 > > Hmm, I misread that. I assumed it was just a pair of 8-byte buffers (the way most of the HID USB-to-serial converters are laid out), but "Size: 8" is in bits. > > The interesting part is that "008c..." is the HID Usage Page for bar code scanners. > > You can try running usbhid-ups in "explore" mode, as explained here: > > http://www.networkupstools.org/docs/developer-guide.chunked/ar01s04.html#hid-subdrivers > > The driver keeps looping and reading the values, and you can see whether they correspond to various power states (on battery vs on AC, low battery, etc.) > > -- > Charles Lepple > clepple at gmail > > >
Charles Lepple
2014-Dec-11 13:33 UTC
[Nut-upsuser] 06da:0002 Phoenixtec Power Co., Ltd UPS
On Dec 11, 2014, at 5:43 AM, janc at telefonica.net wrote:> 0.339329 Entering libusb_get_report > 0.342986 Report[get]: (2 bytes) => 01 00 > 0.343085 Path: 008c0001.008c0003, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 0 > 0.343120 Entering libusb_get_report > 0.346953 Report[get]: (2 bytes) => 02 00 > 0.346993 Path: 008c0001.008c0002, Type: Input, ReportID: 0x02, Offset: 0, Size: 1, Value: 0 > 0.347015 Report[buf]: (2 bytes) => 02 00 > 0.347036 Path: 008c0001.008c0002, Type: Feature, ReportID: 0x02, Offset: 0, Size: 1, Value: 0 > 0.347055 Entering libusb_get_report > 0.350988 Report[get]: (2 bytes) => 03 0c > 0.351102 Path: 008c0001.008c0004, Type: Input, ReportID: 0x03, Offset: 0, Size: 8, Value: 12 > 0.351138 Report[buf]: (2 bytes) => 03 0c > 0.351166 Path: 008c0001.008c0004, Type: Feature, ReportID: 0x03, Offset: 0, Size: 8, Value: 12 > 0.351196 Entering libusb_get_report > 0.354990 Report[get]: (2 bytes) => 04 00 > 0.355104 Path: 008c0001.008c0005, Type: Feature, ReportID: 0x04, Offset: 0, Size: 8, Value: 0Unfortunately, your device does not respond to the interrupt pipe, so in order to test whether these values change, you will need to stop (Ctrl-C is sufficient) and re-run the driver with line power turned off.> 0.355333 upsdrv_updateinfo... > 0.607995 libusb_get_interrupt: Connection timed out > 0.608075 Got 0 HID objects......> Keeps going the same all the time...This part is disappointing, but we have a "pollonly" workaround. You can try it now, but I don't think it works with the "explore" sub-driver, since pollonly iterates over a list of known HID Path IDs, and we haven't added that yet. Before we set that up, I think we need to verify that the values actually change based on power conditions. -- Charles Lepple clepple at gmail
janc at telefonica.net
2014-Dec-11 17:31 UTC
[Nut-upsuser] 06da:0002 Phoenixtec Power Co., Ltd UPS
This is the output with line power turned off. # ./usbhid-ups -DDDD -u root -x explore -x vendorid=06da -a CENER_LA900_usb Network UPS Tools - Generic HID driver 0.37 (2.6.4) USB communication driver 0.32 0.000000 debug level is '4' 0.000563 upsdrv_initups... 0.299203 Checking device (06DA/0002) (008/003) 0.327122 - VendorID: 06da 0.327217 - ProductID: 0002 0.327261 - Manufacturer: Phoenixtec Power 0.327285 - Product: USB Cable (V2.00) 0.327314 - Serial Number: unknown 0.327341 - Bus: 008 0.327361 Trying to match device 0.327414 Device matches 0.335127 HID descriptor, method 1: (9 bytes) => 09 21 00 01 21 01 22 51 00 0.335240 i=0, extra[i]=09, extra[i+1]=21 0.335273 HID descriptor, method 2: (9 bytes) => 09 21 00 01 21 01 22 51 00 0.335300 HID descriptor length 81 0.349120 Report Descriptor size = 81 0.349234 Report Descriptor: (81 bytes) => 05 8c 09 01 a1 01 85 01 09 03 15 00 25 01 0.349275 75 08 95 01 b1 82 85 02 09 02 15 00 25 01 75 01 81 82 75 07 81 83 85 02 09 0.349312 02 75 01 b1 82 75 07 b1 83 85 03 09 04 15 00 26 ff 00 75 08 81 82 85 03 09 0.349344 04 b1 82 85 04 09 05 15 00 26 ff 00 75 08 b1 82 c0 0.349399 Using subdriver: EXPLORE HID 0.1 0.349427 Entering libusb_get_report 0.353126 Report[get]: (2 bytes) => 01 00 0.353225 Path: 008c0001.008c0003, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 0 0.353267 Entering libusb_get_report 0.357112 Report[get]: (2 bytes) => 02 00 0.357152 Path: 008c0001.008c0002, Type: Input, ReportID: 0x02, Offset: 0, Size: 1, Value: 0 0.357174 Report[buf]: (2 bytes) => 02 00 0.357195 Path: 008c0001.008c0002, Type: Feature, ReportID: 0x02, Offset: 0, Size: 1, Value: 0 0.357214 Entering libusb_get_report 0.361090 Report[get]: (2 bytes) => 03 0d 0.361210 Path: 008c0001.008c0004, Type: Input, ReportID: 0x03, Offset: 0, Size: 8, Value: 13 0.361246 Report[buf]: (2 bytes) => 03 0d 0.361274 Path: 008c0001.008c0004, Type: Feature, ReportID: 0x03, Offset: 0, Size: 8, Value: 13 0.361305 Entering libusb_get_report 0.365093 Report[get]: (2 bytes) => 04 00 0.365207 Path: 008c0001.008c0005, Type: Feature, ReportID: 0x04, Offset: 0, Size: 8, Value: 0 0.365253 Report descriptor retrieved (Reportlen = 81) 0.365283 Found HID device 0.365310 Detected a UPS: Phoenixtec Power/USB Cable (V2.00) 0.365332 find_nut_info: unknown info type: load.off.delay 0.365355 find_nut_info: unknown info type: load.on.delay 0.365377 find_nut_info: unknown info type: load.off.delay 0.365407 upsdrv_initinfo... 0.365433 upsdrv_updateinfo... 0.617132 libusb_get_interrupt: Connection timed out 0.617233 Got 0 HID objects... 0.617278 Quick update... 0.617346 dstate_init: sock /var/run/nut/usbhid-ups-CENER_LA900_usb open on fd 5 0.617464 upsdrv_updateinfo... 0.869136 libusb_get_interrupt: Connection timed out 0.869237 Got 0 HID objects... 0.869281 Quick update... 2.619284 upsdrv_updateinfo... 2.871142 libusb_get_interrupt: Connection timed out -------------------------------------------------------------------- This is a diferent output with line on and the following commad line # ./usbhid-ups -DDDD -u root -x vendorid=06da -x productid=0002 -a CENER_LA900_usb Network UPS Tools - Generic HID driver 0.37 (2.6.4) USB communication driver 0.32 0.000000 debug level is '4' 0.000534 upsdrv_initups... 0.287423 Checking device (06DA/0002) (008/003) 0.313782 - VendorID: 06da 0.313819 - ProductID: 0002 0.313840 - Manufacturer: Phoenixtec Power 0.313858 - Product: USB Cable (V2.00) 0.313876 - Serial Number: unknown 0.313894 - Bus: 008 0.313911 Trying to match device 0.313979 Device matches 0.321819 HID descriptor, method 1: (9 bytes) => 09 21 00 01 21 01 22 51 00 0.321868 i=0, extra[i]=09, extra[i+1]=21 0.321917 HID descriptor, method 2: (9 bytes) => 09 21 00 01 21 01 22 51 00 0.321943 HID descriptor length 81 0.335830 Report Descriptor size = 81 0.335912 Report Descriptor: (81 bytes) => 05 8c 09 01 a1 01 85 01 09 03 15 00 25 01 0.335943 75 08 95 01 b1 82 85 02 09 02 15 00 25 01 75 01 81 82 75 07 81 83 85 02 09 0.335970 02 75 01 b1 82 75 07 b1 83 85 03 09 04 15 00 26 ff 00 75 08 81 82 85 03 09 0.335996 04 b1 82 85 04 09 05 15 00 26 ff 00 75 08 b1 82 c0 0.336117 Using subdriver: Liebert HID 0.3 0.336147 Entering libusb_get_report 0.339804 Report[get]: (2 bytes) => 01 00 0.339920 Path: 008c0001.008c0003, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 0 0.339950 Entering libusb_get_report 0.343912 Report[get]: (2 bytes) => 02 00 0.343993 Path: 008c0001.008c0002, Type: Input, ReportID: 0x02, Offset: 0, Size: 1, Value: 0 0.344033 Report[buf]: (2 bytes) => 02 00 0.344065 Path: 008c0001.008c0002, Type: Feature, ReportID: 0x02, Offset: 0, Size: 1, Value: 0 0.344091 Entering libusb_get_report 0.347847 Report[get]: (2 bytes) => 03 0d 0.347926 Path: 008c0001.008c0004, Type: Input, ReportID: 0x03, Offset: 0, Size: 8, Value: 13 0.347965 Report[buf]: (2 bytes) => 03 0d 0.347994 Path: 008c0001.008c0004, Type: Feature, ReportID: 0x03, Offset: 0, Size: 8, Value: 13 0.348022 Entering libusb_get_report 0.351846 Report[get]: (2 bytes) => 04 00 0.351951 Path: 008c0001.008c0005, Type: Feature, ReportID: 0x04, Offset: 0, Size: 8, Value: 0 0.352000 Report descriptor retrieved (Reportlen = 81) 0.352028 Found HID device 0.352056 Detected a UPS: Phoenixtec Power/USB Cable (V2.00) 0.352092 string_to_path: depth = 3 0.352127 string_to_path: depth = 3 0.352159 string_to_path: depth = 3 0.352187 string_to_path: depth = 3 0.352214 string_to_path: depth = 3 0.352238 string_to_path: depth = 3 0.352266 string_to_path: depth = 4 0.352292 string_to_path: depth = 4 0.352319 string_to_path: depth = 4 0.352346 string_to_path: depth = 4 0.352372 string_to_path: depth = 4 0.352396 string_to_path: depth = 4 0.352420 find_nut_info: unknown info type: load.off.delay 0.352442 find_nut_info: unknown info type: load.on.delay 0.352465 find_nut_info: unknown info type: load.off.delay 0.352495 upsdrv_initinfo... 0.352522 upsdrv_updateinfo... 0.603804 libusb_get_interrupt: Connection timed out 0.603911 Got 0 HID objects... 0.603948 Quick update... 0.604020 dstate_init: sock /var/run/nut/usbhid-ups-CENER_LA900_usb open on fd 5 0.604135 upsdrv_updateinfo... 0.856802 libusb_get_interrupt: Connection timed out -- Jose Angel Navarro Cortes email: janc at telefonica.net web: http://janc.es/ Usuario Linux: #49178 El 14.12.11 08:33:57 > Charles Lepple dijo:> On Dec 11, 2014, at 5:43 AM, janc at telefonica.net wrote: > > > 0.339329 Entering libusb_get_report > > 0.342986 Report[get]: (2 bytes) => 01 00 > > 0.343085 Path: 008c0001.008c0003, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 0 > > 0.343120 Entering libusb_get_report > > 0.346953 Report[get]: (2 bytes) => 02 00 > > 0.346993 Path: 008c0001.008c0002, Type: Input, ReportID: 0x02, Offset: 0, Size: 1, Value: 0 > > 0.347015 Report[buf]: (2 bytes) => 02 00 > > 0.347036 Path: 008c0001.008c0002, Type: Feature, ReportID: 0x02, Offset: 0, Size: 1, Value: 0 > > 0.347055 Entering libusb_get_report > > 0.350988 Report[get]: (2 bytes) => 03 0c > > 0.351102 Path: 008c0001.008c0004, Type: Input, ReportID: 0x03, Offset: 0, Size: 8, Value: 12 > > 0.351138 Report[buf]: (2 bytes) => 03 0c > > 0.351166 Path: 008c0001.008c0004, Type: Feature, ReportID: 0x03, Offset: 0, Size: 8, Value: 12 > > 0.351196 Entering libusb_get_report > > 0.354990 Report[get]: (2 bytes) => 04 00 > > 0.355104 Path: 008c0001.008c0005, Type: Feature, ReportID: 0x04, Offset: 0, Size: 8, Value: 0 > > Unfortunately, your device does not respond to the interrupt pipe, so in order to test whether these values change, you will need to stop (Ctrl-C is sufficient) and re-run the driver with line power turned off. > > > 0.355333 upsdrv_updateinfo... > > 0.607995 libusb_get_interrupt: Connection timed out > > 0.608075 Got 0 HID objects... > ... > > Keeps going the same all the time... > > This part is disappointing, but we have a "pollonly" workaround. You can try it now, but I don't think it works with the "explore" sub-driver, since pollonly iterates over a list of known HID Path IDs, and we haven't added that yet. Before we set that up, I think we need to verify that the values actually change based on power conditions. > > -- > Charles Lepple > clepple at gmail > > >