Unable to detect USB device in NI VISA on Ubuntu

Updated Aug 26, 2025

Reported In

Driver

  • NI-VISA

Issue Details

I have USB instrument which works fine on Windows and Linux RT environment with NI VISA driver.

This time I want to use my USB device on Ubuntu environment. But the device is not automatically detected. And when I tried to add the device manually there is no option available for USB device. What I can do for troubleshooting of this situation ?

Solution

The reason of the inability of NI VISA to detect USB devices may be due to the Linux kernel driver usbtmc, which has bound and claimed USB devices.

To enable NI VISA to detect and claim devices, it is necessary to unbind them from the usbtmc driv

The following commands can be used to blacklist the usbtmc and usbtest kernel modules, effectively unbinding them:

echo blacklist usbtmc >> /etc/modprobe.d/blacklist.conf
echo blacklist usbtest >> /etc/modprobe.d/blacklist.conf

Note that:

・These commands append the kernel modules usbtmc and usbtest to the blacklist configuration file located at /etc/modprobe.d/blacklist.conf.

・Blacklisting prevents these modules from being automatically loaded by the kernel during device detection.

・It is recommended to reboot the system after executing these commands to ensure the changes take effect.

 

After the Ubuntu system successfully detects USB device, it may happen that the devices are only detected when the user logs in with root administrative privileges.

By default normal user should be able to access the devices but this may happen because of an issue with NI VISA installer, as it cannot locate the path `/sbin/udevadm` on Ubuntu. As a result, the step to change USB TMC permissions is skipped.

By executing the following command you can verify whether the path `/sbin/udevadm` exists on Ubuntu machine.

ls -l /sbin/udevadm

If the path does not exist, execute the following commands:

ln -s $(which udevadm) /sbin/udevadm
# Rerun the step to change USB TMC permissions
/var/lib/dpkg/info/ni-visa-passport-usb.postinst

After completing the above steps, reboot the machine.