Program for controll of UNI-T DSO

This program can do some simple tasks with UNI-T digital storage oscilloscope. It was tested with UNI-T UT2062C DSO. It is replacement for original software, which can’t run on Linux.

DSO screenshot

Drawing by program

Program window - QT4 version

SimpleDSO - DSO screen

Program is developed for controll of digital storage oscilloscope from UNI-T company.
Here are three versions:

QT3 version is obsolete. QT4 version is partly finished, but functional.

Comments (31)

  1. 13:24, 2010/05/29kounst  / Reply

    hi, your software works fine with ut2042 too! great work!

    Are you planning on implementing a way to export the raw data from the dso to for instance a csv file?

    Do you know a way to access the data stored in the .dat files generated by the ut dso. For instance using matlab?

    Regards!

    • 18:16, 2010/05/29ZmaTkar  / Reply

      Hi, simpleDSO can export data to csv. Try it :) But inside csv will be only sampled waveform – one line = one chanel, no info about V/div, coupling, timebase etc.

      And format of .dat files is really simple, it’s described in doc directory, which is part of simpleDSO package.

  2. 10:12, 2010/12/28Kai Brossi  / Reply

    Hi, i have written a short bash script. Witch converts the LWAVE***.DAT in an ASCII file. But i am not sure if it’s correct.
    May be your are interested. I am trying your software, but i get some errors. (libaries problems)

    • 10:45, 2010/12/28ZmaTkar  / Reply

      Hi, I’m interested, can you send me that script ? Mail is zmatek at centrum.cz.
      By the way, my soft will support loading of lwave.dat in future – structure should be the same as data received via USB, diference is only in length of recorder data. But I have no time to implement it just now.
      My software depends on libusb v 0.1 and you must have pyUSB module installed.
      It doesn’t work with libusb 1.0

  3. 10:47, 2010/12/28ZmaTkar  / Reply

    I moved SimpleDSO to sourceforge look at http://sourceforge.net/projects/simpledso/

  4. 13:08, 2012/06/17Sijmen Grunbauer  / Reply

    Hello no I am no Linux geek. however I do use Linux Mint 12 it would be nice if it can be packeted as a .deb install. i have no idea haw to install a mix of files like that as there are no instructions
    can you please help
    many thanks

    • 20:24, 2012/06/18ZmaTkar  / Reply

      Hello,
      Linux version can be simple installed.
      Just unpack archive, make and make sure, that your system has installed:
      1/ pyQT
      2/ pyusb

      Make sure, that simpleDSO.py has set executable bit and just click on it.

      If it will not run than you have to run simpleDSO.py from console and
      look what it prints to stdout and there you will see where problem is.
      And of course can send me error and I will help you.

  5. 13:12, 2012/07/15Sijmen Grunbauer  / Reply

    Hello ZmaTkar With all due respect we are not all computer geeks
    What seems extremely simple to a programmer looks like talk from the man on mars to most of us. When you compile for windows you probably create a EXE install file, so why not for Linux.
    The season I use Linux Mint is that I hate the corrupt behaver from Microsoft
    To understand the workings in terminal is not my cup of tea, unless I have very exact instructions I can cut and paste, and than still I seem to have failures.
    In order to attract support for Linux it is therefore important to make it as easy or better to install than in Windows. A RMS or DEB would be great
    Further more my scope is a UTD2102L, In Windows it uses a Winchiphead CH372 driver
    this seems deferent from the other models from Uni Trend
    Do you think it will still work?
    I have installed the windows program in Wine 1.4 and it seems all OK
    However there is seems to be no support for USB in Wine
    And if there is then I am to computer illiterate to make it work
    I can tel you that the Winchiphead driver install fails in Wine
    the driver install of the other models seems sucsesfull, no errors

    many thanks
    Sijmen

  6. 06:16, 2012/07/16ZmaTkar  / Reply

    @Sijmen Grunbauer
    Hello Sijmen,
    python scripts are not compiled under Linux because they need not to be.
    Try to get it up and running by following commands:
    sudo apt-get install python-qt python-usb
    After installation is finished, try to run simpleDSO from konsole or another shell under GUI.
    If it will not run, then you can send me what messages simpleDSO wrote to shell window and I will suggest some steps how to get it work.

    Yes Wine lacks support for USB.

    Question about Winchiphead … I do not know if it will work, it should. It depends on protocol which yours DSO uses. If it is the same as other UNI-T DSOs, then it will work.

  7. 13:06, 2012/07/16Sijmen Grunbauer  / Reply

    / Truth is the most valuable thing we \
    | have — so let us economize it. |
    | |
    \ — Mark Twain /
    ——————————
    \
    \ \_\_ _/_/
    \ \__/
    (oo)\_______
    (__)\ )\/\
    ||—-w |
    || ||
    sijmen@sijmen-laptop ~ $ sudo apt-get install python-qt python-usb
    [sudo] password for sijmen:
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Couldn’t find package python-qt
    sijmen@sijmen-laptop ~ $

    Hello ZmaTkar
    this is the result of your explanation
    Also the other question is a EXACT command to install Simple DSO
    I can extract the file but thats where it ends
    Often there is in the tar file a readme with EXACT instructions how to install
    Not so in Simple DSO
    I am sorry if I sound like a old record player but if we ever want to get away from the hated Microsoft. Installing must NOT be in terminal but HAS TO BE GUI, and that means .DEB for Ubuntu, and or RPM for Redhat. Conversion between them is possible.
    I am a yachtsman here in Australia using OpenCpn for navigation
    That program is written for windows and linux as .exe and .deb install files
    Both install very well in gui
    I can not press hard Enoch to point to the issue that most people do not want to get involved in and therefor you have inadvertently minimized your following
    Linux as it is is to difficult to use and learn if installation has to be done via terminal
    I am also aware that there is a attempt by a Chinese company to integrate a windows API in to the Linux kernel and make windows programs run in native Linux. its called Longene
    You can find there site on GOOGLE, it is released under open GPL
    Also have a look at ReactOS also under open GPL and is a complete rewrite of Windows
    Greetings from Australia
    Sijmen Grunbauer

  8. 13:45, 2012/07/16ZmaTkar  / Reply

    @Sijmen Grunbauer
    I understand. I will make a deb package for you with all depencies. I do not know when I will find some time to convert archive file to deb package. I try it make till week ends.

    However if you would like to try to get it work, try this command:
    apt-get install python-qt4 python-usb

    As you wrote, after unpacking, there is some kind of directory structure and there must be file named simpleDSO.py. simplest way to run it is to write down into console command:
    python ./simpleDSO.py

  9. 14:06, 2012/07/16Sijmen Grunbauer  / Reply

    python-qt4 python-usb can and are already installed through package manager. its the installation of simple DSO thats the problem
    When I look for instructions in the readme file this is what i get

    This program is usefull with UNI-T digital storage oscilloscopes UT2XXX or UT3XXX.
    It’s intended to be a replace for original software, which doesn’t work under Linux.

    Requires pyQT4, QT 4, python 2.5, libusb and usb python module.

    If your device is not found, you can add VID and PID to vid_pid.txt file and restart program. VID and PID is in decimal NOT hexa

    This is not near enoch info for the NOT initiated to install SimpleDSO
    I will be looking forward for the simpleDSO.Deb
    Many thanks
    Sijmen Grunbauer

  10. 15:13, 2012/07/16Sijmen Grunbauer  / Reply

    sijmen@sijmen-laptop ~/Desktop/simpleDSO $ ./simpleDSO.py
    DSO remote app is starting …
    DSO remote app started.
    Loaded VID/PIDS are:
    VIDs -> [22102, 22102, 22103]
    PIDs -> [2098, 2098, 2002]
    Error finding device. Exiting.
    Closing
    sijmen@sijmen-laptop ~/Desktop/simpleDSO $
    Hello Zmatkar
    got the program running
    this is the error message i get
    it seems that the driver for the wichiphead is the problem
    i did place the windows winchiphead inf file in libusb but still no results
    Sijmen

  11. 17:13, 2012/07/16ZmaTkar  / Reply

    @Sijmen Grunbauer
    Hello,
    you must have VID and PID of yours DSO, these can be found in output of command:
    lsusb

    Then these values need to be converted to integer value, they are printed as hexa, and written to file vid_pid.txt. This file is located in same folder as simpleDSO.py.

  12. 21:22, 2012/07/16Sijmen Grunbauer  / Reply

    Hello
    This is the output first without and than with the DSO
    sijmen@sijmen-laptop ~ $ lsusb
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 002: ID 046d:c408 Logitech, Inc. Marble Mouse (4-button)
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    sijmen@sijmen-laptop ~ $ lsusb
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 004: ID 4348:5537 WinChipHead 13.56Mhz RFID Card Reader and Writer
    Bus 004 Device 002: ID 046d:c408 Logitech, Inc. Marble Mouse (4-button)
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    sijmen@sijmen-laptop ~ $

  13. 10:07, 2012/07/17ZmaTkar  / Reply

    @Sijmen Grunbauer
    Huh, strange. DSO reported as RFID card reader :) You can try add VID 17224 and PID 21815 to file vid_pid.txt. I can not quess if it will work …

  14. 11:06, 2012/07/17Sijmen Grunbauer  / Reply

    DSO remote app is starting …
    DSO remote app started.
    Exception in reading VID/PID -> list index out of range
    Loaded VID/PIDS are:
    VIDs -> [22102, 17224]
    PIDs -> [2098]
    Error finding device. Exiting.
    Closing
    Segmentation fault

    hello I edited as you wrote
    this is the result
    Sijmen

  15. 11:59, 2012/07/17ZmaTkar  / Reply

    @Sijmen Grunbauer
    You must add both values.

    Write into vid_pid.txt file this line:
    17224,21815

    If it will not work, try swap values.

  16. 13:16, 2012/07/17Sijmen Grunbauer  / Reply

    sijmen@sijmen-laptop ~/Desktop/simpleDSO $ ./simpleDSO.py
    DSO remote app is starting …
    DSO remote app started.
    Exception in reading VID/PID -> list index out of range
    Loaded VID/PIDS are:
    VIDs -> [22102, 17224]
    PIDs -> [2098]
    Error finding device. Exiting.
    Closing
    sijmen@sijmen-laptop ~/Desktop/simpleDSO $
    sijmen@sijmen-laptop ~/Desktop/simpleDSO $ ./simpleDSO.py
    DSO remote app is starting …
    DSO remote app started.
    Exception in reading VID/PID -> invalid literal for int() with base 10: ”
    Loaded VID/PIDS are:
    VIDs -> [22102, 17224]
    PIDs -> [2098, 21815]
    Found UNI-T DSO on USB:
    idVendor: 17224
    idProduct: 21815
    Thread end.
    Exception in thread: error sending control message: Operation not permitted
    Closing
    sijmen@sijmen-laptop ~/Desktop/simpleDSO $
    BINGO but still errors

    VID/PID FILE copy
    format is VID,PID in decimal
    17224,21815

    the following message appears in simpleDSO
    exception
    error sending control message operation not permitted
    Hello what do you think
    Sijmen

  17. 11:00, 2012/07/18Sijmen Grunbauer  / Reply

    Hello ZmaTkar
    If you send me a Email I will send you the latest Windows software and Drivers from Uni Trend

    Sijmen

  18. 11:59, 2012/07/18ZmaTkar  / Reply

    @Sijmen Grunbauer
    Hello,
    problem is, that you have not access to USB device. There are two ways how to solve this problem.
    First, you can run simpleDSO as root through kdesu or some similar program.
    Second is to add udev rule, which will set access rights for usb device.
    Second way is better than first.

    1/ create empty file named 80-unit-permissions.rules in directory /etc/udev/rules.d
    2/ Add following line to file 80-unit-permissions.rules :
    SUBSYSTEM==”usb”,ENV{DEVTYPE}==”usb_device”,ATTRS{idVendor}==”4348″,ATTRS{idProduct}==”5537″,MODE:=”0666″

    3/ restart udev with command: service udev restart
    4/ plug in DSO and try to run simpleDSO.py. It should now run.

    Tom

  19. 12:00, 2012/07/18ZmaTkar  / Reply

    SUBSYSTEM==”usb”,ENV{DEVTYPE}==”usb_device”,ATTRS{idVendor}==”4348″,ATTRS{idProduct}==”5537″,MODE:=”0666″

  20. 14:24, 2012/07/18Sijmen Grunbauer  / Reply

    Hello ZmaTkar
    The 2e option had the same result
    the first option gave me the following message
    Exception in thread: error sending control message: Broken pipe
    Sijmen

  21. 07:10, 2012/07/21Sijmen Grunbauer  / Reply

    Hello Tom
    what can you make from the Dmesg output I send to your Email
    Sijmen

  22. 14:16, 2013/06/09Andy  / Reply

    Hey,
    good work. It worked right out of the box. At least as I sudoed.
    I have done some work to show the DAT-Files with Python matplotlib (currently only in long format).
    To control USB was a step to far for me.
    ANdy

    • 18:02, 2013/06/09ZmaTkar  / Reply

      You can avoid sudo with setup proper rule for udev.

  23. 21:28, 2014/05/06Anand Raj  / Reply

    Hi,
    i have tryed your code in ubuntu (linux)i get a blank screen but the button responds, start and stop to acquisition of data. when i run simpleDSO –> blank screen
    or if i run qt4 version of dso –> it returns KeyError: ‘x_poz’
    1399411432.45 Data buffer error
    with no trase can you help me

    • 08:52, 2014/05/07ZmaTkar  / Reply

      Hi,
      simpleDSO is recomended for use, qt4 version of dso is not maintained right now.

      At least you have to have supported DSO, not all UNI-T DSOs work with simpleDSO. I have UT2062C, UTDxxxx versions of DSOs will not work at all, because they have different communication protocol.

  24. 03:03, 2015/08/08Daniel Sastoque  / Reply

    Hi, i have a problem. I try run:
    python simpleDSO.py,
    with super usser to avoid the error:
    Exception in thread: error sending control message: Operation not permitted,
    but the following appears:
    Exception in thread: error sending control message: Broken pipe.
    I don’t have any idea to how solve this. I have the UTD2052CEL.
    Please help me and sorry for my poor english.

    • 09:48, 2015/08/15ZmaTkar  / Reply

      Hi, my applogies for delayed answer.
      Problem is propably with type of your DSO. I personally own UT2062C and have no chance
      to test it on other types. Therefore I decoded communication protocol for UTxxxxC product line.
      Your’s DSO is UTDxxxxCEL which propably has incompatible protocol with UTxxxxC.

  25. 01:02, 2016/05/02Maxi  / Reply

    Great job !!! That´s what I was looking for a long time!
    What library and version are you using when you put “Import usb” in dso_light into UT2XXX.py ?

    Best regards!
    Maxi

Leave a Reply

Allowed Tags - You may use these HTML tags and attributes in your comment.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Pingbacks (0)

› No pingbacks yet.