Author Topic: New Hantek DSO2X1X models?  (Read 454515 times)

0 Members and 8 Guests are viewing this topic.

Offline IW2evk Roberto

  • Newbie
  • Posts: 6
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1725 on: December 18, 2023, 12:43:10 pm »
Hi,

seem intersting..
it's a executable pyton file ?
I suppose : connect dso2... to pc (for me  linux ubuntu 20.04)
goes to shell
With Super user start file .PY with command required
then recover on pc the file and use in conjunction with spreadsheth (e.g. opencalc) tor use data collected.

Right ?

Roberto

P.s. if you speack italian or french contact me on PM

Thanks
 

Offline Aldo22

  • Frequent Contributor
  • **
  • Posts: 848
  • Country: ch
Re: New Hantek DSO2X1X models?
« Reply #1726 on: December 19, 2023, 10:09:56 am »
With PyVISA I was able to address the Hantek DSO2000 immediately.
First I tried Ni-Visa, but it did not see my Hantek using the "VISA Interactive Control". However, I didn't try it for long.

With the "phmarek / hantek-dso2000" script (which is using PyVISA) you can download the waveform data in different formats. Apparently also for viewing in "gnuplot".

But I am more interested in controlling the scope, e.g. that I don't get a cramp when I want to adjust the signal generator from 10Hz to 10MHz by turning the "Multifunctional Knob".
You can control the device with PyVISA using any of the SCPI commands.

I have converted the SCPI command list from the "DSO2000 SCPI Programmers Manual" PDF into a machine-readable form (JSON), so that you can use it as a basis for an interface.
(-> Attachment. First version, may contain errors).

Btw. you don't need to be "super user", it should be enough to add "99-hantek-dso.rules" to "/etc/udev
/rules.d/".
https://github.com/phmarek/hantek-dso2000/tree/main/etc/udev/rules.d

« Last Edit: December 21, 2023, 11:38:01 am by Aldo22 »
 

Offline IW2evk Roberto

  • Newbie
  • Posts: 6
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1727 on: December 21, 2023, 01:01:48 pm »
i've installed on linux lubuntu 20.04 via flatpack.
But in 99-hantek-dso.rules seem not appaers my version
 

Offline Aldo22

  • Frequent Contributor
  • **
  • Posts: 848
  • Country: ch
Re: New Hantek DSO2X1X models?
« Reply #1728 on: December 21, 2023, 03:21:27 pm »
i've installed on linux lubuntu 20.04 via flatpack.
But in 99-hantek-dso.rules seem not appaers my version
I have absolutely no idea what you're talking about.
 

Offline carlonb

  • Contributor
  • Posts: 19
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1729 on: December 26, 2023, 02:03:30 pm »
Hi everyone, I'm new to the forum and I'm waiting for the Hantek DSO2C10 oscilloscope to be delivered to me.
In the meantime I would like to familiarize myself with the tools made available by DavidAlfa (Thanks David).
In particular I would like to start with the "DSO_Builder" utility to extract the scripts to see how they are made.
I would like to point out that I have read the "readme.txt" file but unfortunately it is intended for those who already know cygwin...
Since I use Windows 10 I therefore installed cygwin(64bit) and added the path to cygwin/bin in "environment variables"
to be able to use the Windows dos-prompt.
I tried copying the "dso3kb_backup_builder.upk" file into a folder and launching Run ./extract.sh "dso3kb_MyPackage.upk"
but nothing happens and I get no error messages, but I also can't find the extracted package.
At this point it is not clear to me how to proceed to decrypt and extract the "dso3kb_backup_builder.upk" file.
Could you help me from this point?

Thank you.
 

Offline vistorik

  • Regular Contributor
  • *
  • Posts: 103
  • Country: de
Re: New Hantek DSO2X1X models?
« Reply #1730 on: December 26, 2023, 08:21:24 pm »
Since I use Windows 10 I therefore installed cygwin(64bit) and added the path to cygwin/bin in "environment variables" to be able to use the Windows dos-prompt.
I tried copying the "dso3kb_backup_builder.upk" file into a folder and launching Run ./extract.sh "dso3kb_MyPackage.upk"
but nothing happens and I get no error messages
Could you help me from this point?
1. When installing cygwin, you must also install gpg for encryption/decryption, for this enter gnupg in the search line and select all packages with gpg. You could do it also after cygwin installing.
2. After cygwin installed you should have "Cygwin Terminal" icon on your desktop - see the picture.
3. You should run this "Cygwin Terminal" and with "CD" commands go to the directory with the script extract.sh and the upk-file, which shoul be in the same directory.
3. Now in the "Cygwin Terminal" window you should enter
 ./extract.sh "dso3kb_MyPackage.upk"
 and press Enter.
