VernierST / godirect-py

A Python module for reading from Vernier Go Direct® Sensors using USB or BLE.
GNU General Public License v3.0
8 stars 9 forks source link

USB does not work on Linux systems #2

Closed stocktonkincade closed 5 years ago

stocktonkincade commented 5 years ago

While working with the library, we found that on a Linux system (Ubuntu, Rasperry Pi, etc.), the USB connection failed with an error such as:

File "hid.pyx", line 72, in hid.device.open_path OSError: open failed

stocktonkincade commented 5 years ago

Firstly, be sure that you have installed all of the required dependencies for using godirect over USB. The proper command is: pip install godirect[USB]

Secondly, on Linux systems, you will probably need to provide a udev rule to grant the proper permissions to the Go Direct devices. You can create such a rule in the proper directory with this command: sudo su -c 'cat <<EOT >/etc/udev/rules.d/vstlibusb.rules SUBSYSTEM=="usb", ATTRS{idVendor}=="08f7", MODE="0666" SUBSYSTEM=="usb_device", ATTRS{idVendor}=="08f7", MODE="0666" EOT'