03-19-2024 04:02 PM
I have an Amrel eLoad connected to a GPIB-USB-HS adapter. The device shows up under pyvisa on my Windows laptop but it does not show up on my Ubuntu 22.04.4 laptop. Here are the steps I have performed:
1. Fresh install of Ubuntu 22.04.4
2. Install PyCharm Community Edition from the Ubuntu UI
3. Download NILinux2024Q1DeviceDrivers
4. Install ni-ubuntu2004-drivers-stream.deb
5. Install ni-visa, ni-488
*****************
$ apt list --installed | grep ni-visa
ni-visa-config/unknown,now 24.0.0.49402-0+f250 amd64 [installed,automatic]
ni-visa-ddw/unknown,now 24.0.0.49402-0+f250 amd64 [installed,automatic]
ni-visa-devel/unknown,unknown,now 24.0.0.49400-0+f248 all [installed,automatic]
ni-visa-doc/unknown,unknown,now 24.0.0.49402-0+f250 all [installed,automatic]
ni-visa-errors/unknown,unknown,now 24.0.0.49402-0+f250 all [installed,automatic]
ni-visa-headers/unknown,unknown,now 24.0.0.49402-0+f250 all [installed,automatic]
ni-visa-interactive-control/unknown,now 24.0.0.49407-0+f255 amd64 [installed,automatic]
ni-visa-labview-io-control/unknown,now 24.0.0.49402-0+f250 amd64 [installed,automatic]
ni-visa-labview-rc/unknown,unknown,now 24.0.0.49402-0+f250 all [installed,automatic]
ni-visa-lxi-discovery/unknown,now 24.0.0.49402-0+f250 amd64 [installed,automatic]
ni-visa-passport-enet-serial/unknown,now 24.0.0.49402-0+f250 amd64 [installed,automatic]
ni-visa-passport-enet/unknown,now 24.0.0.49402-0+f250 amd64 [installed,automatic]
ni-visa-passport-gpib/unknown,now 24.0.0.49402-0+f250 amd64 [installed,automatic]
ni-visa-passport-pxi-dkms/unknown,now 24.0.0.49403-0+f251 amd64 [installed,automatic]
ni-visa-passport-pxi/unknown,now 24.0.0.49403-0+f251 amd64 [installed,automatic]
ni-visa-passport-remote/unknown,now 24.0.0.49402-0+f250 amd64 [installed,automatic]
ni-visa-passport-serial/unknown,now 24.0.0.49402-0+f250 amd64 [installed,automatic]
ni-visa-passport-usb/unknown,now 24.0.0.49402-0+f250 amd64 [installed,automatic]
ni-visa-runtime/unknown,unknown,now 24.0.0.49400-0+f248 all [installed,automatic]
ni-visa-server/unknown,now 24.0.0.49402-0+f250 amd64 [installed,automatic]
ni-visa-sysapi/unknown,now 24.0.0.49402-0+f250 amd64 [installed,automatic]
ni-visa/unknown,unknown,now 24.0.0.49405-0+f253 all [installed]
$
$ apt list --installed | grep ni-488
ni-488.2-config/unknown,now 23.5.0.49254-0+f102 amd64 [installed,automatic]
ni-488.2-dkms/unknown,now 23.5.0.49254-0+f102 amd64 [installed,automatic]
ni-488.2-documentation/unknown,unknown,now 23.5.0.49246-0+f94 all [installed,automatic]
ni-488.2-errors/unknown,unknown,now 23.5.0.49254-0+f102 all [installed,automatic]
ni-488.2-gpibenumsvc/unknown,now 23.5.0.49254-0+f102 amd64 [installed,automatic]
ni-488.2-gpibexplorer/unknown,now 23.5.0.49254-0+f102 amd64 [installed,automatic]
ni-488.2-gpibintctrl/unknown,now 23.5.0.49254-0+f102 amd64 [installed,automatic]
ni-488.2-gpibtroubleshooting/unknown,now 23.5.0.49254-0+f102 amd64 [installed,automatic]
ni-488.2-iotrace-support/unknown,unknown,now 23.5.0.49254-0+f102 all [installed,automatic]
ni-488.2-runtime/unknown,unknown,now 23.5.0.49254-0+f102 all [installed,automatic]
ni-488.2-sysapi-support/unknown,now 23.5.0.49254-0+f102 amd64 [installed,automatic]
ni-488.2-utils/unknown,unknown,now 23.5.0.49254-0+f102 all [installed,automatic]
ni-488.2/unknown,unknown,now 23.5.0.49246-0+f94 all [installed]
********************
6. Install libusb
***********************
$ apt list --installed | grep libusb
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libusb-1.0-0-dev/jammy-updates,now 2:1.0.25-1ubuntu2 amd64 [installed]
libusb-1.0-0/jammy-updates,now 2:1.0.25-1ubuntu2 amd64 [installed,automatic]
libusb-1.0-doc/jammy-updates,jammy-updates,now 2:1.0.25-1ubuntu2 all [installed,automatic]
libusbmuxd6/jammy,now 2.0.2-3build2 amd64 [installed,automatic]
***********************
7. Create rule for usb subsystem to usbusers group
************
$ sudo su
$ echo 'SUBSYSTEM=="usb", MODE="0666", GROUP="usbusers"' >> /etc/udev/rules.d/99-com.rules
************
8. Install python pyvisa, pyvisa-py, pyusb
******************
$ pyvisa-info
Machine Details:
Platform ID: Linux-6.5.0-26-generic-x86_64-with-glibc2.35
Processor: x86_64
Python:
Implementation: CPython
Executable: /home/pwrtest/PycharmProjects/test/.venv/bin/python
Version: 3.10.12
Compiler: GCC 11.4.0
Architecture: ('x86', 64)
Build: Nov 20 2023 15:14:05 (#main)
Unicode: UCS4
PyVISA Version: 1.14.1
Backends:
ivi:
Version: 1.14.1 (bundled with PyVISA)
#1: /usr/lib/x86_64-linux-gnu/libvisa.so.24.0.0:
found by: auto
architecture:
('x86', 64)
Vendor: National Instruments
Impl. Version: 25165824
Spec. Version: 7340032
py:
Version: 0.7.2
USB INSTR: Available via PyUSB (1.2.1). Backend: libusb1
USB RAW: Available via PyUSB (1.2.1). Backend: libusb1
TCPIP INSTR: Available
Resource discovery:
- VXI-11: partial (psutil not installed)
- hislip: disabled (zeroconf not installed)
TCPIP SOCKET: Available
ASRL INSTR:
Please install PySerial (>=3.0) to use this resource type.
No module named 'serial'
VICP INSTR:
Please install PyVICP to use this resource type.
GPIB INSTR:
Please install linux-gpib (Linux) or gpib-ctypes (Windows, Linux) to use this resource type. Note that installing gpib-ctypes will give you access to a broader range of functionalities.
No module named 'gpib'
GPIB INTFC:
Please install linux-gpib (Linux) or gpib-ctypes (Windows, Linux) to use this resource type. Note that installing gpib-ctypes will give you access to a broader range of functionalities.
No module named 'gpib'
*******************
9. Plug in the usb cable. The "Ready" light turns orange, the "Active" light is not lit. lsusb shows the device:
**********
$ lsusb | grep GPIB
Bus 003 Device 002: ID 3923:709b National Instruments Corp. GPIB-USB-HS
**********
10. pyvisa with IVI NI backend does not show the device:
***********************************
import pyvisa
rm = pyvisa.ResourceManager()
rm.list_resources()
('ASRL1::INSTR', 'ASRL2::INSTR', 'ASRL3::INSTR', 'ASRL4::INSTR', 'ASRL5::INSTR', 'ASRL6::INSTR', 'ASRL7::INSTR', 'ASRL8::INSTR', 'ASRL9::INSTR', 'ASRL10::INSTR', 'ASRL11::INSTR', 'ASRL12::INSTR', 'ASRL13::INSTR', 'ASRL14::INSTR', 'ASRL15::INSTR', 'ASRL16::INSTR', 'ASRL17::INSTR', 'ASRL18::INSTR', 'ASRL19::INSTR', 'ASRL20::INSTR', 'ASRL21::INSTR', 'ASRL22::INSTR', 'ASRL23::INSTR', 'ASRL24::INSTR', 'ASRL25::INSTR', 'ASRL26::INSTR', 'ASRL27::INSTR', 'ASRL28::INSTR', 'ASRL29::INSTR', 'ASRL30::INSTR', 'ASRL31::INSTR', 'ASRL32::INSTR')
***********************************
05-24-2024 05:44 PM
I ran exactly the same problem with "GPIB-USB-HS".
On NI's website, updated on 2024-02-21,
https://www.ni.com/docs/en-US/bundle/ni-platform-on-linux-desktop/page/supported-distributions.html
it says that it supports Ubuntu
Distribution | Forked from |
---|---|
Ubuntu | Debian |
Then, in the link to the installation in Ubuntu,
the first step is
sudo apt update
sudo apt dist-upgrade
I read somewhere someone mentioned that "don't do the first step". Now, my kernel version is 6.5.0.
Today, I called the tech support at NI. I was told that their internal memo said that the NI-488.2 was only tested with kernel version 5.19. It would not be surprised that the NI Hardware Configuration Utility says that "GPIB-USB-HS" is a "unsupported hardware" for kernel version 6.5.