« Last Edit: December 26, 2023, 08:39:10 pm by vistorik »
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6142
  • Country: es
Re: New Hantek DSO2X1X models?
« Reply #1731 on: December 26, 2023, 09:20:16 pm »
I would like to point out that I have read the "readme.txt" file but unfortunately it is intended for those who already know cygwin...
Absolutely not, anyone can do this, cygwin setup will ask which packages to install.
The readme is pretty straightforward:
Quote
cygwin: Select Packages -> Not installed -> Search: gnupg -> Change gnupg from "skip" to latest version.
« Last Edit: December 26, 2023, 09:22:59 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline carlonb

  • Contributor
  • Posts: 19
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1732 on: December 26, 2023, 10:12:49 pm »
@vistorik
Thankyou for the reply,
1) Yes already selected and installed gnupg
2) Yes the icon is present
3) ... I'm not able to change dir !!! |O

@DavidAlfa
Thankyou for all your effort on this scope, Yes I read this readme (I read almost all your drive...).

Now, about change dir in the terminal window see the picture please.
1963239-0
 

Offline carlonb

  • Contributor
  • Posts: 19
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1733 on: December 26, 2023, 10:22:16 pm »
..... this happen with dos prompt of windows
 

Offline vistorik

  • Regular Contributor
  • *
  • Posts: 103
  • Country: de
Re: New Hantek DSO2X1X models?
« Reply #1734 on: December 26, 2023, 10:44:02 pm »
Now, about change dir in the terminal window see the picture please.
(Attachment Link)
Use no spaces in the directory name.
I use this slash "/" to change a directory: cd c:/...
But seems it doesn't matter...
Code: [Select]
xxxxx@sonyvgnfz ~
$ cd c:/DB_BACKUP
xxxxx@sonyvgnfz /cygdrive/c/DB_BACKUP
$ cd c:\DEVELOPER
xxxxx@sonyvgnfz /cygdrive/c/DEVELOPER
$
« Last Edit: December 26, 2023, 11:05:08 pm by vistorik »
 

Offline carlonb

  • Contributor
  • Posts: 19
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1735 on: December 26, 2023, 11:12:43 pm »
Thanks vistorik,
Now is OK  :-+
Was matter of "/" instead of "\" and No-Spaces in folders name.
All worked well in cygwin terminal as you suggested, but no way to go in Windows dos prompt.
Ciao and tankyou again.


 

Offline Veteran68

  • Frequent Contributor
  • **
  • Posts: 727
  • Country: us
Re: New Hantek DSO2X1X models?
« Reply #1736 on: December 26, 2023, 11:21:10 pm »
All worked well in cygwin terminal as you suggested, but no way to go in Windows dos prompt.

Because extract.sh is a sh/bash shell script that is not understood by the Windows shell. It is not a batch (BAT) or command (CMD) script. It has to run in a bash shell, which is provided in this case by Cygwin.
 

Offline carlonb

  • Contributor
  • Posts: 19
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1737 on: December 26, 2023, 11:35:31 pm »
@veteran68
Thanks, Ok now I understand.
Bye
 

Offline vistorik

  • Regular Contributor
  • *
  • Posts: 103
  • Country: de
Re: New Hantek DSO2X1X models?
« Reply #1738 on: December 27, 2023, 12:12:40 am »

Now is OK  :-+
@carlonb, perhaps this information will be useful for you when working with David's extract.sh/build.sh scripts:
Code: [Select]
Executing the extract.sh script (from David's Readme.txt file):
./extract.sh "dso3kb_package_name.upk"
The extract.sh script decrypts everything and unpacks it into a created "package_name" folder, which will contain a "package" folder and sometimes an "upend" file.

The "package" folder usually contains 2 files - do_update.sh and Manifest.xml, but may contain additional files and folders with files, for example, for copying files or folders to specific folders in the device file system. The do_update.sh file is an execution script that is executed after the update program copies the "package" folder to the /dso/var/run folder of the device.

The Manifest.xml file contains:
<?xml version="1.0" encoding="utf-8"?>
<manifest factory="yes">
<Vendor name="hantek"/>
<Product name="DSO"/>
<Model name="DSO4000b"/>
<SoftwaveVersion version="1.0"/>
<date value="161203"/>

<cmd>chmod 777 /dso/var/run/package/do_update.sh</cmd>
<cmd>/dso/var/run/package/do_update.sh</cmd>
</manifest>

The "upend" file contains a list of files and folders in the "package" folder.

Executing the build.sh script (from David's Readme.txt file):
./build.sh "package_name"
  where [b]"package_name"[/b] is a folder containing a "package" folder and sometimes an "upend" file.
The build.sh script archives, encrypts and creates the file "dso3kb_package_name.upk"

After selecting the upk-file in Utility->Update->Update Firmware of the device, the folder /dso/var/run is created, if it did not exist. If this folder exists, then all its contents are deleted. After this, the selected upk-file is unpacked into this folder and the do_update.sh script from "package" folder is executed.

To create and edit the do_update.sh file under Windows, use the Notepad++ text editor with the Edit->EOL Conversion->Unix (LF) option.

David, I apologize in advance for any possible inaccuracies and delitantism. I'm not a Linux expert.
« Last Edit: December 27, 2023, 12:57:07 am by vistorik »
 

Offline IW2evk Roberto

  • Newbie
  • Posts: 6
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1739 on: December 27, 2023, 08:23:14 am »
Hi all,
i return on thread abou linux software for controlling DSO2d scopes.
I've tried openhantek, but don't support this models (i've also asked confirm to developpers )
So remain Oscope ..
Someone have a valid linux software ?
I've also ased to Hantek without any resuts..

Many thanks in advance

regards

Roberto
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6142
  • Country: es
Re: New Hantek DSO2X1X models?
« Reply #1740 on: December 27, 2023, 11:10:39 am »
Better copy dso_builder to c:\cygwin64\home\your_user.
Then just open the cygwin terminal and do cd dso_builder.
Yeah this will never work under Windows, that's why cygwin is used in first place! Why the mess if we could simply run it in windows? :).
It's a tool that let us run linux stuff without installing a Linux VM or second OS.

Will add this to the readme, but let me say that if you're struggling with this, what you're going to play with won't be any easier!
« Last Edit: December 27, 2023, 11:16:05 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: John Cronk

Offline carlonb

  • Contributor
  • Posts: 19
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1741 on: December 27, 2023, 09:36:35 pm »
Better copy dso_builder to c:\cygwin64\home\your_user.
Then just open the cygwin terminal and do cd dso_builder.
Yeah this will never work under Windows, that's why cygwin is used in first place! Why the mess if we could simply run it in windows? :).
It's a tool that let us run linux stuff without installing a Linux VM or second OS.

Will add this to the readme, but let me say that if you're struggling with this, what you're going to play with won't be any easier!
Tanks for the hint.
Regarding the readme, it is not necessary to explain why cygwin is used and why it doesn't work with Windows, it would be enough
just indicate that (Windows Environment):
1) Install cygwin with the gnupg package (Select Packages -> Not installed -> Search: gnupg -> Change gnupg from "skip" to latest version).
2) The dso_builder "extract.sh" file must be copied in the directory where the "dso3kb_MyPackage.upk" file to be extracted resides.
3) Open the cygwin terminal and from the $ prompt with CD move to the folder where the "dso3kb_MyPackage.upk" file to extract resides (point 2).
NOTE: The path must not contain spaces and use "\" separators instead of the standard windows "/".
5) From the $ prompt type ./extract.sh "dso3kb_MyPackage.upk" to execute the extraction.

I definitely have no intention of playing with these scripts, this is just curiosity.
I will limit myself to using what you have already prepared only when everything is clear to me. I don't usually operate on things I don't know about.

Thank you for your work and as soon as I receive my DSO I will definitely have more questions (after re-reading everything on the FAQ page again).
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6142
  • Country: es
Re: New Hantek DSO2X1X models?
« Reply #1742 on: December 28, 2023, 12:16:21 am »
The readme in every package and the giant FAQ aren't clear enough?  :-//
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline carlonb

  • Contributor
  • Posts: 19
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1743 on: December 28, 2023, 10:25:47 am »
@DavidAlfa,
Ohhh, don't worry, you have done a huge job to improve this scope.
It's probably just my problem since (Improving the Hantek) is a new topic for me.

Ciao
 

Offline carlonb

  • Contributor
  • Posts: 19
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1744 on: December 30, 2023, 08:38:32 pm »
Today arrived my dso2c10, the strange thing is that it arrived via a courier appointed by Amazon???
I kept an eye on the tracking of the Spanish Aliexpress supplier but it was always in transit between Spain and France.
I was convinced of a serious delay due to the Christmas holidays but unexpectedly it was delivered today
with just one day delay compared to the forecast, total of 15 days from the order.  :))

Freshly turned on out of the box:
SW version: 1.0.3.0.0(230327.00)
FW version: 3205
PCB No.: 003.002.001.000.000.000.000.000

I soon made the backup with dso3kb_backup_builder.upk: All OK.

DSOflash:
After connecting the USB cable to the back, turning on the DSO with the FEL button pressed, Windows 10 automatically installed its own driver (without asking me) but the name  was "undefined device #1".
In any case I started Zadig and saw that USB ID:1f3a and PID:efe8 were correct, so I installed the driver.
Then I launched read.bat and after about 26 minutes it completed the backup.
Now I have a doubt, do you think that this backup is correct?
I attach the screenshot about it.

If you confirm it I will proceed to find out if the conversion to 2D15 gives me the AWG.



Bye and thanks.
« Last Edit: December 30, 2023, 08:40:10 pm by carlonb »
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6142
  • Country: es
Re: New Hantek DSO2X1X models?
« Reply #1745 on: December 30, 2023, 10:10:01 pm »
Yeah! Don't worry, DsoFlash backup is not really important, just a sort of last resort thing (Because you never know).
My advice is to zip/rar/7zip that file and upload it to your Google drive or something.

2D15 mod won't change anything critical either.
Some boards are missing the generator parts, so if not working just restore dso3kb_CNxxx_Model.upk generated by Backup Builder.
« Last Edit: December 30, 2023, 10:13:08 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline carlonb

  • Contributor
  • Posts: 19
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1746 on: December 30, 2023, 10:48:55 pm »
AWG components already on board and enabled! ;D

I'm one of (many) lucky people so I've gained 48Euros (Payed 162Euros).

A lot of thanks to DavidAlfa, now it's time to do other mods....
I will keep all of you updated.
Bye



 

Offline carlonb

  • Contributor
  • Posts: 19
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1747 on: December 31, 2023, 02:53:27 pm »
Added the following mods to my scope:
Small English font
bmp_to_png
Overclock with DavidAlfa default values CPU=648MHz  RAM=336MHz.
All worked very well.

The next mod will be RTC hacking ASAP I will receive the rtc module.
Bye
« Last Edit: December 31, 2023, 10:16:12 pm by carlonb »
 

Offline carlonb

  • Contributor
  • Posts: 19
  • Country: it
Re: New Hantek DSO2X1X models?
« Reply #1748 on: January 01, 2024, 02:17:14 pm »

Happy new Year to all people in the forum :)

@DavidAlfa
Hi David, I need an help about the "patcher", so if I only want enable uart ascii decoding without change plot colors
do I set the flag PATCH_COLOR=0 in file patch_values ?
I prefer mantain original colors as they reflect the color ring around the BNC connectors.
Thankyou
Bye
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6142
  • Country: es
Re: New Hantek DSO2X1X models?
« Reply #1749 on: January 01, 2024, 02:31:17 pm »
Exactly! The first 3 options are true/false switches.

Code: [Select]
# Restore only, skip patching
RESTORE_ONLY=0

# Enable ASCII decoding
PATCH_UART=1

# Change plot colours
PATCH_COLOR=1

# These are the default colours
# Hex:     R   G   B
CH1_COL="\xFF\xFF\x00"
CH2_COL="\x00\xFF\x00"
FFT_COL="\xFF\x00\xFF"
« Last Edit: January 01, 2024, 10:14:42 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf