You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got python-usbtmc working yesterday, and was having a good time connecting to my Keysight Ocilloscope, running IDN queries, etc. All from my Raspberry Pi 3B+. I followed everything in the readme file, except the optional Kernel bit. But this morning, it's not working!
The output from lsusb:
pi@raspberrypi:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 04d9:0007 Holtek Semiconductor, Inc.
Bus 001 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 023: ID 0957:0588 Agilent Technologies, Inc.
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The Pi was left on overnight, too - so nothing should have restarted, etc. The USB device was disconnected and reconnected in the morning. I didn't change anything, other than I probably re-started Python.
I've gone back through the readme (again, not the optional part) and I'm just not getting anywhere. When plugged in, the device is added to /dev/usbtmc0. Using ls -all, I get:
pi@raspberrypi:/dev $ ls -all | grep usbtmc*
crw------- 1 root root 180, 176 Jun 11 14:13 usbtmc0
Which doesn't look right to me. I've done some udevadm debugging to try and highlight an issue, and I'm seeing this line, which looks wrong, as I'd expect the mode to be picked up from my usbtmc.rules file:
I couldn't get this to work using any variation of SUBSYSTEM=="usb" alone. This worked for me:
echo'KERNEL=="usbtmc*", MODE="0660", GROUP="plugdev"'| sudo tee -a /etc/udev/rules.d/10-usbtmc.rules
echo'SUBSYSTEM=="usb", MODE="0660", GROUP="plugdev"'| sudo tee -a /etc/udev/rules.d/00-usb-permissions.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
And ensuring the user was a member of the "plugdev" group (they are by default on the Ubuntu I'm using).
I believe this grants permission for all usbtmc devices regardless of vendor ID and product ID, that's fine for me - but you might wanna specify them if you want to restrict it to only one devuce. I didn't test if that works.
Hello,
I got python-usbtmc working yesterday, and was having a good time connecting to my Keysight Ocilloscope, running IDN queries, etc. All from my Raspberry Pi 3B+. I followed everything in the readme file, except the optional Kernel bit. But this morning, it's not working!
The output from lsusb:
My usbtmc.rules file:
My Python3 code:
However, this morning the exact same code is returning:
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)
The Pi was left on overnight, too - so nothing should have restarted, etc. The USB device was disconnected and reconnected in the morning. I didn't change anything, other than I probably re-started Python.
I've gone back through the readme (again, not the optional part) and I'm just not getting anywhere. When plugged in, the device is added to
/dev/usbtmc0
. Usingls -all
, I get:Which doesn't look right to me. I've done some udevadm debugging to try and highlight an issue, and I'm seeing this line, which looks wrong, as I'd expect the mode to be picked up from my usbtmc.rules file:
usbtmc0: Handling device node '/dev/usbtmc0', devnum=c180:176, mode=0600, uid=0, gid=0
Does anyone have any thoughts?
The text was updated successfully, but these errors were encountered: