USB high speed EHCI-PCI Ownership Question?

Kernels & Hardware, configuring network, installing services

USB high speed EHCI-PCI Ownership Question?

Postby LostZimbo » 2020-09-15 11:48

Hi all,

I have some linux experience and regularly use serial communication on Python for working with a wide set of instruments at work to build up the system I need.

However I have received a new spectrometer which comes with a proprietary library and a testing program "test" which has been added to my PATH and all appears to be working appropriately. Only problem is the test program will only work when I use "sudo" if I am not sudo, the program will run but will not find the spectrometer:

$ testavs
Avantes libavs test
USB spectrometers found: 0
Test Done

$ sudo testavs
Avantes libavs test
USB spectrometers found: 1
Test spectrometer: 1507193U1
Test Done

This appears to me to be a simple situation of not having the appropriate level to be able to access the instrument. When I plug in the device and run "sudo dmesg" I get the following result:

[97566.912233] usb 3-1.6: new high-speed USB device number 12 using ehci-pci
[97567.025682] usb 3-1.6: New USB device found, idVendor=1992, idProduct=0667, bcdDevice= 0.00
[97567.025686] usb 3-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[97567.025688] usb 3-1.6: Product: AS5216

I am used to seeing an associated device placed under the "/dev" where I can alter its ownership to have access as a normal user but this is not the case for this "ehci-pci" type device. If anyone can help me and show where I need to go to change the ownership I would be very grateful.
LostZimbo
 
Posts: 4
Joined: 2020-09-15 11:37

Re: USB high speed EHCI-PCI Ownership Question?

Postby CwF » 2020-09-16 03:30

I would look at 'groups' and not ownership.
CwF
 
Posts: 768
Joined: 2018-06-20 15:16

Re: USB high speed EHCI-PCI Ownership Question?

Postby LostZimbo » 2020-09-16 06:33

Well this is what I had in mind: usually when I want a serial connection like "/dev/ttyACM0" for instance it's a part of the group "dialout" so I add myself to that group and no more problems.

In this case however I have no idea which group ehci-pci devices belong to or even where to find such information as there appears to be no device node? At least not a dynamic device node as for serial devices.
LostZimbo
 
Posts: 4
Joined: 2020-09-15 11:37

Re: USB high speed EHCI-PCI Ownership Question?

Postby CwF » 2020-09-18 17:19

Nothing yet?
You could maybe create a udev rule to place the pciid of the device into a common user group?

Or, take a look at usbview. Install it for the info it may give, and also an example of using pkexec to manage the permissions.
CwF
 
Posts: 768
Joined: 2018-06-20 15:16

Re: USB high speed EHCI-PCI Ownership Question?

Postby LostZimbo » 2020-09-22 13:23

Thank you for the suggestion, I tried udev but probably I wrote a bad rule as nothing came up:

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idProduct}=="0667", ATTRS{idVendor}=="1992", SYMLINK+="avantes"


separately I also tried usbview: a great tool I did not know of. The device does show up on this program, where it does not on lsusb, coloured red which according to the documentation means "no kernel available". However the library I use for this instrument still works fine despite there being no kernel available so unfortunately I am no closer to finding how to access the instrument without needing admin privileges every time.
LostZimbo
 
Posts: 4
Joined: 2020-09-15 11:37


Return to System configuration

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable