VernierST / godirect-examples

Official examples for Vernier Go Direct® Sensors in both Python and JavaScript
BSD 3-Clause "New" or "Revised" License
23 stars 26 forks source link

USB device found but error trying to open #48

Open fabio-cossalter opened 1 year ago

fabio-cossalter commented 1 year ago

Hi everybody I am trying to use a Vernier GoDirect Sensor with Python 3.8. Connecting the "Vernier Go Direct Force and Acceleration Sensor" via USB to my Lenovo Yoga L13 Notebook with Ubuntu 20.04.5 LTS and running the script "gdx_getting_started_usb.py" via Spyder I get the ouput:

USB device found but error trying to open The number of USB devices found is 1 If this is more than connected Go Direct devices, there might be another USB device (like a hub) that is being detected Try moving the hub to a different port. Otherwise, open Graphical Analysis to verify a connection select_sensors() - no device connected start() - no device connected enabled_sensor_info() - no device connected

I think I don't meet the condition stated in lines 2-4 of the output and and since I use Ubuntu I cannot (?) use Graphical Analysis in order to verify the connection.

Running the "lsusb" command in the terminal creates the ouput

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 04f2:b616 Chicony Electronics Co., Ltd Integrated 5M Camera Bus 001 Device 004: ID 056a:51f6 Wacom Co., Ltd Pen and multitouch sensor Bus 001 Device 003: ID 27c6:55b4 Shenzhen Goodix Technology Co.,Ltd. Fingerprint Reader Bus 001 Device 002: ID 04f2:b681 Chicony Electronics Co., Ltd Integrated Camera Bus 001 Device 008: ID 08f7:0010 Vernier Go Direct Sensor Bus 001 Device 006: ID 8087:0aaa Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Does anyone have an idea how to connect the vernier sensor via usb under these circumstances? Thank you very much for your help!

sswartley commented 1 year ago

Hello,

I'm afraid I am not versed in Linux, so others might have ideas on your USB hardware, but I would first do some troubleshooting of the cable, port, and device.

Does it work with Bluetooth? Can you try a different USB cable? Try a different USB port? Does the USB port work with other USB devices? Do you have another computer that you could use to run Graphical Analysis and test USB on that device?

fabio-cossalter commented 1 year ago

Hi Thank you for your feedback. I was able to solve the problem. The issue was the permissions given to the vernier sensor. It could be solved by moving the file "vstlibusb.rules" to the appropriate directory by using the command sudo cp vstlibusb.rules /etc/udev/rules.d/.

sswartley commented 1 year ago

Oh yeah, I'm sorry I didn't think of that as the first thing to try. We highlight that you need to take that step in our Getting Started guide, in the 'Install the Vernier godirect Module' section for Linux.

Glad you got it going!