USBHost for Griffin Powermate

Status
Not open for further replies.
I would like to use the Griffin PowerMate with my Teensy 3.6.
Here is a slightly more technical description of its features, and here's the Linux Kernel driver.

The knob has unlimited rotation and also can be pressed as a button. I want to use it for various projects - e.g. sending MIDI control codes. (I have successfully connected the Teensy and PowerMate with an iPad.)

When connected to the USB Host port on the Teensy 3.6 and after uncommenting USBHOST_PRINT_DEBUG in USBHost_t36.h, I can see the following Serial log entries:

Code:
new_Device: 1.5 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
enumeration:
enumeration:
enumeration:
enumeration:
Config data length = 41
enumeration:
bNumInterfaces = 1
bConfigurationValue = 1
enumeration:
HIDParser claim this=1FFF2040
USBHub memory usage = 960
USBHub claim_device this=1FFF2A40
USBHub memory usage = 960
USBHub claim_device this=1FFF34C0
HIDParser claim this=1FFF2540
HIDParser claim this=1FFF3880
USBSerial claim this=1FFF2E80
vid=77D, pid=410, bDeviceClass = 0, bDeviceSubClass = 0, bDeviceProtocol = 0
09 04 00 00 02 03 00 00 05 09 21 00 01 00 01 22 4A 00 07 05 81 03 06 00 0A 07 05 02 03 01 00 0A 
Descriptor 4 = INTERFACE
HIDParser claim this=1FFF2040
 bInterfaceClass =    3
 bInterfaceSubClass = 0
 bInterfaceProtocol = 0
HID Parser Claim: 09 04 00 00 02 03 00 00 05 09 21 00 01 00 01 22 4A 00 07 05 81 03 06 00 0A 07 05 02 03 01 00 0A 
report descriptor size = 74
Two endpoint HID:
  endpoint = 81
   size = 6
   interval = 10
  endpoint = 2
   size = 1
   interval = 10
new_Pipe
allocate_interrupt_pipe_bandwidth
 best_bandwidth = 3, at offset = 0, shift= 0
new_Pipe
allocate_interrupt_pipe_bandwidth
 best_bandwidth = 4, at offset = 1, shift= 0
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
*** Device HID1 77d:410 - connected ***
  manufacturer: Griffin Technology, Inc.
  product: Griffin PowerMate
control callback (hid)
05 0C 09 01 A1 01 05 09 19 01 29 01 15 00 25 01 75 01 95 01 81 02 75 07 95 01 81 01 05 01 09 33 15 81 25 7F 75 08 95 01 81 02 05 0C 09 01 15 00 26 FF 00 75 08 95 04 81 02 09 01 75 08 95 01 91 02 09 01 75 08 95 08 B1 02 C0 
  mesg = 22000681
  got report descriptor
Found top level collection C0001
find_driver
HID: 0 - 00 01 00 4F 10 00 
HID: 0 - 00 01 00 4F 10 00 
HID: 0 - 00 FF 00 4F 10 00 
HID: 0 - 00 FF 00 4F 10 00

The last four lines were printed by the USBHIDParser::in_data method when I turned the Knob.

Is it possible to get this raw data from INO code?
Or will I need to write a full CPP driver?

TIA
 
Some times when I am looking at new HID devices like this, I will try to get some additional information, to see if we can adapt a new HID driver for it...

I often start off looking at it from a linux machine... I use the command: usb-hiddump, which I believe I had to use the command:
sudo apt install hidrd

