Thank you - I have included the capture, and attached it here. USB is new to me. I am a good sysadmin, but terrible programmer. I was able to use the usbhid-dump utility using -e stream, the last octet will report the state of the detected power (1/2 for ignition on, 3 for ignition off, 0 for powered-off). 4th one seems to be voltage, and the 5th and 6th I believe are timers: 003:002:000:STREAM 1487878974.229138 80 11 03 51 FF FF A3 00 003:003:000:STREAM 1487879404.657687 00 11 00 55 FF FF A3 01 003:003:000:STREAM 1487879404.665683 00 11 00 51 FF FF A3 02 On 2/22/17 11:19 PM, Charles Lepple wrote:> On Feb 21, 2017, at 10:21 AM, Drew from Zhrodague <drewzhrodague at zhrodague.net> wrote: >> >> >> Hello! I have a Dockmaster from Copeland Engineering. This is a battery saver used for a laptop docking station in a police car, which has a USB port for relaying its internal timers and state. >> >> hid-generic 0003:04D8:0500.0001: hiddev0,hidraw0: USB HID v1.10 Device [Copeland Engineering, LLC Dock Master] on usb-0000:00:10.4-3.3/input0 >> >> I'm able to configure usbhid-ups, but it doesn't seem to detect the state of the power (between ignition-on and ignition-off). I do have access to the Windows-based configuration utility. >> >> I'm not quite sure how to tell usbhid-ups how the data is formatted. How can I get this device working with nut? > > I won't have a chance to look at the data for a few days, but can you grab some logs from "explore mode"? > > http://new.networkupstools.org/docs/developer-guide.chunked/ar01s04.html#hid-subdrivers > > In case that link is broken, a slightly older version: > > http://networkupstools.org/docs/developer-guide.chunked/ar01s04.html#hid-subdrivers > > Please gzip the logs before posting, and use reply-all to include the rest of the list. > > Thanks! >-- Drew from Zhrodague drew at zhrodague.net -------------- next part -------------- A non-text attachment was scrubbed... Name: dockmaster-explore.log.gz Type: application/x-gzip Size: 1170 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170223/9f4e2126/attachment.bin>
On Feb 23, 2017, at 2:55 PM, Drew from Zhrodague <drewzhrodague at zhrodague.net> wrote:> > Thank you - I have included the capture, and attached it here. USB is new to me. I am a good sysadmin, but terrible programmer. > > I was able to use the usbhid-dump utility using -e stream, the last octet will report the state of the detected power (1/2 for ignition on, 3 for ignition off, 0 for powered-off). 4th one seems to be voltage, and the 5th and 6th I believe are timers: > > 003:002:000:STREAM 1487878974.229138 > 80 11 03 51 FF FF A3 00 > > 003:003:000:STREAM 1487879404.657687 > 00 11 00 55 FF FF A3 01 > > 003:003:000:STREAM 1487879404.665683 > 00 11 00 51 FF FF A3 02 >Can you provide a pointer to details on the usbhid-dump tool? Not familiar with that one. Depending on how much of the Power Device Class (PDC) HID spec they have implemented (rather than doing non-PDC HID as a cheap USB-to-serial replacement), this might require a separate driver, or it might be easy to extend usbhid-ups. The "explore mode" mentioned in the link below will provide the output to guide that decision. Could you please also provide the output of "lsusb -vvv -d 04d8:0500" run as root?> > On 2/22/17 11:19 PM, Charles Lepple wrote: >> On Feb 21, 2017, at 10:21 AM, Drew from Zhrodague <drewzhrodague at zhrodague.net> wrote: >>> >>> >>> Hello! I have a Dockmaster from Copeland Engineering. This is a battery saver used for a laptop docking station in a police car, which has a USB port for relaying its internal timers and state. >>> >>> hid-generic 0003:04D8:0500.0001: hiddev0,hidraw0: USB HID v1.10 Device [Copeland Engineering, LLC Dock Master] on usb-0000:00:10.4-3.3/input0 >>> >>> I'm able to configure usbhid-ups, but it doesn't seem to detect the state of the power (between ignition-on and ignition-off). I do have access to the Windows-based configuration utility. >>> >>> I'm not quite sure how to tell usbhid-ups how the data is formatted. How can I get this device working with nut? >> >> I won't have a chance to look at the data for a few days, but can you grab some logs from "explore mode"? >> >> http://new.networkupstools.org/docs/developer-guide.chunked/ar01s04.html#hid-subdrivers >> >> In case that link is broken, a slightly older version: >> >> http://networkupstools.org/docs/developer-guide.chunked/ar01s04.html#hid-subdrivers >> >> Please gzip the logs before posting, and use reply-all to include the rest of the list. >> >> Thanks! >> > > > -- > > Drew from Zhrodague > drew at zhrodague.net > <dockmaster-explore.log.gz>
On 3/2/17 10:02 AM, Charles Lepple wrote:> Can you provide a pointer to details on the usbhid-dump tool? Not > familiar with that one.I'm using Ubuntu 14.04 Server on an i686 Dell/Wyse CX0 thin-client - usbhid-dump was available as part of usbhid-utils, if I am not mistaken. https://github.com/DIGImend/usbhid-dump> Depending on how much of the Power Device Class (PDC) HID spec they > have implemented (rather than doing non-PDC HID as a cheap > USB-to-serial replacement), this might require a separate driver, or > it might be easy to extend usbhid-ups. The "explore mode" mentioned > in the link below will provide the output to guide that decision.I do have the correct permissions for udev. The explore mode complains: 0.185149 HID descriptor, method 1: (9 bytes) => 09 21 10 01 00 01 22 22 00 0.186126 i=0, extra[i]=09, extra[i+1]=21 0.186323 HID descriptor, method 2: (9 bytes) => 09 21 10 01 00 01 22 22 00 0.186537 HID descriptor length 34 0.195165 Report Descriptor size = 34 0.195484 Report Descriptor: (34 bytes) => 06 a0 ff 09 a5 a1 01 09 a6 09 a7 15 00 25 0.196073 ff 75 08 95 08 81 02 09 a9 15 00 25 ff 75 08 95 08 91 02 c0 0.196506 Using subdriver: EXPLORE HID 0.1 0.197232 Entering libusb_get_report 0.200187 Can't retrieve Report 00: Broken pipe 0.200434 Path: ffa000a5.ffa000a6, Type: Input, ReportID: 0x00, Offset: 0, Size: 8 0.201022 Entering libusb_get_report 0.204196 Can't retrieve Report 00: Broken pipe 0.204443 Path: ffa000a5.ffa000a7, Type: Input, ReportID: 0x00, Offset: 0, Size: 8 0.204589 Entering libusb_get_report 0.207190 Can't retrieve Report 00: Broken pipe 0.207493 Path: ffa000a5.ffa000a9, Type: Output, ReportID: 0x00, Offset: 0, Size: 8 0.207768 Report descriptor retrieved (Reportlen = 34) 0.208330 Found HID device 0.208487 Detected a UPS: Copeland Engineering, LLC/Dock Master 0.209065 find_nut_info: unknown info type: load.off.delay 0.209226 find_nut_info: unknown info type: load.on.delay 0.209365 find_nut_info: unknown info type: load.off.delay 0.209891 upsdrv_initinfo... 0.210091 upsdrv_updateinfo... 0.462138 libusb_get_interrupt: Connection timed out 0.463669 Got 0 HID objects... 0.464839 Quick update... 0.466362 dstate_init: sock /var/run/nut/usbhid-ups-dockmaster open on fd 5 0.467580 upsdrv_updateinfo... 0.720135 libusb_get_interrupt: Connection timed out 0.721710 Got 0 HID objects... 0.723106 Quick update... 2.469447 upsdrv_updateinfo... 2.722132 libusb_get_interrupt: Connection timed out> Could you please also provide the output of "lsusb -vvv -d 04d8:0500" > run as root?root at Scanner:~# lsusb -vvv -d 04d8:0500 Bus 003 Device 002: ID 04d8:0500 Microchip Technology, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x04d8 Microchip Technology, Inc. idProduct 0x0500 bcdDevice 4.41 iManufacturer 1 Copeland Engineering, LLC iProduct 2 Dock Master iSerial 3 1.06 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 34 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 34 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Device Status: 0x0001 Self Powered I've ordered a second model (EBay, $25) - one to install into the car, and one to debug/test. It is possible to change some of the parameters of the device, using a Windows program. I have another CXO host with Windows on it that runs the Copeland Engineering software, with which I can compare if necessary. I expect it won't be hard to get this working with nut, and I'm happy to do a bunch of legwork (commit credits!) in order to get this thing working for my purposes - and I appreciate your help, Charles.