pobrn/ite8291r3-ctl

Support for devices with other product_id

Closed this issue · 5 comments

I have an ITE keyboard which is compatible with this software however it doesn't work out of the box because the PRODUCT_ID is different. In my case, it is "0x6004".

It would be great if the software could either probe for ITE devices and then trying to pick the PRODUCT_ID from there or alternatively using a list rather than a single value and then probing which on is available at run-time. Here are the details for mine:

Bus 001 Device 003: ID 048d:6004 Integrated Technology Express, Inc. ITE Device(8291)

So if you wanted to go for a list of compatible devices, you'd set:

PRODUCT_ID = [0xCE00, 0x6004]

and then in the "get" function, you'd do:

dev = [usb.core.find(idVendor=VENDOR_ID, idProduct=productid) for productid in PRODUCT_ID if usb.core.find(idVendor=VENDOR_ID, idProduct=productid)][0]

another alternative would be to use "usb.core.find" with just the VendorID, then get the ProductID from the entry matching the Vendor.

pobrn commented

I'll see what I can do. Could you please also attach the output of lsusb -d 048d:6004 -v?

Sure, here it is:

Bus 001 Device 003: ID 048d:6004 Integrated Technology Express, Inc. ITE Device(8291)
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x048d Integrated Technology Express, Inc.
  idProduct          0x6004 
  bcdDevice            0.03
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x003b
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      23
         Report Descriptors: 
           ** UNAVAILABLE **
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      31
         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     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
pobrn commented

Could you please test the current master?

That works, I'll be testing it further (I was using aucc before). I'll create other tickets if I find something. Thanks for taking the effort of building this.