rgb_keyboard icon indicating copy to clipboard operation
rgb_keyboard copied to clipboard

Could not detect keyboard - GMMK Pro

Open ahopkins opened this issue 2 years ago • 1 comments

Could not detect keyboard, check hardware and permissions.
Try with the --bus and --device options.

I get this even if I use the bus/device args.

lsusb | grep GMMK
Bus 001 Device 035: ID 320f:5044 Glorious GMMK Pro

ahopkins avatar May 24 '22 11:05 ahopkins

The GMMK Pro is currently not supported by this program, and from my limited knowledge seems to use a different protocol. If that is the case, adding support to this program is not reasonable (for me at least, since hardware access is needed to reverse engineer the protocol).

To confirm if the protocol is compatible, please

  • try running sudo rgb_keyboard --bus … --device … …
  • post the output of lsusb -vd 320f:5044

dokutan avatar May 24 '22 15:05 dokutan

I have a GMMK Pro aswell. Here is the requested output:

❯ lsusb | grep -i gmmk
Bus 001 Device 043: ID 320f:5044 USB HID GMMK PRO
❯ sudo ./rgb_keyboard --bus=001 --device=043
Could not detect keyboard, check hardware and permissions.
Try with the --bus and --device options.
❯ lsusb -vd 320f:5044                                                                                                                                    impure ❄ gcc usbutils libusb1

Bus 001 Device 043: ID 320f:5044 USB HID GMMK PRO
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           0x320f
  idProduct          0x5044
  bcdDevice            0.45
  iManufacturer           1 USB HID
  iProduct                2 GMMK PRO
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0054
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self 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      65
         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
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      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     220
         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     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0
      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      24
         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     0x0040  1x 64 bytes
        bInterval               1

pinpox avatar Nov 11 '22 08:11 pinpox

The USB interface is different compared to the supported keyboards, but not different enough to prove that a completely different protocol is used. To proceed: capture some communication with the official software, compare it to the data generated by rgb_keyboard and if they match (edit: or are close enough that it makes sense to support both in the same codebase), modify the usb handling to accomodate the GMMK Pro. This is only feasible with access to the keyboard, so the best i can do is to give advice and merge PRs. Please tell me if you want to work on this, otherwise this issue can be closed.

dokutan avatar Nov 11 '22 13:11 dokutan

Sorry for the trouble, but I won't have the time to persue this any further. The solution for me was to switch to QMK, which has the options that I need and is supported on this board. I suppose rgb_keyboard does not support QMK in general?

pinpox avatar Nov 12 '22 14:11 pinpox

I suppose rgb_keyboard does not support QMK in general?

No, rgb_keyboard only attempts to implement the configuration of the proprietary firmware on some keyboards, supporting QMK would mean doing completely different things (e.g. reflashing the firmware afaik).

If QMK is available for a keyboard, it should be the better choice compared to a proprietary firmware. Therefore i don't see any real reason to work on support for the GMMK Pro.

dokutan avatar Nov 12 '22 18:11 dokutan