Git Product home page Git Product logo

openhantek / openhantek6022 Goto Github PK

View Code? Open in Web Editor NEW
802.0 53.0 144.0 96.17 MB

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!

License: GNU General Public License v3.0

CMake 4.12% C 1.25% C++ 93.56% Python 0.84% Shell 0.23%
hantek hantek6022 digital-storage-oscilloscope dso oscilloscope

openhantek6022's Introduction

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

  • Supported devices:

  • Demo mode is provided by the -d or --demoMode command line option.

  • Fully supported operating system: Linux; developed under debian stable (currently bookworm) for amd64 architecture.

  • Raspberry Pi packages (raspbian stable) are available on the Releases page, check this setup requirement.

  • Compiles under FreeBSD (packaging / installation: work in progress, thx tspspi).

  • Other operating systems builds: Windows (mostly untested) & macOS (completely untested). No support for non-Linux related issues unless a volunteer steps in!

  • Uses free open source firmware, no longer dependent on nonfree Hantek firmware.

  • Extensive User Manual with technical specs and schematics.

Features

  • Voltage and Spectrum view for all device supported channels.
  • CH1 and CH2 name becomes red when input is clipped (bottom left).
  • Settable probe attenuation factor 1..1000 to accommodate a variety of different probes.
  • Measure and display Vpp, DC (average), AC, RMS and dB (of RMS) values as well as frequency of active channels. Display as dBV (0 dBV = 1 V rms), dBu (0 dBu = 1 mW @ 600 Ω) or dBm (0 dBu = 1 mW @ 50 Ω) can be selected in Oscilloscope/Settings/Analysis.
  • Display the power dissipation for a load resistance of 1..1000 Ω (optional, can be set in Oscilloscope/Settings/Analysis).
  • Display the THD of the signal (optional, can be enabled in Oscilloscope/Settings/Analysis).
  • Show the note values and deviation in cent (twelve equal, A = 440 Hz) for audio frequencies (optional, can be enabled in Oscilloscope/Settings/Analysis). Useful to tune e.g. your electrical guitar.
  • Math channel modes: CH1+CH2, CH1-CH2, CH2-CH1, CH1*CH2 and square, abs, sign, AC and DC part of CH1 or CH2.
  • Time base 10 ns/div .. 10 s/div.
  • Sample rates 100, 200, 500 S/s, 1, 2, 5, 10, 20, 50, 100, 200, 500 kS/s, 1, 2, 5, 10, 12, 15, 24, 30 MS/s (24 & 30 MS/s in CH1-only mode, 48 MS/s not supported due to unstable USB data streaming).
  • Hardware input gain automatically selected based on vertical sensitivity: 1x (up to ±5 V for 1, 2 or 5 V/div), 2x (up to ±2.5 V for 500 mV/div), 5x (up to ±1 V for 200 mV/div) and 10x (up to ±500 mV for 20 or 50 mV/div).
  • Downsampling (up to 200x) increases resolution and SNR.
  • Calibration output square wave signal frequency can be selected between 32 Hz .. 100 kHz in small steps (poor person's signal generator). A little HW modification provides a jitter free HW-driven calibration output signal instead of the interrupt driven SW-output.
  • Trigger modes: Normal, Auto and Single with green/red status display (top left).
  • Untriggered Roll mode can be selected for slow time bases of 200 ms/div .. 10 s/div.
  • Trigger filter HF (trigger also on glitches), Normal and LF (for noisy signals).
  • Display interpolation modes Off, Linear, Step and Sinc.
  • Calibration values loaded from eeprom or a model configuration file.
  • Online offset calibration creates a configuration file for persistent data storage.
  • Calibration program to create these values automatically.
  • Digital phosphor effect to notice even short spikes; simple eye-diagram display with alternating trigger slope.
  • Histogram function for voltage channels on right screen margin.
  • A zoom view with a freely selectable range.
  • Cursor measurement function for voltage, time, amplitude and frequency.
  • Export of the graphs to JPG, PNG or PDF file or to the printer; data export as CSV or JSON.
  • Freely configurable colors.
  • Automatic adaption of iconset for light and dark themes.
  • The dock views on the main window can be customized by dragging them around and stacking them. This allows a minimum window size of 800*300 for old laptops or workstation computers.
  • All settings can be saved to a configuration file and loaded again.
  • French, German, Russian and Spanish localisation complete; Chinese, Polish and Swedish is updated regularily; Italian and Portuguese translation ongoing - volunteers welcome!

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:

  • Linux (*.deb, *.rpm, *.tar.gz)
  • Windows (*_mingw_x64.zip, *_msvc_x64.zip)
  • macOS - (*.dmg, *.tar.gz)

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:

  • CMake 3.5+
  • Qt 5.4+
  • FFTW 3+ (prebuild files will be downloaded on windows)
  • libusb-1.0, version >= 1.0.16 (prebuild files will be used on windows)
  • A compiler that supports C++11 - tested with gcc, clang and msvc

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:

  • LinuxSetup_AsRoot, which installs all build requirements. You only need to call this script once (as root) if you have cloned the project.
  • LinuxBuild configures the build, builds the binary and finally creates the packages (deb, rpm and tgz) that can be installed as described in the next paragraph. If you make small changes to the local source code, it is sufficient to call make -j4 or fakeroot make -j4 package in the build directory.

Install Prebuilt Binary Packages

  • Downloads of latest release Download Linux (Ubuntu 2204 LTS), Raspberry Pi (Debian stable), FreeBSD (12.1), macOS (12.7) and Windows (MINGW / MSVC2022) packages for your convenience from the Releases page.
  • Downloads of latest devdrop If you want to follow ongoing development, packages built from a fairly recent commit are available in the rolling devdrop release. Individual features or elements of the GUI may still change.
  • For RPi4 see also issue #28.
  • These binary packages are built on stable operating system versions and require an up-to-date system.
  • As I develop on a Debian stable system my preferred (native) package format is *.deb. The program itself and the *.deb package built on my local system is tested for completeness and correctness. The precompiled packages are only randomly tested - if at all - and the installation of the *.rpm packages is untested.
  • To install the downloaded *.deb package, open a terminal window, go to the package directory and enter the command (as root) apt install ./openhantek_..._amd64.deb. This command will automatically install all dependencies of the program as well.
  • For installation of *.rpm packages follow similar rules, e.g. dnf install ./openhantek-...-1.x86_64.rpm.
  • The *.tar.gz achives contain the same files as the *.deb and *.rpm packages for quick testing - do not use for a permanent installation. Do not report any issues about the *.tar.gz!
  • Get macOS packages from macports - thx ra1nb0w.
  • Get Fedora rpm packages - thx Vascom.
  • Download (untested) builds from last commit(s). Select the preferred workflow run and go to Artifacts.

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):

  • Linux/Unix
    You need to copy the file utils/udev_rules/60-openhantek.rules to /etc/udev/rules.d/ or /usr/lib/udev/rules.d/ and replug your device. Note: If OpenHantek is installed from a *.deb or *.rpm package this file is installed automatically into /usr/lib/udev/rules.d/.

  • Windows
    Caution: The original Hantek driver for Windows doesn't work!
    You have to assign the correct WinUSB driver:

    • The signed .inf file OpenHantek.inf for all devices - provided by VictorEEV and updated by gitguest0 - is available in the openhantek_xxx_win_x64.zip binary distribution in directory driver.

    • Right-click on OpenHantek.inf and select "install" from the pull-down menu.

    • The Device Manager will show (under "Universal Serial Bus devices") the name and state according to the firmware loaded (e.g. Hantek 6022BE - Loader, Hantek 6022BE - OpenHantek). The PulseView/sigrok-cli firmware is also recognized (e.g. Hantek 6022BE - Sigrok).

    It is recommended to use the .inf file, but it is also possible to alternatively use the Zadig tool and follow the good step-by-step tutorial provided by DaPa.

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:

  • Read how to properly contribute to open source projects on GitHub.
  • Create a separate branch other than main for your changes. It is not possible to directly commit to main on this repository.
  • Write good commit messages.
  • Use the same coding style and spacing -> install clang-format and use make target: make format or execute directly: clang-format -style=file -i *.cpp *.h.
  • It is mandatory that your commits are Signed-off-by:, e.g. use git's command line option -s to append it automatically to your commit message: git commit -s -m 'This is my good commit message'
  • Open a pull request with a clear title and description.
  • Read Add a new device if you want to know how to add a device.
  • We recommend QtCreator as IDE on all platforms. It comes with CMake support, a decent compiler, and Qt out of the box.

Other DSO Open Source Software

Other Related Software

  • HScope for Android A one-channel basic version is available free of charge (with in-app purchases).

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.

openhantek6022's People

Contributors

cdhigh avatar cordlandwehr avatar davidgraeff avatar davidrisch avatar dendvz avatar dougep avatar drothlis avatar eagafonov avatar ef15c avatar ericfont avatar fabiobaltieri avatar fgrieu avatar gitguest0 avatar h4570 avatar ho-ro avatar jm-o avatar jsiddall avatar klemens avatar oliverhaag avatar phoyd avatar polluks avatar ra1nb0w avatar saogalde avatar stapelberg avatar swkim01 avatar tspspi avatar vascom avatar viktorxda avatar wakass avatar wavelet2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openhantek6022's Issues

add option to display Vpp

First, thank you for you work on this software! It was one of the main reasons I decided to buy 6022BE.

Is your feature request related to a problem? Please describe.
Measuring voltage using "cursor" feature requires taking hands off the whatever stuff you're working on and it's actually quite slow process. A quick glance at the bottom of the screen would be all that's needed to find out Vpp.

Describe the solution you'd like
Add Vpp measurement (option to customise bottom status bar would be a bonus)

Additional context
The lack of Vpp mesurement confused me when I first plugged the oscilloscope. I assumed my Hantek's calibration is way off as the voltage was nowhere near what I was expecting. Only after I read #11 I've realised why the values are different.

Horizontal Scroll

When using single trigger, the spike may not be exactly centered. Consequently, if the time/div is expanded, the signal goes out of screen.

A good solution would be a horizontal scroll, option added. Zoom function could tackle the problem, but in this process, another useful feature that could be implemented is a kind of data acquisition menu that allows to specify how much data a user wants to be saved.

.

Differential probe X200 X500 X1000 support

I have Hantek differential probe which uses X500.
OpenHantek6022 supports only X1 and X10 probe.
It would be very nice if you add X200 , X500, X1000 probe support.
Or maybe user can input factor for his own probe.

Normal triggering problem

First of all, thanks a lot for this software. It is much better than original, especially triggering is much more stable.

However, I have problem with "normal" triggering. I am using my Hantek to observe I2C communication on Raspberry Pi. The communication consists of cca. 5us pulses between 0V and 3.3V as shown below

address_bitbanging_3

(Please note that two signals are offseted for easier observation.)

The problem is that in 90% of cases I2C communication does not trigger the oscilloscope/program. I don't know if I am doing something wrong or maybe there is some trick I don't know.

  • OpenHantek version: 20200110 build 589

  • OS: Windows 10

  • Device: Hantek 6022BE

  • Program top line: OpenHantek6022 (20200110 build 589) - Device DSO-6022BE (FW0204)

  • Input signal: square peaks, f ~ 100kHz, Vpp ~ 3.3V

  • Probe setting: probe X1

  • Number of channels used: 2

  • Sample rate: 12MS/s

  • USB driver: WinUSB (v6.1.7600.16385)

Only DC input mode available ..

I don't know if this is a bug or a work-in-progress ... but there in only a pull-down for DC input, no AC input is shown ..

Please move this into "Enhancements" if this is still to do ..

Cheers for the great work .. :)

Libusb error while running make

