Sigrok and Pulseview in Ubuntu 14.04 with UNI-T UT61E Digital Multimeter

A couple of months ago, I received a new digital multimeter UNI-T UT61E that can send data to a computer via a serial cable, and allows you draw some nice charts. I’ve already done that in Windows 7 with the provided tools, and reported on the power consumption of some Chinese Android TV boxes. However, since I use Ubuntu 14.04 as my main operating system, Linux based tools would be more convenient, and open source sigrok-cli command line client and its graphical interface pulseview are supposed to support UT61E DMM, so I had to give it a try.

A Quick Look at UNI-T UT61 Digital Multimeter

Before going into Sigrok, I’ll quickly show what the multimeter received from DealExtreme . It took longer than expected to ship because of of  included 9V battery, and at the first shipping attempt it was returned to DX, but after 8 weeks or so, I finally received the package.
UNI-T_UT61E_Package
The multimeter came with test leads, an adapter for transistor and capacitor, D02 serial cable to connect between the multimeter and the serial port of your PC, and an operating manual in English. Most sellers don’t include the required 9V PP3, but DX did. It seemed more convenient at the time of purchased, but as mentioned above custom issues completely ruined this little convenience.

UNI-T UT61E Digital Multitmeter with Cables, Adapter, and User's Manual (Click to Enlarge)
UNI-T UT61E Digital Multitmeter with Cables, Adapter, and User’s Manual (Click to Enlarge)

I had read review saying test leads where pretty poor, so I performed a continuity test, and the results were pretty bad, so I asked a partial refund from DX to buy another pair of test leads which are much better.

Linux issues with CH340/CH341 USB to Serial Adapters

DB9 serial connector are a thing of the past in most computers and laptops, so I had to use that RS232 to Serial USB adapter between UNI-T D02 cable and a USB port of my computer. I’ve been using with Wandboard and SABRE Lite boards a few time without any issues, but when I started run sigrok-cli, I got some error messages:


So I mentioned the issue to Sigrok developers, who could not reproduce the issue. But then I shared some details about the adapter:


And HL-340 USB-Serial adapter are known not to work properly. Why is that? While in most case you’d use some baud rate with 8N1 (8-bit / no parity / 1-stop bit), UNI-T multimeters are using 19200 7O1 connection (with odd parity), and so far the parity bit is simply ignored in ch341.ko driver, so my PC would just receive incorrect data.

Luckily there’s now a patch, and I’ve shown how to build the driver for Ubuntu 14.04 with Linux kernel 3.18, and that part is working fine.

Sigrok-cli Command Line

Installing sigrok-cli command is very easy as sigrok is part of Ubuntu 14.04 package repositories:


At first, you may want to check the vesion as it will also list supported drivers, and available options:


The libraries version are still 0.2.0, while the latest release is 0.3.0. So I tried to build sigrok-cli 0.5.0 from github instead with 0.3.0 version libs (more on that later), but it failed to scan my DMM, so I kept using the version packaged for Ubuntu 14.04.

The good news is that the client can detect UT61e:


and even better I could capture a few samples


If you want to capture more, simply changed the samples value, or use “continuous” instead.

But if you want to draw a chart in a spreadsheet, or other software the analog output is not really suitable. Fortunately sigrok-cli support multiple output formats with csv (comma-separated values), gnuplot, or its own default format that can be loaded in pulseview GUI. In theory, you could capture 10 sample in csv format and load the resulting file into a spreadsheet with the following command.


But in my case, all formats others than Analog failed, and all I got was empty files.

Pulseview in Ubuntu 14.04

Contrary to sigrok, pulseview graphical user interface is not part of Ubuntu 14.04 packages, and can only be found in Ubuntu Utopic (14.10) or Vidid (15.04):


I completely forgot to look for PPA before I built from source, and there’s already pulseview & sigrok packages for Ubuntu 13.10 and 14.04, so that would make it much easier. Instead I decided to build, as I though it should probably straightforward, but it turned out there are quite a few dependencies, and libraries to buid, and that’s the steps I had to follow in Ubuntu 14.04:

  1. Install dependencies

    sudo apt-get install build-essential cmake git autoconf-archive qt4-dev-tools libboost-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-test-dev libglibmm-2.4-dev doxygen python-gobject-dev swig clang python-numpy

  2. Retrieve libsigrok source code:
  3. Since autoconf-archive packahe is too old, you’ll need to manually download ax_cxx_compile_stdcxx_11.m4, copy it in a directory (e.g. m4), before completing the build:

    at this stage make sure the configure ends with C++ and Python bindings enabled

    Please note that I had some issues at first during make due to doxygen generating duplicate enums, but I was finally able to compile and install libsigrok:
  4. Now do the same with libsigrokdecode:
  5. And pulseview:
  6. You can now run pulseview, and for some reasons (installation prefix of libsogrok?) I also add to define LD_LIBRARY_PATH:
PulseView with Demo Device (Click to Enlarge)
Pulseview Demo Device (Click to Enlarge)

By default Pulseview will “connect” to a demo device emulating a logic analyzer. You can then click on Run and see a few signals as shown in the screenshot above. But obviously it’s more interesting to play with a real device like UT61E multimeter.

Pulseview_Ubuntu_14.04So you can go to the top menu to select File->Connect to Device to select your instrument. It seems I was out of luck again, as UNI-T drivers are not listed at all, despite being shown in the “About” section. I have not been able to investigate the reason, but if you have one of the device above it should work.

PulseView and Sigrok can also automatically decode signals like CAN, I2C, UART, USB, S/PDIF, and so on, which would be most interesting for logic analyzers.

So Pulseview and Sigrok look quite promising on paper, but the combination Ubuntu 14.04 + UNI-T UT61E multimeter + HL-340 USB to serial adapter made it quite challenging to setup, and mostly unusable after installation. I’ve also tried it in the development version of Ubuntu 15.04 with Linux 3.19, and both sigrok and pulseview install easily, but I would have to re-build ch341 driver again, which I’m too lazy to do for now. Maybe I’ll give it another try lateron.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

15 Replies to “Sigrok and Pulseview in Ubuntu 14.04 with UNI-T UT61E Digital Multimeter”

  1. I bought the same multimeter, will try to make it work with sigrok. Do you have any idea why the Digital mode failed with sigrok?

  2. That’s the output I get with logging enabled:

    sigrok-cli –driver=uni-t-ut61e-ser:conn=/dev/ttyUSB0 –samples 2 -O csv -l 5
    sr: libsigrok loglevel set to 5.
    sr: Sanity-checking all drivers.
    sr: Sanity-checking all input modules.
    sr: Sanity-checking all output modules.
    srd: libsigrokdecode loglevel set to 5.
    sr: hwdriver: Initializing driver ‘uni-t-ut61e-ser’.
    sr: serial-dmm: Selected ‘uni-t-ut61e-ser’ subdriver.
    sr: serial: Opening serial port ‘/dev/ttyUSB0’ (flags 5).
    sr: serial: Opened serial port ‘/dev/ttyUSB0’ (fd 11).
    sr: serial: Parsing parameters from “19200/7o1/rts=0/dtr=1”.
    sr: serial: Setting serial parameters on port /dev/ttyUSB0 (fd 11).
    sr: serial: Configuring output baudrate to 19200 (14).
    sr: serial: Configuring input baudrate to 19200 (14).
    sr: serial: Configuring 7 data bits.
    sr: serial: Configuring 1 stop bits.
    sr: serial: Configuring no flow control.
    sr: serial: Configuring odd parity.
    sr: serial: Setting RTS low.
    sr: serial: Setting DTR high.
    sr: serial-dmm: Probing serial port /dev/ttyUSB0.
    sr: serial: Flushing serial port /dev/ttyUSB0 (fd 11).
    sr: serial: Detecting packets on FD 11 (timeout = 1000ms, baudrate = 19200).
    sr: serial: Found valid 14-byte packet after 310ms.
    sr: serial-dmm: Found device on port /dev/ttyUSB0.
    sr: serial: Closing serial port /dev/ttyUSB0 (fd 11).
    sr: hwdriver: Scan of ‘uni-t-ut61e-ser’ found 1 devices.
    sr: serial: Opening serial port ‘/dev/ttyUSB0’ (flags 5).
    sr: serial: Opened serial port ‘/dev/ttyUSB0’ (fd 11).
    sr: serial: Parsing parameters from “19200/7o1/rts=0/dtr=1”.
    sr: serial: Setting serial parameters on port /dev/ttyUSB0 (fd 11).
    sr: serial: Configuring output baudrate to 19200 (14).
    sr: serial: Configuring input baudrate to 19200 (14).
    sr: serial: Configuring 7 data bits.
    sr: serial: Configuring 1 stop bits.
    sr: serial: Configuring no flow control.
    sr: serial: Configuring odd parity.
    sr: serial: Setting RTS low.
    sr: serial: Setting DTR high.
    sr: serial-dmm: Setting sample limit to 2.
    sr: session: Starting.
    sr: serial-dmm: Starting acquisition.
    sr: serial-dmm: Sending SR_DF_HEADER packet.
    sr: session: bus: Received SR_DF_HEADER packet.
    cli: Received SR_DF_HEADER
    sr: session: Running.
    sr: es51922: Packet doesn’t end with \r\n.
    sr: serial-dmm: DMM packet: 30 30 30 30 31 32 33 30 30 30 32 30 0d 0a
    sr: es51922: The display value is 12.000000.
    sr: es51922: Applying factor 0.010000, new value is 0.120000.
    sr: session: bus: Received SR_DF_ANALOG packet (1 samples).
    cli: received SR_DF_ANALOG, 1 samples
    sr: serial-dmm: DMM packet: 30 30 30 30 31 32 33 30 30 30 32 30 0d 0a
    sr: es51922: The display value is 12.000000.
    sr: es51922: Applying factor 0.010000, new value is 0.120000.
    sr: session: bus: Received SR_DF_ANALOG packet (1 samples).
    cli: received SR_DF_ANALOG, 1 samples
    sr: serial-dmm: Requested number of samples reached.
    sr: serial-dmm: Stopping acquisition.
    sr: serial: Closing serial port /dev/ttyUSB0 (fd 11).
    sr: serial-dmm: Sending SR_DF_END packet.
    sr: session: bus: Received SR_DF_END packet.
    cli: Received SR_DF_END
    sr: output/csv: event: SR_DF_END event

    The version in Ubuntu 14.04 is not the latest one, so maybe it’s why it does not work.

  3. @cnxsoft
    Have you tried with more recent package version via the PPA? I will try to give it a shot, as i have pl2303 12v adaptors, and sabayon/gentoo with the latest (even head of the git) versions.

  4. @cnxsoft
    I’ve installed the PPA version in Ubuntu 14.04, after removing the old version:
    sudo apt-add-repository ppa:jorik-kippendief/sigrok
    sudo apt-get update
    sudo apt-get install sigrok-cli

    But it won’t even be able to scan the multimeter, as the connection times out:
    sigrok-cli –driver=uni-t-ut61e-ser:conn=/dev/ttyUSB0 –scan -l 5
    sr: libsigrok loglevel set to 5.
    sr: backend: Sanity-checking all drivers.
    sr: backend: Sanity-checking all input modules.
    sr: backend: Sanity-checking all output modules.
    sr: backend: Sanity-checking all transform modules.
    srd: libsigrokdecode loglevel set to 5.
    sr: hwdriver: Initializing driver ‘uni-t-ut61e-ser’.
    sr: serial: Opening serial port ‘/dev/ttyUSB0’ (flags 1).
    sr: serial: Parsing parameters from “19200/7o1/rts=0/dtr=1”.
    sr: serial: Setting serial parameters on port /dev/ttyUSB0.
    sr: serial-dmm: Probing serial port /dev/ttyUSB0.
    sr: serial: Flushing serial port /dev/ttyUSB0.
    sr: serial: Detecting packets on /dev/ttyUSB0 (timeout = 3000ms, baudrate = 19200).
    sr: serial: Detection timed out after 3000ms.
    sr: serial: Didn’t find a valid packet (read 0 bytes).
    sr: serial: Closing serial port /dev/ttyUSB0.
    sr: hwdriver: Scan of ‘uni-t-ut61e-ser’ found 0 devices.

  5. Very nice
    Any chance of reviewing some oscilloscopes ?
    Could do with replacing my HP52504 with something a lot smaller and quieter.

  6. Pulseview is not supporting DMM yet so that’s why UNI-T UT61E was not listed:

    Please see README.devices in the libsigrok repository. For UNI-T DMMs
    you need to specify the correct cable and/or serial port in sigrok-cli.

    PulseView doesn’t support DMMs yet, so for now you can use sigrok-cli
    only. There’s also sigrok-meter which is a PyQt-based GUI for DMMs and
    other slowly-updating meters, but that’s in alpha-stage at the moment
    and needs more work (also doesn’t show graphs, yet).

  7. The analog only support on sigrok-cli is normal too, as other methods have not been implemented yet for analog data:

    > sigrok-cli 0.4.0 works fine, but only with -O analog, other output formats
    > (csv, binary, etc..) result in empty output, and ascii will crash.

    That’s “normal” for now, we currently only have “-O analog” as output
    format for analag data at the moment. Currently VCD, CSV, and so on only
    support logic data (0/1 from logic analyzers); the modules are currently
    being amended to also support analog data…

  8. Sigrok doesn’t capture the usb signal (not the rs232 link) out-of-the box from a ut-61c with ubuntu 16.04 on a lenovo x220.

    Eval this script after the plug in the usb-link allows sigrok to get data :

  9. Mine was shipped with a normal serial cable so ttyS0 worked for me. Also add your user to the dialout group so that you can have access to the serial port

Leave a Reply

Your email address will not be published. Required fields are marked *

Boardcon Rockchip and Allwinner SoM and SBC products
Boardcon Rockchip and Allwinner SoM and SBC products