I hope someone can help me with this one.
I am trying to connect a spectrometer device (ThorLabs vendor) via a USB interface in a Linux environment (I am using openSUSE 15.1). However, this manufacturer only supports Windows systems but, because it included the driver source code in it's software bundle, I believe it is possible to compile the drivers in Linux to use the device. The only thing that seems to be required are VISA libraries to communicate with USB interface, which I was glad to know are available in Linux via NI-VISA (NI-VISA for Linux).
So thus far I have compiled the device driver source code on my Linux machine, but the problem is that I am still unable to interact with the device. However, here's what I managed to know so far:
- Using the command
lsusbin Linux shows the vendor (0x1313) and product IDs (0x8080), but not the serial number. Also the product ID is not what I expect to see, which is 0x8081.
$ lsusb Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 04f2:b685 Chicony Electronics Co., Ltd Bus 001 Device 002: ID 06cb:00a8 Synaptics, Inc. Bus 001 Device 004: ID 8087:0029 Intel Corp. Bus 001 Device 005: ID 1313:8080 ThorLabs Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
- The results of
usb-devicesshow that my device does not have a driver attached to it. However I do not know how I could do it with my compiled driver library.
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs= 1 P: Vendor=1313 ProdID=8080 Rev=00.00 C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
Used pyvisa python package to list all interfaces with the libvisa.so backend. This did not return my device, even when passing the query
This page (https://zone.ni.com/reference/en-XX/help/370131S-01/ni-visa/configuringni-visarecognizerawusbdevice/) explains how to configure NI-VISA for RAW devices (this is actually the case for my device). It mentions that it requires kernel support for usbfs. However, after some reading it seems this feature is old and not used on modern distros. Actually, I tried to mount the device anyway but did not find any entry for it in /dev, or at least nothing I could recognize it to be.
Although I am fairly comfortable with Linux systems I never dealt in depth with the intricacies of hardware configuration. At this point I am out of ideas. What else should I look for to debug this issue? Can I somehow define my compiled driver to handle the device, since in the second point above shows no driver connected to it? Any hints/suggestions would be greatly appreciated!
EDIT: Clarified context for issue. Added NI-VISA reference.