Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation on Windows #8

Closed
Ho-Ro opened this issue Apr 30, 2020 · 2 comments
Closed

Installation on Windows #8

Ho-Ro opened this issue Apr 30, 2020 · 2 comments
Assignees
Labels
documentation Better documentation needed Windows Windows related, wontfix unless a volunteer steps in

Comments

@Ho-Ro
Copy link
Owner

Ho-Ro commented Apr 30, 2020

This should bring the discussion to the right repo - combining OpenHantek/OpenHantek6022#83 and OpenHantek/openhantek#213
I would like to gather your experience to get an easy step-by-step Windows installation guide.

@justlep wrote:

I wasn't aware of those calibration hints - thank you for the link!
It's been some struggle for me with zero Python experience, but I got it working eventually.
Just in case someone else ever wants to calibrate his/her Hantek 6022BE on a Windows 10 machine, here is what I did:
install Python3
get the required libusb-1.0.dll file:
download the v1.0.23 zip from
https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.23/
extract libusb-1.0.dll from the zip file into {Python install dir}/
(where python.exe sits)

I think that libusb should be installed correctly, so the file `libusb-1.0.dll' is in a globally accessible directory. Not sure if Zadig could help here?

prepare Hantek6022API:

git clone https://github.com/Ho-Ro/Hantek6022API
cd Hantek6022API
pip install .

when I tried to run the calibration at this point, Python complained about missing firmware files.
I could solve this by copying the whole Hantek6022API\PyHT6022\HantekFirmware folder to
{Python install dir}\Lib\site-packages\PyHT6022\HantekFirmware

I made some changes to the firmware directories with e497692 - after installing on my bare-bone virtual W7 the FW files were available, but due to problems with the virtual installation I could not check the USB installation/communication. I would appreciate it if someone could check on a real W7 and W10.

run the calibration:

cd examples
calibrate_6022.py -gec

I was then able to calibrate the scope providing the given voltages.
All works perfectly fine now and voltage readings are nicely accurate.
Again, many many thanks for your work! :-)

A big thank you to @justlep and @Maddo534 for testing!

@Ho-Ro Ho-Ro added the Windows Windows related, wontfix unless a volunteer steps in label Apr 30, 2020
@Ho-Ro Ho-Ro self-assigned this Apr 30, 2020
@Ho-Ro Ho-Ro added the documentation Better documentation needed label Apr 30, 2020
@Ho-Ro
Copy link
Owner Author

Ho-Ro commented May 3, 2020

get the required libusb-1.0.dll file:
download the v1.0.23 zip from
https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.23/
extract libusb-1.0.dll from the zip file into {Python install dir}/
(where python.exe sits)

You can also use the libusb-1.0.dll file from the
libusb-1.0 version
that is provided by OpenHantek6022.
The libusb-1.0.dll file should be found in the PATH, e.g. it could be in the python.exe directory or together with the example programs in the same directory.

YMMV, I checked it only with a bare-bones virtual Win7 install under Debian, but this time with a working USB forwarding.

@justlep
Copy link

justlep commented May 4, 2020

I just checked with a fresh Python3 installation on (non-virtual) Windows 7 and libusb-1.0.dll from the OpenHantek6022 folder copied into the Python install dir.

It did work immediately - no more need to copy the firmware folder around.

Very nice! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Better documentation needed Windows Windows related, wontfix unless a volunteer steps in
Projects
None yet
Development

No branches or pull requests

2 participants