DSRemote

DSRemote is a program to control and visualize your Rigol® DS6000 or DS1000Z series oscilloscope from
your Linux desktop via USB or LAN. It will probably work as well with the other series like DS2000A and DS4000 series but
I have no access to all those oscilloscopes so I can not test it. I tried to mimic the interface of the DS6000 series.
It's a work in progress but the basic controls are working. Live signals can be viewed, screenshots can
be made and waveform data can be saved. There's no manual yet, but it's pretty straight forward.


Version

Latest version: 0.35_1906241731 June 24, 2019

How to compile

- Install Git, the GCC compiler and the Qt4 development package:
Linux Mint 18: sudo apt-get install git-core libqt4-dev libqt4-core g++
openSuse Leap 42.2: sudo zypper in git-core libqt4-devel
Fedora 25: sudo dnf install git-core qt-devel gcc-c++
Ubuntu 18.04: sudo apt-get install g++ make git-core qtbase5-dev-tools qtbase5-dev qt5-default

- Download the source code:
mkdir DSRemote_git
cd DSRemote_git
git init
git pull https://gitlab.com/Teuniz/DSRemote

- Create the makefile:
Linux Mint 18: qmake
openSuse Leap 42.2: qmake
Fedora 25: qmake-qt4
Ubuntu: qmake

- Compile the source code and install it:
make -j16
sudo make install

Now you can run the program by typing: dsremote

Note: Make sure you are using the latest firmware which is 00.04.04.SP3 at the time of this writing.
Older firmware versions can cause connection problems!
Check here for the latest firmware: http://int.rigol.com/Support/SoftDownload/3

LAN connection

Just select "LAN" in the settings menu and enter the IP-address of the oscilloscope.
Click on the apply button.
In the "Device" menu, select "Connect".

USB connection

Just select "USB" in the settings menu and select the device (usually: /dev/usbtmc0).
Click on the apply button.
In the "Device" menu, select "Connect".

Note: The DS1054Z is plug and play with a recent kernelversion.
You probably have to add yourself to the group "usbtmc" before you can access the device.
Here's how you do that:

The "make install" command creates a new udev rule /etc/udev/rules.d/30-usbtmc.rules.
Some systems require a reboot before the new udev rules takes into effect.
After rebooting, plugin your scope and switch it on. Wait till it has finished booting.
Now, check the groupname of the device, enter:


 ls -l /dev/usbtmc*

In case it is root, enter the command:


 sudo groupadd usbtmc

Now, add yourself to the group:


 sudo usermod -a -G usbtmc <username>

A reboot is required. After that, the gid of /dev/usbtmc0 should be set to "usbtmc" and
you are ready to use your scope via USB.

Connection problems

When DSRemote is connected to your scope, do not operate the scope directly on the frontpanel of the scope!
It will put the scope in a state of which DSRemote is not aware of with unpredictable results.

DSRemote assumes that, on your DS1054Z, all options are installed.
If that is not the case it's possible that the software does not work correctly.
On your scope, go to the menu Utility -> Options -> Installed and make sure you have the following options installed:

"DECODER RS232,I2C,SPI Official"
"MEM_DEPTH 24M/12M/6M Official"
"TRIGGER Timeout,Runt,Window,Delay,Setup,NthEdge,RS232,I2C,SPI Official"
"RECORDER Record/Re-play Official"
"BANDWIDTH 100M Official"

USB connection problems

Unfortunately, there's a bug in the firmware of the scope that causes connection problems
when your computer uses an xHCI host controller (USBv3.x).
Computers with an EHCI host controller (USBv2) will work fine.
Rigol has been informed about this firmware bug. They acknowledged the bug and said
they have no plans to fix it. Thank you Rigol!
So, if DSRemote generates the error message "Can not read from device", check the following.
Open a terminal and enter


 echo "*IDN?" > /dev/usbtmc0; cat /dev/usbtmc0

If it response like this:


 RIGOL TECHNOLOGIES,DS1104Z,DS1ZA17040xxxx,00.04.04.SP3
 cat: /dev/usbtmc0: Connection timed out

the connection is ok. If not, there's a problem. Check the following:


 dmesg | grep -i xhci | less

This will show you if your computer has an xhci host controller.


 dmesg | grep -i ehci | less

This will show you if your computer has an ehci host controller.
Some computers have both. In that case use an USBv2 port, not an USBv3.x port (blue).

p.s.: not all xHCI host controllers causes connection problems. It depends on the brand and
model of the chip on the motherboard of your computer.
The cause is that Rigol presents itself as an USB 2.0 High Speed device but it uses a packetsize
of 64 bytes. The USB 2.0 protocol specification dictates that highspeed connections MUST use a
packetsize of 512 bytes. Now, some USB host controller chips are "forgiving" and accept the smaller
packetsize. Some USB host controllers are less forgiving and don't accept the too small packets.
You can see the packetsize protocol violation of Rigol when you type dmesg in a terminal after you
connected the scope:


 usb 3-2: new high-speed USB device number 4 using ehci-pci
 usb 3-2: config 1 interface 0 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 64
 usb 3-2: config 1 interface 0 altsetting 0 bulk endpoint 0x3 has invalid maxpacket 64
 usb 3-2: New USB device found, idVendor=1ab1, idProduct=04ce
 usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 usb 3-2: Product: DS1000Z Series
 usb 3-2: Manufacturer: Rigol Technologies.
 usb 3-2: SerialNumber: DS1ZA17040xxxx
 usbcore: registered new interface driver usbtmc


Viewing downloaded waveform data

Here you can download a viewer to open the downloaded waveform data from the oscilloscope: EDFbrowser
The waveform data files can also be opened in Scilab or Octave


Keywords: Rigol DS1000Z DS1054Z DS1074Z DS1104Z DS6000 DS6062 DS6064 DS6102 DS6104 Remote control software