Talking to the SDS1204X-E over USB from a Mac

/ SigScope siglent usbtmc scpi qt libusb

Siglent doesn’t ship a Mac app for the SDS1204X-E and the Windows one isn’t much anyway. The scope has a USB device port that enumerates as USBTMC, so I wanted to see how far libusb alone would get me before committing to a real app.

What I tried

Plugged it in. macOS has no USBTMC driver, which turns out to be the good case: nothing grabs the interface, libusb claims it from user space, no kext. VID 0xF4EC, PID 0xEE38.

First attempt with python-usbtmc died on the first control transfer. pyvisa-py got *IDN? back. Then I wrote my own 80-line USBTMC framing in pyusb because pyvisa-py kept hanging on waveform reads, and that harness became the reference for the C++ transport later.

The command set is the old LeCroy-style short form, not the :TIMebase:SCALe tree. C1:VDIV 1.3V, TDIV 50NS, TRSE EDGE,SR,C1,HT,OFF. CHDR OFF first or every reply comes back with a header and units glued on.

What I measured

The volts formula checked out against the scope’s own measurement to the last digit: code × VDIV / 25 − OFST, 25 codes per division. Rising edge landed on sample 3500 of 7000, so the trigger point is dead center.

What broke or surprised me

Next

The app shell works: live 4-channel plot, run/stop/single/force, edge trigger panel, V/div and time/div, screenshot to the Desktop with Ctrl+S, and it follows the scope’s physical knobs within about a second by polling. It looks like a Qt example though. Next is making it look and work like the actual front panel.

The scope's own screen, pulled over USB with SCDP. 768 KB BMP in 1.3 s.
The scope’s own screen, pulled over USB with SCDP. 768 KB BMP in 1.3 s.