rk
New Member
Posts: 4
|
Post by rk on Sept 10, 2024 8:17:08 GMT -5
Hi all,
Sorry if this issue was already discussed.
I am trying to communicate with Lakeshore 372 via USB connection. My computer: OS: Ubuntu 22.04.3 LTS Kernel: 6.8.0-40-generic
When I connect Lakeshore 372 to the computer with a USB cable and run
dmesg I get:
[74760.068606] usbcore: registered new interface driver cp210x [74760.068619] usbserial: USB Serial support registered for cp210x [75468.634066] usb 1-13: USB disconnect, device number 20 [75470.080644] usb 1-13: new full-speed USB device number 21 using xhci_hcd [75470.209549] usb 1-13: New USB device found, idVendor=1fb9, idProduct=0305, bcdDevice= 1.00 [75470.209565] usb 1-13: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [75470.209571] usb 1-13: Product: Lake Shore Model 372 AC Bridge & Temperature Controller [75470.209575] usb 1-13: Manufacturer: Silicon Labs [75470.209578] usb 1-13: SerialNumber: LSA2JW8
However, I do not see the device when I run
ls /dev/
I tried to run a Python code:
from lakeshore import Model372 myinstrument = Model372(57600) But I got the error:
raise InstrumentException("No serial connections found") lakeshore.generic_instrument.InstrumentException: No serial connections found I made sure that cp210x driver is already installed in my Ubuntu version.
|
|
|
Post by Lake Shore Ryan on Sept 10, 2024 11:19:03 GMT -5
I'm not super comfortable with Linux support, and I don't know if this is the source of the trouble, but it looks like some of our USB identifiers are out of date or wrong in the cp210x Linux driver. Specifically, the Model 372 is missing. There is instead a Model 371, which was a placeholder for an instrument that was never released . You can see from your response: [75470.209549] usb 1-13: New USB device found, idVendor=1fb9, idProduct=0305, bcdDevice= 1.00 This product ID and Vendor ID combo is missing from the driver. Could it be that changing the product ID from 0x0303 to 0x0305 in the cp210x would cause the driver to properly identify the instrument? Apologies if this suggestion doesn't solve the problem, as this is the extent of my knowledge in this area. Please let me know if this was the problem though so I can look into getting that driver updated for the future. github.com/torvalds/linux/blob/master/drivers/usb/serial/cp210x.c
|
|
rk
New Member
Posts: 4
|
Post by rk on Sept 12, 2024 8:03:49 GMT -5
Hi Ryan,
Thank this helped!
In more detail, what helped me, eventually, is the following: 1. Download cp210x.c from kernel.org (we only need the .c file) 2. Download cp210x Linux driver from Silicon Labs (we need the entire folder to build the driver) 3. Replacing cp210x.c file downloaded from Silicon Labs folder (in step 2) with cp210x.c file downloaded from kernel.org (in step 1) 4. In cp210x.c, change the product ID from 0x0303 to 0x0305 in the line with Lakeshore 371 (One can also change ``Lakeshore 371'' to ``Lakeshore 372'')
3. Run ``make'' and follow instructions 4. Before running
insmod /lib/modules/<your kernel version>/kernel/drivers/usb/serial/usbserial.ko One has to go to this folder, rename usbserial.ko to usbserial_legacy.ko and then do:
rmmod usbserial.ko
4. At the end, I got an error ``cp210x.ko: Invalid module format'' 5. What helped is just reinstalling the kernel
sudo apt install --reinstall linux-image-generic linux-headers-generic and repeat the installation from step 3 again.
|
|