[ 81%] Building CXX object openhantek/CMakeFiles/OpenHantek.dir/src/usb/uploadFirmware.cpp.o
/home/intellolabs/OpenHantek6022/openhantek/src/usb/uploadFirmware.cpp: In member function ‘bool UploadFirmware::startUpload(USBDevice*)’:
/home/intellolabs/OpenHantek6022/openhantek/src/usb/uploadFirmware.cpp:38:5: error: ‘libusb_set_auto_detach_kernel_driver’ was not declared in this scope
libusb_set_auto_detach_kernel_driver(handle, 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/intellolabs/OpenHantek6022/openhantek/src/usb/uploadFirmware.cpp:38:5: note: suggested alternative: ‘libusb_attach_kernel_driver’
libusb_set_auto_detach_kernel_driver(handle, 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libusb_attach_kernel_driver
[ 82%] Building CXX object openhantek/CMakeFiles/OpenHantek.dir/src/usb/usbdevice.cpp.o
[ 84%] Building CXX object openhantek/CMakeFiles/OpenHantek.dir/src/utils/printutils.cpp.o
openhantek/CMakeFiles/OpenHantek.dir/build.make:1142: recipe for target 'openhantek/CMakeFiles/OpenHantek.dir/src/usb/uploadFirmware.cpp.o' failed
make[2]: *** [openhantek/CMakeFiles/OpenHantek.dir/src/usb/uploadFirmware.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/intellolabs/OpenHantek6022/openhantek/src/usb/usbdevice.cpp: In static member function ‘static UniqueUSBid USBDevice::computeUSBdeviceID(libusb_device*)’:
/home/intellolabs/OpenHantek6022/openhantek/src/usb/usbdevice.cpp:51:5: *error: ‘libusb_get_port_numbers’ was not declared in this scope
libusb_get_port_numbers(device, (uint8_t )&v, sizeof(v));

^~~~~~~~~~~~~~~~~~~~~~~
/home/intellolabs/OpenHantek6022/openhantek/src/usb/usbdevice.cpp:51:5: note: suggested alternative: ‘libusb_get_bus_number’
libusb_get_port_numbers(device, (uint8_t *)&v, sizeof(v));
^~~~~~~~~~~~~~~~~~~~~~~
libusb_get_bus_number
openhantek/CMakeFiles/OpenHantek.dir/build.make:1166: recipe for target 'openhantek/CMakeFiles/OpenHantek.dir/src/usb/usbdevice.cpp.o' failed
make[2]: *** [openhantek/CMakeFiles/OpenHantek.dir/src/usb/usbdevice.cpp.o] Error 1
CMakeFiles/Makefile2:185: recipe for target 'openhantek/CMakeFiles/OpenHantek.dir/all' failed
make[1]: *** [openhantek/CMakeFiles/OpenHantek.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

Single Trigger question

First of all, huge thanks for this piece of software. The original OpenHantek was a bit hard to use with the 6022BE regarding triggers...

Perhaps it is a lack of understanding the feature, perhaps it is a feature that could be implemented differently but my question is as follows:

When i have a signal that's not repeating, (for instance an IR command, measured at the sending IR LED) I can select trigger mode Normal. The program wil wait for a trigger and display the waveform.

However, If I get a repeating signal, for example 1 IR command every 200ms, the trigger mode 'Normal' will be updating every time. This is where trigger mode 'Single' would be used, at least, that's what I expected?

Instead: Single mode always fire's instantaneous when pressing the 'play' button. Whether the trigger condition is met or not (In the upper left corner, you see a nice red TR when the trigger condition was not met). Is this the expected behaviour? And is my use-case invalid for this type of device? Using the Windows Software, it appears 'Single' will wait for a trigger, fill the... buffer? and stop collecting after the buffer is full. This allows to capture an event based on the trigger and analyse after the fact...

Kind regards,

Eric van Zandvoort

Edit: I tried to accomplish what i described but my programming skills are a bit rusty :)
It seems to be working on a basic level :)
single-mode.txt

Probes scale and custom probes

Hi,

When opening the program, channel 1 probe's scaling is set to 10x, as I left it. But in order to the measures to be correck I have to uncheck and check the box again.

Also, is it possible to use custom attenuation probes? I'm plannig to make some DIY 4:1, 20:1 and 50:1 probes.

Steps to reproduce the behavior:

  1. Open the program
  2. Check 10x at both channels
  3. Close the program and open again
  4. See that channel 1 in left lower corner is not corresponding to the scale set in the control panel
  • Device Hantek 6022BE

Add dummy mode

Can you add dummy mode? So users without Hantek hardware can see and may be test interface.

As I think it need only dummy input data generator like calibrating output of 6022 hardware.

GLX warnings

When I run progam from command line in linux I see many qglx warnings when switch settings:

qt.glx: qglx_findConfig: Failed to finding matching FBConfig (8 8 8 8)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 8 8 8)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 8 8)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 8)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 8)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 8)

Working on MacOS Mojave... but samplerate question

Firstly, thank you for this project. It is working better than the stock software and vanilla OpenHantek. Second, Just wanted to confirm that it is working fine on MacOS Mojave 10.14.6. I did have a quick question about the samplerate. It seems that the 48Ms/s option is not available in single channel mode. Was that omitted because of stability? I looked though the commits, and saw a note on the Jun 10 that seemed to indicate that is the reason

openhantek crashing

This happen then I set Normal mode and move trigger threshold.

Also as I understand "normal" mode in oscilloscopes it should stop refresh data on the screen if trigger not crossed. It is bug too

/usr/include/c++/9/bits/stl_vector.h:1042: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::pair<QOpenGLVertexArrayObject*, int>; _Alloc = std::allocator<std::pair<QOpenGLVertexArrayObject*, int> >; std::vector<_Tp, _Alloc>::reference = std::pair<QOpenGLVertexArrayObject*, int>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.
KCrash: Application 'OpenHantek' crashing...
KCrash: Attempting to start /usr/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0
Getting sample data failed:  "Other error"
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt.
You must not let any exception whatsoever propagate through Qt code.
If that is not possible, in Qt 5 you must at least reimplement
QCoreApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'std::length_error'
  what():  vector::_M_default_append
Unable to start Dr. Konqi

And backtrace from gdb https://paste.fedoraproject.org/paste/L6k6zoKs9lqEUIZnhwhcdw

Wrong gain settings for SainSmart DDS120

This report from eevblog tells us:

Have problem with DDS120 and OpenHantek6022 (b188)
I try use my DDS120 again, find new software OpenHantek6022 (b188) and try configure all again.
I see that OpenHantek6022 not read calibration data from DDS120 and zero is not in zero and gain wrong.

Proposed solution: Change these lines:

specification.voltageLimit[0] = { 40 , 100 , 200 , 202 , 198 , 198 , 396 , 990 };

specification.voltageLimit[1] = { 40 , 100 , 200 , 202 , 198 , 198 , 396 , 990 };

to:

specification.voltageLimit[0] = { 32 , 80 , 160 , 155 , 170 , 165 , 330 , 820  };
specification.voltageLimit[1] = { 32 , 80 , 160 , 155 , 170 , 165 , 330 , 820  };

Also adapt

double calibration = settings.value( ranges[ iii ], ch == 0 ? 1.18 : 1.21 ).toDouble();

double calibration = settings.value( ranges[ iii ], "0.0" ).toDouble();

infinte monitoring

First thanks for all your hard work, very good project. One small feature if added can greatly advance this rep. when exporting the data via CSV the output is dependent on the time of the export, which as you may conclude is kind of problematic for real time data processing, I am currently exploring your code base, to see if i can create a small modification in which the processed data (before going to the GUI) can be written to a file or linked with another program. Have you considered this ? or if you can point me in the right direction will greatly be appreciated.

How to make a logger?

I'd like to add a feature to log analyzed data values (rms, vpp...).

I imagined to clone the csv exporter to make a continous logger :

  1. Ask for a filename, open a file and write header (columns names),
  2. Write into that file the data at fixed interval (1 s for instance) during a specified time or until a mouse clic on the corresponding option menu,
  3. Close the file.

I don't understand very well the exporter model.
It seems to process the data, update progress and only at the end ask for a filename to save the processed data.
Is it correct?
So what should be the easiest way to make a logger?

Thanks in advance for your advice.

Voltage cursors and storage

I've looked through the manual and played with the software (v2.12). Does it have Voltage cursors? If not will this be added?

Also does the SW store samples or only what can be seen?

Please overhaul front-end of PDF documentation - FRUSTRATED

Please overhaul the front-end of your documentation relating to satisfying installation dependancies, the installation process, and regarding launching the software.
This is what I got after three hours of effort, and I can't even find the launch shortcut for the software after the three hours, so I will TRY to not swear regarding my dissatisfaction:

  1. Launching .deb package binary installer fails with a dependency message. It took me a while to realize that you have pre-installation dependency satisfaction instructions. These instructions must belong to first page of your manual. These instructions must also be prominently all over your documentation, project front page, PDF, and within the .deb launcher.

  2. You have a bizarre statement on first page of manual, something about forking, yet don't describe the pre-installation requirements. Replace the bizarre statement with useful information!!!

  3. In the PDF manual, please explain to user the installation process with a .deb. Not everyone is a developer here, and not everyone has spent a day getting all the pre-requisites!!!

  4. After running your suggested command for dependencies, .deb binary is allowed to install but after installation I can't find in any place any way of seeing what and where was installed, and how to launch it. Again, in your manual, please add wording on how I am supposed to launch your software, what its launch names/executables/location/icons/menu entries look like, etc!!!

Thanks!

Looping on detecting the 6022BE.

Describe the bug
Loops on detecting scope. Closing the program and restarting or replugging the scope has no affect.

It says uploading FW, but never gets to that, even if left for a long while.

In the output below the scope is at USB 1.8.*

The permission denied is expected for those other devices, but even when I did give my use RW permissions to it all to see what would happen, still looped, just opening and closing other devices as well.

poll({ 3/POLLIN },1,995)                         = 0 (0x0)
openat(AT_FDCWD,"/dev/usbctl",O_RDONLY,00)       = 15 (0xf)
ioctl(15,USB_READ_DIR,0x7fffffffb8f8)            = 0 (0x0)
openat(AT_FDCWD,"/dev/ugen0.1",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen2.1",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.1",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.2",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen0.2",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.3",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.4",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.5",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.6",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.7",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.8",O_RDWR,00)        = 16 (0x10)
ioctl(16,USB_GET_PLUGTIME,0x7fffffffb8dc)        = 0 (0x0)
ioctl(16,USB_GET_DEVICE_DESC,0x7fffffffb8e0)     = 0 (0x0)
ioctl(16,USB_GET_DEVICEINFO,0x7fffffffbaa0)      = 0 (0x0)
ioctl(16,USB_GET_DEV_PORT_PATH,0x7fffffffba78)   = 0 (0x0)
close(16)                                        = 0 (0x0)
ioctl(15,USB_READ_DIR,0x7fffffffb8f8)            = 0 (0x0)
close(15)                                        = 0 (0x0)
poll({ 3/POLLIN },1,992)                         = 0 (0x0)
openat(AT_FDCWD,"/dev/usbctl",O_RDONLY,00)       = 15 (0xf)
ioctl(15,USB_READ_DIR,0x7fffffffb8f8)            = 0 (0x0)
openat(AT_FDCWD,"/dev/ugen0.1",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen2.1",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.1",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.2",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen0.2",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.3",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.4",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.5",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.6",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.7",O_RDWR,00)        ERR#13 'Permission denied'
openat(AT_FDCWD,"/dev/ugen1.8",O_RDWR,00)        = 16 (0x10)
ioctl(16,USB_GET_PLUGTIME,0x7fffffffb8dc)        = 0 (0x0)
ioctl(16,USB_GET_DEVICE_DESC,0x7fffffffb8e0)     = 0 (0x0)
ioctl(16,USB_GET_DEVICEINFO,0x7fffffffbaa0)      = 0 (0x0)
ioctl(16,USB_GET_DEV_PORT_PATH,0x7fffffffba78)   = 0 (0x0)
close(16)                                        = 0 (0x0)
ioctl(15,USB_READ_DIR,0x7fffffffb8f8)            = 0 (0x0)
close(15)                                        = 0 (0x0)
poll({ 5/POLLIN },1,-1)                          = 1 (0x1)

To Reproduce
IMPORTANT: Always unplug and replug the scope if used before with a different application, e.g. sigrok or the original Hantek software.

Steps to reproduce the behavior:

  1. Go to '...'
  2. Select '....'
  3. See error

Expected behavior
It uploads the FW to the device and starts.

Computer environment (please complete the following information):

  • OS: FreeBSD 12-STABLE, r354217
  • ports tree: r517355
  • OpenHantek version: ccdceeb
  • Video hardware: Nvidia
  • OpenGL version: (( waiting for the package for mesa-demos to build so I can check glxinfo ))
  • Qt version: 5.13.22
  • C++ compiler version: Clang 8.0.1

Scope device (please complete the following information):

  • Device: Hantek 6022BE
  • Program top line: Select device
  • Input signal: none
  • Probe setting: none

Additional context
Add any other context about the problem here, e.g. the program output if started in a console like xterm.

Started in xterm: qt.qpa.xcb: QXcbConnection: XCB error: 148 (Unknown), sequence: 209, resource id: 0, major code: 140 (Unknown), minor code: 20

After running into issues getting this scope to play nice in this and OpenHantek, I tried pulseview. That worked, although it is not useful for oscopes(unless you really want to use it as a 2channel logic analyzer).

Software does not utilise native icon theme

There's a good chance this is a user error but the program doesn't utilise my icon theme which makes buttons harder to see with a dark theme. I've included a screenshot below.

Version: Latest commit (a7c9eb6), built with yay from the AUR
OS: Arch Linux (Kernel 5.4.2)
DE: KDE Plasma 5.17.4 / Qt 5.13.2
Icon theme: La Capitaine

Screenshot
image

High CPU utilization

Recent versions run with very high CPU utilization.

To reproduce start OpenHantek and use under Linux
top -p $(pidof OpenHantek)

CPU goes above 200%
cpu-hi

I've tracked back the issue and found that it appears after v.2.13 - exactly after commit #94bd5bab476087db293237940980008be7afe807 in file hantekdsocontrol.cpp

After manually revert code:

void HantekDsoControl::updateInterval() {
  // Revert "faster display refresh" 
#if 0
    // after commit  
    // Check the current oscilloscope state everytime 25% of the time
    //  the buffer should be refilled (-> cycleTime in ms)
    cycleTime = (int)( (double)SAMPLESIZE_USED * 250.0 / controlsettings.samplerate.current );
    // Not more often than every 2 ms but at least once every 100 ms
    cycleTime = qBound(2, cycleTime, 100);
#else
    // before commit    
    // Check the current oscilloscope state everytime 25% of the time the buffer
    // should be refilled
    cycleTime = (int)((double)getRecordLength() / controlsettings.samplerate.current * 250);
    // Not more often than every 100 ms though but at least once every second
    cycleTime = qBound(100, cycleTime, 1000);
#endif
    //timestampDebug(QString("cycleTime %1").arg(cycleTime));
}

... now CPU is back to normal ~25%

cpu-lo

I hope this helps. Congrats and thank you again for your great work!

no 100x probe option?

I see in the OpenHantek6022 example screenshot a drop-down box with x100 selected. Also cannot select AC option.

image

I've downloaded v3.0.1 for Debian but i see only a check box for a x10 probe.
image

how can I use my 100x probe? Years ago I always use my 100x probe for troubleshooting inverters AC 220v output. it works fine with 6022 Original software. please help, thank you.

Add RPI Binary

A lot of people, including me, would like to see a version for RPI in the releases.
Thx!

Cursor Measurements yellow/ blue box fails to draw.

The cursor measurements yellow or blue box fails to draw.

  1. Click Compass tool
  2. Select a trace
  3. Click and drag to draw box.

No box shows. However, the measurement itself is displayed:
compass

DSO-6022BE FW0204
v 3.0.1 - downloaded binary
Linux Mint 19.2 Cinnamon
Intel Corporation Core Processor Integrated Graphics Controller
OpenGL version string: 2.1 Mesa 19.0.8

terminal output:
$OpenHantek
qt5ct: using qt5ct plugin
qt5ct: D-Bus global menu: no

Jitter on high frequencies

I notice quite a bit of Jitter on the edges when the frequency get's higher than about 70khz, is this a hardware limitation or this software ..?

I have tried this on both external signal generator and the internal Calibration output ..

To duplicate just set Cal Out to 100khz ..
Jitter appears to be around 300ns at 100khz ..

I also notice that the max samplerate is only 24Mhz, where on the old software (pre fork) was 48Mhz

Wrong maximum sampling frequency

I can't set maximum sampling frequency to 48Msps for my 6022BL.
After 24Msps it set only 30Msps in single channel mode.

In two channel mode program can set maximum 16Msps instead of 24Msps.

I use Fedora linux.

TortoiseSVN in process

This is rather a question.
I can run latest OpenHantek-Win-x64-Release-b127.zip in my Windows 10 PC (1903).
However, I found TortoiseSVN under OpenHantek process. May I know why?

2019-10-20 23_48_42-Task Manager

incorrect voltage display

While testing the new openhantek6022 on linux, i noticed that the frequency and voltage readings are not correct in the lower part of the screen.
Frequency is off when the samplerate is too low. e.g; on the calibration squarewave, when you update the timebase, the samplerate automatically reduces to 100kS/s and gives you a frequency of 250Hz. updating the samplerate to 500kS:S shows the correct frequency values.
It would be nice to give the highest possible samplerate when changing the timebase, this would eliminate some interpretation errors.
Also, voltage readings on the last version seems half of what they shoud be. I'm reading 1, 06 V on the ref squarewave, Normally this should read 2Vpp.
on sinewaves, voltages are half of what they are in reality. Older openhantek software gives correct values

Wrong measurement with single channel 1

If i set the checkbox only to CH1, the measurement is very noisy.
There is no problem with CH1 and CH2 set together or only set to CH2.
I try the latest repository with the 6022BL.
CH1+CH2:
6022_CH1_CH2
Only CH1:

6022_CH1

How to import this software in Qt Creator?

Hi,

I want to try to implement some features in this program, and experiment with it. What are the steps to be followed when importing this project to QtCreator(Windows)? Mine wont compile with error:

👎 error: No rule to make target 'all'. Stop.

It is a fresh installation of QtCreator. Never used it. I would appreciate the help.

The program crashes

The program crashes on the MAC OS if the cursor measures the time intervals. I can send a video to the mail.

Grid dots are difficult to see

Depending on the viewing angle the grid dots are very difficult to see. Can these be made larger using more pixels perhaps with an option in the colour configuration menu?

Windows 10 pro 64b - Hantek 6022BL Connection Failure

Windows 10 pro 64b, version 1809, OS build 17763.1039; Intel Core 2, Duo CPU E6550
OpenHantek-Win-x64-Release-b228/OpenHantek.exe

Device Manager Driver Listing: Hantek6022BL\Hantek6022BL DRIVER 2

Error uploading firmware:
"UploadFirmware: Couldn't open device: Operation not supported or unimplemented on this platform"

Note:
Recent Hantek software installation downloaded 20200212.
Drivers provided within the Hantek install package work OK with the Hantek software version 1.06.

Bundle for Mac OSX with qt, libusb, fftw

Hey!

Thanks for that wonderful software. It was very easy to use and I am glad you released a Mac OS version!

On the first sight, I thought I just have to execute this application and would be able to measure right away. My first try proofed me wrong.

With a little knowledge about software development I figured out quickly, that I need xcode, xcode command line tools, homebrew, qt, libusb and fftw installed. Right after giving away 40 GB of discspace for like 99% unneeded stuff and 1.5 hours later I was able to start openhantek6022.

To be fair, I had no compilation problems happening. Which has been really good!

On the end of the day I wished there had been a simple bundle containing only the things I need. More like 100MB than 40 GB.

QT describes how to do macOS deployment as a bundle...
https://doc.qt.io/qt-5/macos-deployment.html

Could you please create a simple Bundle for Mac? I offer myself as a volunteer for testing ;)

Add DSO4104C ?

Is it possible to add DSO4104C?
I don't know how i can add this because firmware of DSO is in .upk and i need to add hex file...
Anyone can help me ?
Thanks

Error launching on RPI4

I did this to install:

sudo dpgk -i openhan.....

When I try to start the connection window appear, click on connect and then program crash with this message:

qt5ct: using qt5ct plugin
qt5ct: D-Bus global menu: no
QEGLPlatformContext: eglMakeCurrent failed: 3009
QOpenGLFunctions created with non-current context
Segmentation fault

If i try to build myself, i got this error at launch libopengl0 not found

Regards

Cinosh07

Add option to save more data to file

Can you please add option to save more data to file. Not only 20000 samples.
If it can not be save continuously than at least incontinuously.

So user can set multiplier for example 2x20k, 3x20k, etc.

It will be good for postprocessing in other apps like octave.

Support for Hantek 1008c

Hi, I wanna know if there is some kind of support for Hantek 1008c. Tried to find it but I haven't got any information about it.

I'd like to use the device natively on OSX but right now I can't :/

Thanks,
Sebastián.

USBee-DX Support

Hi guys.

Recently I got my hands on a clone of USBee-DX device. This is combined logic analyzer and oscilloscope.
I was hoping to make it working under Linux with Sigrok PulseView software, but unfortunately it supports only analyzer side.
Googling this issue brought me to few articles, with information, that this devices are hardware compatible to Saleae logic analysers and stating that Handek 6022 is basically improved clone of the same USBee-DX...
Indeed, checking the drawings I've found, led me to conclusion that at least general configuration is very similar: both devices are using Cypress FX2 chip (100-pin CY7C68013A-100 in case of Hantek and 56-pin Cypress CY7C68013A-56 in case of USBee-DX clone), which is getting information from ADCs (one dual ADC AD9288 and two single TLC5510 respectively) over B and D ports, and both devices are getting the firmware from PC software.

Winged by this information I started experimenting with different VID/PID values, trying to get USBee-DX clone represent itself as 6022, and even got it detected as Hantek and driver loaded. Unfortunately OpenHantek software shows an error, stating that it cannot load the firmware.

My question is: will it be possible to get a support for USBee-DX compatible oscilloscopes? What can I do from my side? I'm programming a bit (C & C++), but I'm not professional. I do not know, from which side to approach to this issue.

Duty cicle measurement

Hi,l. First of all, thanks for this amazing software! It definately runs smoother than any other available. The only thing I miss here is a duty cicle measurement, and other minor measurements such as rise and fall times, etc. Is it possible to implement these? I could not uninstall the original software only because I eventually need those measurements.

Zoomed PDF/PNG export broken

Describe the bug
Exporting a zoomed screen with zoom x 1.00 shifts the center of original trace to the left border.
Zoom > x 1.00 crashes the program.
This issue exists already in 3.0.1
image

Need to correct Timebase and Samplerate setting

It is impossible to set desired Timebase and Samplerate simultaneously.

For example I want 100 ns and 12 Msps but it is always switched to maximum samplerate on lower timebases.

This is a very annoying bug and very bad for user experience.

Initially increase timebase crash the program (v2.15)

Release-b106 (v2.15)
Program crashes when initially increase timebase above 20ms on Windows 10. Tested several times, only when timebase is increased very slow and patiently program works fine until restart and start again initial increase of timebase.
On waveform screen appears some peak to peek noise just before crash.

To Reproduce
Start the program on windows 10 and start increasing timebased. On average fast clicking "up" above 2ms program freez and close it self.

On previous version everything works fine.

How to calibrate? Where are cal_zero.py and calibrate.py?

I am astounded by how good this software is! I am using OpenHantek6022 3.0.1 FW0204 on Windows 10 with a Hantek 6022BL.

Voltage measurements are off by 10%, so I would like to calibrate the display. I have a modelDSO6022.conf file that I can change values in and see a corresponding effect in the display.

I read the calibration notes in:
https://github.com/Ho-Ro/Hantek6022API/blob/master/README.md#create-calibration-values-for-openhantek

This references both examples/cal_zero.py and examples/calibrate.py. I have searched github in both OpenHantek and OpenHantek6022, and eevblog but cannot find these files anywhere.

Would you please provide a pointer to the python programs, or at least hints on how to determine values for the modelDSO6022.conf file?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.