K4CZP3R / hyperx-keyboard-rgb

PoC written in Python
MIT License
24 stars 5 forks source link

OSError: read error #7

Open RhysFonville opened 2 years ago

RhysFonville commented 2 years ago

When running the example.py file, I first have to change line 8 from found_sub = KeyboardHelper.get_subdevice(0x951, 0x16e5, 1) to found_sub = KeyboardHelper.get_subdevice(0x951, 0x16dd, 1) to get the correct device (or at least for kb.connect() not to throw an error).

An error is then thrown at kb.start_thread(), giving me this error:

Exception in thread Thread-7 (__thread_loop):
Traceback (most recent call last):
  File "C:\Users\Family\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\Users\Family\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Family\AppData\Local\Programs\Python\Python310\lib\site-packages\hyperx_keyboard_rgb\keyboard.py", line 78, in __thread_loop
    self.__send_feature_report(
  File "C:\Users\Family\AppData\Local\Programs\Python\Python310\lib\site-packages\hyperx_keyboard_rgb\keyboard.py", line 90, in __send_feature_report
    read = self.hid.get_feature_report(0, 0x64)
  File "hid.pyx", line 346, in hid.device.get_feature_report
OSError: read error

I'm unsure if this is a problem with me changing the subdevice pid. I am not able to fix this.

K4CZP3R commented 2 years ago

What happens when you try other interfaces?

RhysFonville commented 2 years ago

What happens when you try other interfaces?

The two available interfaces for the keyboard's subdevices contain one 0, and four 1s. All throw the same error.

RhysFonville commented 1 year ago

What happens when you try other interfaces?

Could it be a problem with how my keyboard is set up? Does it have to be in a certain state?