Skip to content
Native Python library for accessing USBTMC test equipment (DEPRECATED see pyoscope)
Branch: master
Clone or download
Pull request Compare This branch is 45 commits ahead of cibomahto:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


NOTE:  I no longer use this code.  The functionality has been duplicated in a new module found at

PyUSBtmc is a simple library for interacting with test equipment (primarily Rigol oscilloscopes).

It was conceived of by Matt Mets in 2010, and is distributed under the MIT License. See LICENSE for a copy of this license.

The PyUSBtmc project is in no way affiliated with Rigol Technologies Inc.

PyUSBtmc interacts with USBtmc compliant instruments through the linux kernel's usbtmc character device driver.  The first USBtmc device is automatically mapped by the linux kernel to /dev/usbtmc0 which may be interacted with in the usual unix way.  For example:
echo "*IDN?" > /dev/usbtmc0; cat /dev/usbtmc0
will send the standard IEEE command for the device to identify itself.

Project Home:

python 2.6 or later
linux kernel 2.6.36 or later

Setup USB permissions for udev
echo 'ACTION=="add", BUS=="usb", SYSFS{idVendor}=="1ab1", SYSFS{idProduct}=="0588", GROUP:="adm"' > tmpfile
sudo chown root:root tmpfile
sudo mv tmpfile /etc/udev/rules.d/10-rigol.rules
sudo udevadm control --reload-rules

On my DS1102E the WAVE:POINT:MODE options seem to have no effect.  Maybe the firmware is out of date.

udev can add more symlinks with SYMLINK+="usbtmc-newname"

new udev rules
ACTION=="add", BUS=="usb", SYSFS{idVendor}=="164e", SYSFS{idProduct}=="0fa2", GROUP:="adm", SYMLINK+="usbtmc-bnc645"
ACTION=="add", BUS=="usb", SYSFS{idVendor}=="1ab1", SYSFS{idProduct}=="0588", GROUP:="adm", SYMLINK+="usbtmc-rigol"

You can’t perform that action at this time.