to install on my current up board. I have the USB device plugged into the linux box. and check for HID information:
Code:
kurt@kurt-UP-Turtle:~$ usb-hiddump
usb-hiddump: command not found
kurt@kurt-UP-Turtle:~$ sudo usbhid-dump
001:003:002:DESCRIPTOR         1528894816.245546
 05 0C 09 01 A1 01 85 20 06 00 FF 15 00 26 FF 00
 75 08 95 12 0A 0A FA B1 02 85 21 06 00 FF 15 00
 25 01 75 01 95 10 1A 10 FA 2A 1F FA 81 02 85 28
 06 00 FF 75 01 95 18 1A 10 FA 2A 1F FA B1 02 85
 22 06 00 FF 15 00 26 FF 00 75 08 95 1A 0A 0A FA
 B1 02 85 23 06 00 FF 0A 0A FA B1 02 85 A2 06 00
 FF 0A 0A FA B1 02 85 A3 06 00 FF 0A 0A FA B1 02
 85 24 06 00 FF 95 1F 0A 0A FA B1 02 85 25 06 00
 FF 0A 0A FA B1 02 85 A4 06 00 FF 95 1F 0A 0A FA
 B1 02 85 A5 06 00 FF 0A 0A FA B1 02 85 26 06 00
 FF 0A 0A FA B1 02 85 27 06 00 FF 0A 0A FA 81 02
 C0 05 0C 09 01 A1 01 85 07 05 0C 19 00 2A FF 03
 95 01 75 10 15 00 26 FF 03 81 00 05 07 19 00 29
 FF 75 08 26 FF 00 81 00 81 01 06 00 FF 0A 03 FE
 0A 04 FE 75 01 95 02 25 01 81 02 0A 05 FF 95 01
 75 05 25 1F 81 02 75 01 81 01 1A 01 FD 2A FF FD
 15 01 26 FF 00 75 08 81 00 0A 02 FF 26 FF 00 15
 00 81 02 C0 05 01 09 80 A1 01 85 03 19 00 29 FF
 15 00 26 FF 00 81 00 C0

001:003:001:DESCRIPTOR         1528894816.249611
 05 01 09 02 A1 01 05 01 09 02 A1 02 85 1A 09 01
 A1 00 05 09 19 01 29 05 95 05 75 01 15 00 25 01
 81 02 75 03 95 01 81 01 05 01 09 30 09 31 95 02
 75 10 16 01 80 26 FF 7F 81 06 A1 02 85 12 09 48
 95 01 75 02 15 00 25 01 35 01 45 0C B1 02 85 1A
 09 38 35 00 45 00 95 01 75 10 16 01 80 26 FF 7F
 81 06 C0 A1 02 85 12 09 48 75 02 15 00 25 01 35
 01 45 0C B1 02 35 00 45 00 75 04 B1 01 85 1A 05
 0C 95 01 75 10 16 01 80 26 FF 7F 0A 38 02 81 06
 C0 C0 C0 C0 05 0C 09 01 A1 01 05 01 09 02 A1 02
 85 1F 05 0C 0A 38 02 95 01 75 10 16 01 80 26 FF
 7F 81 06 85 17 06 00 FF 0A 06 FF 0A 0F FF 15 00
 25 01 35 01 45 0C 95 02 75 02 B1 02 0A 04 FF 35
 00 45 00 95 01 75 01 B1 02 75 03 B1 01 C0 C0

001:003:000:DESCRIPTOR         1528894816.251084
 05 01 09 06 A1 01 05 08 19 01 29 03 15 00 25 01
 75 01 95 03 91 02 95 05 91 01 05 07 1A E0 00 2A
 E7 00 95 08 81 02 75 08 95 01 81 01 19 00 2A 91
 00 26 FF 00 95 06 81 00 C0
I then look at more of the details using command like:
Code:
kurt@kurt-UP-Turtle:~$ sudo usbhid-dump  -i1 | grep -v : | xxd -r -p | hidrd-convert -o spec
Usage Page (Desktop),                           ; Generic desktop controls (01h)
Usage (Mouse),                                  ; Mouse (02h, application collection)
Collection (Application),
    Usage Page (Desktop),                       ; Generic desktop controls (01h)
    Usage (Mouse),                              ; Mouse (02h, application collection)
    Collection (Logical),
        Report ID (26),
        Usage (Pointer),                        ; Pointer (01h, physical collection)
        Collection (Physical),
            Usage Page (Button),                ; Button (09h)
            Usage Minimum (01h),
            Usage Maximum (05h),
            Report Count (5),
            Report Size (1),
            Logical Minimum (0),
            Logical Maximum (1),
            Input (Variable),
            Report Size (3),
            Report Count (1),
            Input (Constant),
            Usage Page (Desktop),               ; Generic desktop controls (01h)
            Usage (X),                          ; X (30h, dynamic value)
            Usage (Y),                          ; Y (31h, dynamic value)
            Report Count (2),
            Report Size (16),
            Logical Minimum (-32767),
            Logical Maximum (32767),
            Input (Variable, Relative),
            Collection (Logical),
                Report ID (18),
                Usage (Resolution Multiplier),  ; Resolution multiplier (48h, dynamic value)
                Report Count (1),
                Report Size (2),
                Logical Minimum (0),
                Logical Maximum (1),
                Physical Minimum (1),
                Physical Maximum (12),
                Feature (Variable),
                Report ID (26),
                Usage (Wheel),                  ; Wheel (38h, dynamic value)
                Physical Minimum (0),
                Physical Maximum (0),
                Report Count (1),
                Report Size (16),
                Logical Minimum (-32767),
                Logical Maximum (32767),
                Input (Variable, Relative),
            End Collection,
            Collection (Logical),
                Report ID (18),
                Usage (Resolution Multiplier),  ; Resolution multiplier (48h, dynamic value)
                Report Size (2),
                Logical Minimum (0),
                Logical Maximum (1),
                Physical Minimum (1),
                Physical Maximum (12),
                Feature (Variable),
                Physical Minimum (0),
                Physical Maximum (0),
                Report Size (4),
                Feature (Constant),
                Report ID (26),
                Usage Page (Consumer),          ; Consumer (0Ch)
                Report Count (1),
                Report Size (16),
                Logical Minimum (-32767),
                Logical Maximum (32767),
                Usage (AC Pan),                 ; AC pan (0238h, linear control)
                Input (Variable, Relative),
            End Collection,
        End Collection,
    End Collection,
End Collection,
Usage Page (Consumer),                          ; Consumer (0Ch)
Usage (Consumer Control),                       ; Consumer control (01h, application collection)
Collection (Application),
    Usage Page (Desktop),                       ; Generic desktop controls (01h)
    Usage (Mouse),                              ; Mouse (02h, application collection)
    Collection (Logical),
        Report ID (31),
        Usage Page (Consumer),                  ; Consumer (0Ch)
        Usage (AC Pan),                         ; AC pan (0238h, linear control)
        Report Count (1),
        Report Size (16),
        Logical Minimum (-32767),
        Logical Maximum (32767),
        Input (Variable, Relative),
        Report ID (23),
        Usage Page (FF00h),                     ; FF00h, vendor-defined
        Usage (FF06h),
        Usage (FF0Fh),
        Logical Minimum (0),
        Logical Maximum (1),
        Physical Minimum (1),
        Physical Maximum (12),
        Report Count (2),
        Report Size (2),
        Feature (Variable),
        Usage (FF04h),
        Physical Minimum (0),
        Physical Maximum (0),
        Report Count (1),
        Report Size (1),
        Feature (Variable),
        Report Size (3),
        Feature (Constant),
    End Collection,
End Collection
And I try to get as much information USB knows about it... Something like:
Code:
kurt@kurt-UP-Turtle:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0424:2530 Standard Microsystems Corp.
Bus 001 Device 004: ID 0424:4603 Standard Microsystems Corp.
Bus 001 Device 003: ID 045e:07a5 Microsoft Corp. Wireless Receiver 1461C
Bus 001 Device 002: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
kurt@kurt-UP-Turtle:~$ lsusb -v -d  045e:07a5

Bus 001 Device 003: ID 045e:07a5 Microsoft Corp. Wireless Receiver 1461C
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x045e Microsoft Corp.
  idProduct          0x07a5 Wireless Receiver 1461C
  bcdDevice            7.67
  iManufacturer           1
  iProduct                2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           84
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      57
         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               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     223
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      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.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     296
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
We can get most of this information from our USBHost code driver, as you see some of it with the debug print stuff you showed.

I think some of the data is shown in the data you showed:
Code:
control callback (hid)
05 0C 09 01 A1 01 05 09 19 01 29 01 15 00 25 01 75 01 95 01 81 02 75 07 95 01 81 01 05 01 09 33 15 81 25 7F 75 08 95 01 81 02 05 0C 09 01 15 00 26 FF 00 75 08 95 04 81 02 09 01 75 08 95 01 91 02 09 01 75 08 95 08 B1 02 C0 
  mesg = 22000681
  got report descriptor
Found top level collection C0001
But it has been awhile since I hand parsed one of these.
 
Some times when I am looking at new HID devices like this, I will try to get some additional information, to see if we can adapt a new HID driver for it...

Thanks Kurt, I guess I'll have to write a driver. My C++ skills are last-century, so I'm hoping that the Mouse or Joystick HID drivers will provide a good start - combined with the Linux driver.
 
Thanks Kurt, I guess I'll have to write a driver. My C++ skills are last-century, so I'm hoping that the Mouse or Joystick HID drivers will provide a good start - combined with the Linux driver.
If you can grab and include that Linux information I mentioned, I might be able to take a few guesses that maybe gets you a little closer.
 
If you can grab and include that Linux information I mentioned, I might be able to take a few guesses that maybe gets you a little closer.

Here's the raw hid dump:
Code:
001:019:000:DESCRIPTOR         1528936945.523435
 05 0C 09 01 A1 01 05 09 19 01 29 01 15 00 25 01
 75 01 95 01 81 02 75 07 95 01 81 01 05 01 09 33
 15 81 25 7F 75 08 95 01 81 02 05 0C 09 01 15 00
 26 FF 00 75 08 95 04 81 02 09 01 75 08 95 01 91
 02 09 01 75 08 95 08 B1 02 C0

001:018:003:DESCRIPTOR         1528936945.531583
 05 0C 09 01 A1 01 05 0C

001:005:000:DESCRIPTOR         1528936945.536407
 05 0D 09 04 A1 01 85 01 09 22 A1 02 09 42 15 00
 25 01 75 01 95 01 81 02 75 01 81 03 75 06 09 51
 25 3F 81 02 26 FF 00 75 08 09 48 81 02 09 49 81
 02 95 01 05 01 26 F0 0C 75 10 55 0F 65 11 09 30
 35 00 46 58 01 95 02 81 02 26 50 07 46 C2 00 09
 31 81 02 C0 05 0D 09 22 A1 02 05 0D 09 42 15 00
 25 01 75 01 95 01 81 02 75 01 81 03 75 06 09 51
 25 3F 81 02 26 FF 00 75 08 09 48 81 02 09 49 81
 02 95 01 05 01 26 F0 0C 75 10 55 0F 65 11 09 30
 35 00 46 58 01 95 02 81 02 26 50 07 46 C2 00 09
 31 81 02 C0 05 0D 09 22 A1 02 05 0D 09 42 15 00
 25 01 75 01 95 01 81 02 75 01 81 03 75 06 09 51
 25 3F 81 02 26 FF 00 75 08 09 48 81 02 09 49 81
 02 95 01 05 01 26 F0 0C 75 10 55 0F 65 11 09 30
 35 00 46 58 01 95 02 81 02 26 50 07 46 C2 00 09
 31 81 02 C0 05 0D 09 22 A1 02 05 0D 09 42 15 00
 25 01 75 01 95 01 81 02 75 01 81 03 75 06 09 51
 25 3F 81 02 26 FF 00 75 08 09 48 81 02 09 49 81
 02 95 01 05 01 26 F0 0C 75 10 55 0F 65 11 09 30
 35 00 46 58 01 95 02 81 02 26 50 07 46 C2 00 09
 31 81 02 C0 05 0D 09 22 A1 02 05 0D 09 42 15 00
 25 01 75 01 95 01 81 02 75 01 81 03 75 06 09 51
 25 3F 81 02 26 FF 00 75 08 09 48 81 02 09 49 81
 02 95 01 05 01 26 F0 0C 75 10 55 0F 65 11 09 30
 35 00 46 58 01 95 02 81 02 26 50 07 46 C2 00 09
 31 81 02 C0 05 0D 09 22 A1 02 05 0D 09 42 15 00
 25 01 75 01 95 01 81 02 75 01 81 03 75 06 09 51
 25 3F 81 02 26 FF 00 75 08 09 48 81 02 09 49 81
 02 95 01 05 01 26 F0 0C 75 10 55 0F 65 11 09 30
 35 00 46 58 01 95 02 81 02 26 50 07 46 C2 00 09
 31 81 02 C0 05 0D 09 22 A1 02 05 0D 09 42 15 00
 25 01 75 01 95 01 81 02 75 01 81 03 75 06 09 51
 25 3F 81 02 26 FF 00 75 08 09 48 81 02 09 49 81
 02 95 01 05 01 26 F0 0C 75 10 55 0F 65 11 09 30
 35 00 46 58 01 95 02 81 02 26 50 07 46 C2 00 09
 31 81 02 C0 05 0D 09 22 A1 02 05 0D 09 42 15 00
 25 01 75 01 95 01 81 02 75 01 81 03 75 06 09 51
 25 3F 81 02 26 FF 00 75 08 09 48 81 02 09 49 81
 02 95 01 05 01 26 F0 0C 75 10 55 0F 65 11 09 30
 35 00 46 58 01 95 02 81 02 26 50 07 46 C2 00 09
 31 81 02 C0 05 0D 09 22 A1 02 05 0D 09 42 15 00
 25 01 75 01 95 01 81 02 75 01 81 03 75 06 09 51
 25 3F 81 02 26 FF 00 75 08 09 48 81 02 09 49 81
 02 95 01 05 01 26 F0 0C 75 10 55 0F 65 11 09 30
 35 00 46 58 01 95 02 81 02 26 50 07 46 C2 00 09
 31 81 02 C0 05 0D 09 22 A1 02 05 0D 09 42 15 00
 25 01 75 01 95 01 81 02 75 01 81 03 75 06 09 51
 25 3F 81 02 26 FF 00 75 08 09 48 81 02 09 49 81
 02 95 01 05 01 26 F0 0C 75 10 55 0F 65 11 09 30
 35 00 46 58 01 95 02 81 02 26 50 07 46 C2 00 09
 31 81 02 C0 05 0D 09 56 55 00 65 00 27 FF FF FF
 7F 95 01 75 20 81 02 09 54 25 7F 95 01 75 08 81
 02 85 0A 09 55 25 0A B1 02 85 44 06 00 FF 09 C5
 15 00 26 FF 00 75 08 96 00 01 B1 02 C0 06 FF 01
 09 01 A1 01 85 02 15 00 26 FF 00 75 08 95 40 09
 00 81 02 C0 06 00 FF 09 01 A1 01 85 03 75 08 95
 1F 09 01 91 02 C0 06 01 FF 09 01 A1 01 85 04 15
 00 26 FF 00 75 08 95 13 09 00 81 02 C0

001:016:001:DESCRIPTOR         1528936945.540129
 05 01 09 02 A1 01 85 01 09 01 A1 00 05 09 19 01
 29 05 15 00 25 01 95 05 75 01 81 02 95 01 75 03
 81 01 05 01 09 30 09 31 16 01 80 26 FF 7F 75 10
 95 02 81 06 09 38 15 81 25 7F 75 08 95 01 81 06
 05 0C 0A 38 02 95 01 81 06 C0 C0 05 01 09 80 A1
 01 85 02 05 01 19 81 29 83 15 00 25 01 95 03 75
 01 81 06 95 01 75 05 81 01 C0 05 0C 09 01 A1 01
 85 03 15 00 26 80 03 19 00 2A 80 03 75 10 95 01
 81 00 C0 06 BC FF 09 88 A1 01 85 04 19 00 2A FF
 00 15 00 26 FF 00 75 08 95 01 81 00 C0 06 00 FF
 09 0E A1 01 85 BA 95 1F 75 08 26 FF 00 15 00 09
 01 91 02 85 BA 95 1F 75 08 26 FF 00 15 00 09 01
 81 02 C0

001:016:000:DESCRIPTOR         1528936945.541293
 05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
 75 01 95 08 81 02 95 01 75 08 81 03 95 05 75 01
 05 08 19 01 29 05 91 02 95 01 75 03 91 03 95 06
 75 08 15 00 25 FF 05 07 19 00 29 FF 81 00 C0

and the converted detail
Code:
Usage Page (Desktop),               ; Generic desktop controls (01h)
Usage (Mouse),                      ; Mouse (02h, application collection)
Collection (Application),
    Report ID (1),
    Usage (Pointer),                ; Pointer (01h, physical collection)
    Collection (Physical),
        Usage Page (Button),        ; Button (09h)
        Usage Minimum (01h),
        Usage Maximum (05h),
        Logical Minimum (0),
        Logical Maximum (1),
        Report Count (5),
        Report Size (1),
        Input (Variable),
        Report Count (1),
        Report Size (3),
        Input (Constant),
        Usage Page (Desktop),       ; Generic desktop controls (01h)
        Usage (X),                  ; X (30h, dynamic value)
        Usage (Y),                  ; Y (31h, dynamic value)
        Logical Minimum (-32767),
        Logical Maximum (32767),
        Report Size (16),
        Report Count (2),
        Input (Variable, Relative),
        Usage (Wheel),              ; Wheel (38h, dynamic value)
        Logical Minimum (-127),
        Logical Maximum (127),
        Report Size (8),
        Report Count (1),
        Input (Variable, Relative),
        Usage Page (Consumer),      ; Consumer (0Ch)
        Usage (AC Pan),             ; AC pan (0238h, linear control)
        Report Count (1),
        Input (Variable, Relative),
    End Collection,
End Collection,
Usage Page (Desktop),               ; Generic desktop controls (01h)
Usage (Sys Control),                ; System control (80h, application collection)
Collection (Application),
    Report ID (2),
    Usage Page (Desktop),           ; Generic desktop controls (01h)
    Usage Minimum (Sys Power Down), ; System power down (81h, one-shot control)
    Usage Maximum (Sys Wake Up),    ; System wake up (83h, one-shot control)
    Logical Minimum (0),
    Logical Maximum (1),
    Report Count (3),
    Report Size (1),
    Input (Variable, Relative),
    Report Count (1),
    Report Size (5),
    Input (Constant),
End Collection,
Usage Page (Consumer),              ; Consumer (0Ch)
Usage (Consumer Control),           ; Consumer control (01h, application collection)
Collection (Application),
    Report ID (3),
    Logical Minimum (0),
    Logical Maximum (896),
    Usage Minimum (00h),
    Usage Maximum (0380h),
    Report Size (16),
    Report Count (1),
    Input,
End Collection,
Usage Page (FFBCh),                 ; FFBCh, vendor-defined
Usage (88h),
Collection (Application),
    Report ID (4),
    Usage Minimum (00h),
    Usage Maximum (FFh),
    Logical Minimum (0),
    Logical Maximum (255),
    Report Size (8),
    Report Count (1),
    Input,
End Collection,
Usage Page (FF00h),                 ; FF00h, vendor-defined
Usage (0Eh),
Collection (Application),
    Report ID (186),
    Report Count (31),
    Report Size (8),
    Logical Maximum (255),
    Logical Minimum (0),
    Usage (01h),
    Output (Variable),
    Report ID (186),
    Report Count (31),
    Report Size (8),
    Logical Maximum (255),
    Logical Minimum (0),
    Usage (01h),
    Input (Variable),
End Collection

and finally the verbose lsusb for the device:
Code:
Bus 001 Device 019: ID 077d:0410 Griffin Technology PowerMate
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x077d Griffin Technology
  idProduct          0x0410 PowerMate
  bcdDevice            4.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              5 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      74
         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     0x0006  1x 6 bytes
        bInterval              10
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              10

The Python module for the powermate is what I'd like to end up with - and it is dependent on the Linux driver.
 
Looks like my later response did not take?

What T3.6 test program are you running with this? Mouse.ino? Would thought I would have seen more messages like which HID drivers it was asking if they want to claim a report.

As for the report you showed, it looks like a standard mouse? But the issue is was this for this device or do you have some other HID devices plugged in to your Linux box...

You might need to try the different Hid devices. I think you are showing the right data, as I formatted the HID report descriptor from your first post (long one line text), which looks like:
Code:
05 0C 09 01 A1 01 05 09 19 01 29 01 15 00 25 01 
75 01 95 01 81 02 75 07 95 01 81 01 05 01 09 33 
15 81 25 7F 75 08 95 01 81 02 05 0C 09 01 15 00 
26 FF 00 75 08 95 04 81 02 09 01 75 08 95 01 91 
02 09 01 75 08 95 08 B1 02 C0

What I should have mentioned, is if it looks like there are multiple HIDs in the draw dump... You might try looking at doing formatted dumps for the different raw values.
In the command:
Code:
kurt@kurt-UP-Turtle:~$ sudo usbhid-dump  [COLOR="#FF0000"]-i1[/COLOR] | grep -v : | xxd -r -p | hidrd-convert -o spec
The -i1 is to do it for the first (I think) raw value. I don't remember for sure if it is 1 based or 0 based... But you might try dumping some of the different indexes...

But again assuming that the data above is correct, I would think I would be seeing more debug information, if the library was built with USBHOST_PRINT_DEBUG defined in the main header file (usbhost_t36.h)
 
As for the report you showed, it looks like a standard mouse? But the issue is was this for this device or do you have some other HID devices plugged in to your Linux box...

You might need to try the different Hid devices.

(I wondered about that.) Now I've used lsusb to find the device and its bus (Bus 1, Device 22)
Code:
lsusb
Bus 002 Device 007: ID 0424:5534 Standard Microsystems Corp. Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0bda:0139 Realtek Semiconductor Corp. RTS5139 Card Reader Controller
Bus 001 Device 003: ID 13d3:5188 IMC Networks 
Bus 001 Device 008: ID 8087:07dc Intel Corp. 
Bus 001 Device 022: ID 077d:0410 Griffin Technology PowerMate
Bus 001 Device 021: ID 413c:a503 Dell Computer Corp. 
Bus 001 Device 020: ID 0424:2134 Standard Microsystems Corp. Hub
Bus 001 Device 005: ID 04f3:010c Elan Microelectronics Corp. 
Bus 001 Device 016: ID 24ae:2003  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

and then pass that to the usbhid-dump ("-a 1:22"):
Code:
 sudo usbhid-dump  -a 1:22 | grep -v : | xxd -r -p | hidrd-convert -o spec
to produce this report:
Code:
Usage Page (Consumer),          ; Consumer (0Ch)
Usage (Consumer Control),       ; Consumer control (01h, application collection)
Collection (Application),
    Usage Page (Button),        ; Button (09h)
    Usage Minimum (01h),
    Usage Maximum (01h),
    Logical Minimum (0),
    Logical Maximum (1),
    Report Size (1),
    Report Count (1),
    Input (Variable),
    Report Size (7),
    Report Count (1),
    Input (Constant),
    Usage Page (Desktop),       ; Generic desktop controls (01h)
    Usage (Rx),                 ; Rx (33h, dynamic value)
    Logical Minimum (-127),
    Logical Maximum (127),
    Report Size (8),
    Report Count (1),
    Input (Variable),
    Usage Page (Consumer),      ; Consumer (0Ch)
    Usage (Consumer Control),   ; Consumer control (01h, application collection)
    Logical Minimum (0),
    Logical Maximum (255),
    Report Size (8),
    Report Count (4),
    Input (Variable),
    Usage (Consumer Control),   ; Consumer control (01h, application collection)
    Report Size (8),
    Report Count (1),
    Output (Variable),
    Usage (Consumer Control),   ; Consumer control (01h, application collection)
    Report Size (8),
    Report Count (8),
    Feature (Variable),
End Collection
 
Yes that makes more sense... It describes the 6 bytes of the report you mentioned. I hacked up some code this morning as maybe a start...

I created a powermate hid device modeled after Mouse one, I am guessing at what values will come as indexes (Usage values)... could be wrong

I created the new object as it's own header file and c++ file as new tabs of a sketch (mouse example).

You might try running it and see if it works at all. That is does it claim the device.

When you turn it or press button, does it give you an event:

I have a print statement input data processing: Serial.printf("Powermate: usage=%X, value=%d\n", usage, value);
Which should verify if the data usage values is what I expect and if not then hopefully leads the way to fix.

Other options is to model this more like keyboard, with callback function.

Or potentially like rawhid, which can grab the whole stream as a whole...

Hope this helps
 

Attachments

  • usb_host_powermate-180615a.zip
    7.5 KB · Views: 123
Status
Not open for further replies.
Back
Top