Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open HID device #63

Closed
cmccandless opened this issue Feb 9, 2021 · 6 comments
Closed

Unable to open HID device #63

cmccandless opened this issue Feb 9, 2021 · 6 comments
Labels
question Further information is requested

Comments

@cmccandless
Copy link

Describe the bug
Unable to open HID device. I followed the libhidapi-libusb0 setup here, but when I run src/example_basic.py, I see this:

Found 1 Stream Deck(s).

Traceback (most recent call last):
  File "/home/cmccandless/repos/sandbox/python-elgato-streamdeck/src/example_basic.py", line 113, in <module>
    deck.open()
  File "/home/cmccandless/repos/sandbox/python-elgato-streamdeck/src/StreamDeck/Devices/StreamDeck.py", line 148, in open
    self.device.open()
  File "/home/cmccandless/repos/sandbox/python-elgato-streamdeck/src/StreamDeck/Transport/LibUSBHIDAPI.py", line 348, in open
    self.device_handle = self.hidapi.open_device(self.device_info['path'])
  File "/home/cmccandless/repos/sandbox/python-elgato-streamdeck/src/StreamDeck/Transport/LibUSBHIDAPI.py", line 181, in open_device
    raise TransportError("Could not open HID device.")
StreamDeck.Transport.Transport.TransportError: Could not open HID device.

To Reproduce
Follow all installation steps, the run python3 src/example_basic.py

StreamDeck Information
StreamDeck v2 (15 keys)

System Information
Ubuntu 20.04
Linux 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

I'm using the latest from Github (f48a401)

@cmccandless cmccandless added the bug Something isn't working label Feb 9, 2021
@Xlaits
Copy link

Xlaits commented Feb 19, 2021

Are you doing this as root? Your user needs to have access to the device, as described here. Scroll down to the setup.

@abcminiuser
Copy link
Owner

Root access shouldn't be required, as the udev rules should assign the current user read/write permissions on the USB device. I did a documentation update to the rules in a49ce2c after feedback from users, adding the new uaccess tag to fix the permissions on non-Debian distributions.

@abcminiuser abcminiuser added question Further information is requested and removed bug Something isn't working labels Feb 20, 2021
@cmccandless
Copy link
Author

Additional info: after posting this issue, I stumbled onto the Streamdeck UI project. That application works fine. I followed the "Manual Installation" steps. I will test to see if I can still reproduce the issue.

Possible causes:

  • User was not part of plugdev group
  • Streamdeck UI setup lists more udev rule entries (4) than the setup instructions I listed above (1). One or more of these missing may have caused my issue.

@cmccandless
Copy link
Author

Unable to reproduce after Streamdeck UI installation. Suggest reviewing installation docs regarding user group membership and udev rules.

@cmccandless
Copy link
Author

It's possible that the changes in a49ce2c are sufficient. When will that change to the docs populate to https://python-elgato-streamdeck.readthedocs.io/en/stable/pages/backend_libusb_hidapi.html#linux-ubuntu-debian?

@abcminiuser
Copy link
Owner

Oops - the documentation for stable is up to date now. Apparently something had gotten stuck for that build environment on ReadTheDocs, I had to wipe it for it to rebuild correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants