OpenHantek / OpenHantek6022

OpenHantek6022 is a DSO software for Hantek USB digital signal oscilloscopes 6022BE / BL. Development OS is Debian Linux, but the program also works on FreeBSD, MacOS, RaspberryPi and Windows. No support for non-Linux related issues unless a volunteer steps in!
GNU General Public License v3.0
868 stars 153 forks source link
digital-storage-oscilloscope dso hantek hantek6022 oscilloscope

Please Help the Victims of the War!

Openhantek6022 is a project where people from all over the world collaborate peacefully, regardless of where they live. If you are lucky enough to live in peace, please donate to the International Committee of the Red Cross.

blue-yellow

OpenHantek6022

GitHub CI Stability: Active Downloads total

GitHub release (latest by date) GitHub Release Date Downloads of latest release

GitHub commits since latest release Downloads of latest devdrop

OpenHantek6022 is a free software for Hantek DSO6022 USB digital signal oscilloscopes that is actively developed on github.com/OpenHantek/OpenHantek6022 - but only for Hantek 6022BE/BL and compatible scopes (Voltcraft, Darkwire, Protek, Acetech, etc.).

This project gives no support for its currently unmaintained predecessor openhantek.

Image of main window on linux

Content

About OpenHantek6022

Features

AC Coupling

A little HW modification adds AC coupling. OpenHantek6022 supports this feature since v2.17-rc5 / FW0204.

Continuous Integration

Every commit triggers a workflow on GitHub Actions that builds and packages OpenHantek6022 for:

GitHub CI This status badge here (and on top) show the build status.

Building OpenHantek6022 from source

The preferred way to run OpenHantek6022 is to build it from source on your system, especially under Linux.

The easiest way to get an up-to-date working code base is to clone the code from here via

git clone https://github.com/OpenHantek/OpenHantek6022.git

and then build it locally, for this you will need the following software:

We have build instructions available for Linux, Raspberry Pi, FreeBSD, Apple macOS and Microsoft Windows.

To make building for Linux even easier, I provide two shell scripts:

Install Prebuilt Binary Packages

Run OpenHantek6022

On a Linux system start the program via the menu entry OpenHantek (Digital Storage Oscilloscope) or from a terminal window as OpenHantek.

You can explore the look and feel of OpenHantek6022 without the need for real scope hardware by running it from the command line as: OpenHantek --demoMode.

Note: To use the 6022BL in scope mode, make sure the "H/P" button is pressed before plugging in.

Using Hantek 6022BL LA Function

The Hantek6022BL can either be used as oscilloscope or as logic analyzer, but not both at the same time - it is not a mixed-signal-oscilloscope (MSO). If you want to use the LA part, then sigrok is the way to go, it works (besides Linux) also for MacOS and Windows. There is no point in supporting the LA input from OpenHantek.

Offset Calibration

The oscilloscope has quite a large zero point error. To calibrate the offset quickly, simply proceed as follows:

  1. Short-circuit both inputs, e.g. with a 50Ω terminating plug or by short-circuiting the probe inputs.
  2. Activate the menu setting Oscilloscope/Calibrate Offset.
  3. Set a slow timebase of 10..100 ms/div, resulting sample rate is 100..10 kS/s.
  4. Slowly select all voltage settings for CH1 and CH2 one after the other.
  5. Finally deactivate the menu setting Oscilloscope/Calibrate offset.

The offset correction is now active and is also permanently saved in EEPROM or as an *.ini file when switched off.

OpenGL Support

OpenHantek6022 uses the OpenGL graphics library to display the data. It requires a graphics card that supports 3D rendering and runs on legacy HW/SW that supports at least OpenGL 2.1+ or OpenGL ES 1.2+. OpenGL is selected by default, but if this does not work (i.e. the black scope window shows an error message or closes immediately after startup), you can choose the less resource-hungry OpenGL ES variant as a fallback by starting OpenHantek from the command line as follows: OpenHantek -e or OpenHantek --useGLES.

Especially on Windows, this option may be necessary to use the program.

It has been reported that the MINGW binary build on some Windows systems had problems with the graphical display and led to a black screen without traces. In these cases, the switch to the MSVC binary build can help.

Similar issues with Linux on ChromeOS (Crostini) can be solved by setting the environment variable LIBGL_ALWAYS_SOFTWARE=1 when using OpenHantek. This could also be a solution for the above MINGW issue, see e.g. #360 and #388 - not yet confirmed.

The Raspberry Pi build uses OpenGL ES automatically, check also the graphics driver setup.

USB Access

USB access for the device is required (unless using demo mode):

Important!

The scope doesn't store the firmware permanently in flash or eeprom, it must be uploaded after each power-up and is kept in ram 'til power-down. If the scope was used with a different software (old openhantek, sigrok or the windows software) the scope must be unplugged and replugged one-time before using it with OpenHantek6022 to enable the automatic loading of the correct firmware. The top line of the program must display the correct firmware version (FW0210).

Specifications, Features, Limitations and Developer Documentation

I use this project mainly to explore how DSP software can improve and extend the limitations of this kind of low level hardware. It would have been easy to spend a few bucks more to buy a powerful scope - but it would be much less fun :) Please refer also to the developer info.

Contribute

We welcome any reported GitHub issue if you have a problem with this software. Send us a pull request for enhancements and fixes. Some random notes:

Other DSO Open Source Software

Other Related Software

History

The program was initially developed by David Gräff and others on github.com/OpenHantek/openhantek, but David stopped maintaining the programm in December 2018.