Author Topic: Hantek - Tekway - DSO hack - get 200MHz bw for free  (Read 2198516 times)

hranatybraska and 11 Guests are viewing this topic.

Offline tinheadTopic starter

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1075 on: February 26, 2012, 01:10:26 pm »
You mean that also HW is with 5202B components related to BW.

If this all, meybe Conrad have busy days for ship all purchased  3062C's
I do not know what is shipping price for other countries.
(maybe they close this offer soon.....  )

the one i got backup was real 200MHz model before Conrad (well Hantek for Conrad) re-labeled it

Regards shipping, check this :

http://www.voelkner.de/products/270281/Voltcraft-Dso-3062c-Digital-Oszilloskop.html

within Germany free of charge, within EU 9,95EUR
I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline rf-loop

  • Super Contributor
  • ***
  • Posts: 4091
  • Country: fi
  • Born in Finland with DLL21 in hand
I drive a LEC (low el. consumption) BEV car. Smoke exhaust pipes - go to museum. In Finland quite all electric power is made using nuclear, wind, solar and water.

Wises must compel the mad barbarians to stop their crimes against humanity. Where have the wises gone?
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1077 on: February 26, 2012, 02:16:23 pm »
How are you looking at it!
Converted to a hex-dump, then just scrolling through it.

Quote
if I open it in notepad
Excuse me while I vomit.

Quote
Can you pick one and possibly give an example.
The first two 32 bit numbers are obvious, because there are many zeros in the first eight bytes. Multiplying the values from the first two 32 bit numbers happens to give the file size minus eight.

You can call that finding a "breakthrough", because from that information one can conclude

(a) The first two 32 numbers provide width and height (or height and width) of the image. One can assume the larger number is the width, assuming most .ico files contain images in landscape orientation.

(b) The data is eight bytes per pixel.

(c) Since it is a color image, it either needs a color pallet or uses an 8 bit RGB encoding, like 4:4:2 (the later can also be used as index into a trivial color pallet).

(d) The file size indicates there is no color pallet in the file. Therefore the mapping of the 8 bit values to colors needs to be hard coded somewhere else in the DSO software or even display hardware.

The last point (d) is the reason I didn't looking further. It is rather boring to reverse-engineer the 256 (8 bit) color pallet, and I couldn't bother looking further.

Quote
So if it's pretty primitive what do i have to do to edit/make one?

First of all, get decent tools. Notepad isn't.

Unless someone manages to identify the file format and knows tools for it:

Get documentation of a typical, common, simple image file format, like .gif. Reverse-engineer the color pallet or just start with guessing one. Write software to generate e.g. a gif file, consisting of adding the color pallet to the file, and converting the data from the .ico file. It is just tedious work, and I don't see the point doing it.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline tinheadTopic starter

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1078 on: February 26, 2012, 06:26:37 pm »
right, the color pallet is hardcoded in the dso-lcd.ko, whe you look inside you will find these 1024byte (attached as colors_plat.zip)

I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline tinheadTopic starter

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1079 on: February 26, 2012, 07:41:50 pm »
i do have a request, those of you who bought Hantek/Tekway/Voltcraft during last let say 2 months,
so having hw1007 555583e9 (not 83e8) - if you have Altera JTAG cable plase do create
read back from the MAX II CPLD in your DSO.


Why? Well,  I have checked few backups of hw1007 555583e9 restored to my hw1007 5555 83e8 board
(and even restored to hw0 board) and i don't have any issue with latest firmware (crashing sometimes without reason,
freezing and damaging settings) . Two other ppl checked this for me, same result - but many of you with 555583e9 version
have issues (and these can be replicated by it seems only on your hadrware).
From what i know there are no changes to mainboard itself, so the last thing which might be different is the CPLD.
Afaik, it is not protected so when you have Altera JTAG you will be able to read back the complette content.
I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline Sobiguy

  • Newbie
  • Posts: 8
  • Country: 00
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1080 on: February 26, 2012, 11:27:36 pm »
Don't know if this is any help to anyone but. I bought my hantek DSO5062B about three weeks ago from
http://www.circuitspecialists.com/digital-storage-oscilloscopes

And there still shipping with hw1007 83e8.

as that's what mine is. just thought I would share.

Thank you BoredAtWork and tinhead for all the help and info regarding the .ico's.

I realize my noobness  In these area's are showing. I dealt with a lot of 8bit mcu's and I'm trying to learn the Arm Arena. These hacks Improvements would not be possible or atleast understandable with out the experience and dedication that guys have put in to it.

These graphical customizations my be trivial but for me at least it helps to further understand the inner workings of these devices in such a way as to not brick it. Plus it adds the ability to add your own personal flare.

I mean Sure upgrading is spectacular but why go through all the work and not leave your customized mark be-hide.

But I digress, I know that notepad++  is not the right software for the job. So what are you guys using?       
 

Offline tinheadTopic starter

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1081 on: February 28, 2012, 02:52:59 am »
few people have mentioned that the especialy last 2 firmwares 2.06.3 (111226.1) and 2.06.3(120112.1)
when crashing they damaging the setup file (/param/sav/run1kb*). When this happens the DSO
is not responding to any key/knob, all you can do is to delete manual the affected file (/param/sav/run1kb*)

However, this sucks somehow. I wish Hantek could create a simple application loaded just before dso.exe
and checking if default button is pressed - if so such app could purge all settings and allow DSO to startup properly.
Maybe some day they will do it, for now i created a firmware update file which will patch your DSO.

The patch is very simple, while booting modified rcS will check in /mnt directory for a file named reset.me
What is /mnt? Well this is the root directory of USB flash drive. So if such file exist the rcS will purge
all settings bevore dso.exe will get loaded .. and voila! DSO will never ever again hangs on startup because
of damaged settings/setup file.

All you have to do now is to install once the fix - unzip attached setfix.zip into empty usb flash drive, insert it into
DSO, run firmware update. The next time when your DSO crashed just insert this usb flash drive (or any other
which contain empty file named reset.me), boot up the DSO and enjoy defualt setup :)

If for any reason you will need to restore the original rcS, unzip the unfix.zip, run again firmware update
and the original rcS will be restored (the setfix.zip is creating a copy of rcS in /etc/init.d/ )



you don't need tihs anymore, since firmware 2.06.3 - 120423.0 there is powerfull watchdog implemented which cares about
this problem.
« Last Edit: May 01, 2012, 09:51:13 am by tinhead »
I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline nordiste

  • Newbie
  • Posts: 6
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1082 on: February 28, 2012, 08:08:15 am »
hi,
what can i do if i have this problem ? whithout installing this patch before ?
i have last firmware.

thanks.
marc
 

Offline tinheadTopic starter

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1083 on: February 28, 2012, 09:47:38 am »
hi,
what can i do if i have this problem ? whithout installing this patch before ?
i have last firmware.

thanks.
marc

unfortunately you will have to connect via UART to the DSO (3.3V TTL UART converter is what you need)
and delete manualy the affected file, just execute on the shell rm -f /param/sav/run1kb*
or send the unit back to the shop where you bought it originaly.
I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline Kampfwurst

  • Newbie
  • Posts: 9
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1084 on: February 28, 2012, 10:04:40 am »
can I use this TTL UART Converter from Ebay??
eBay auction: #350499583299
 

Offline Parsley

  • Newbie
  • Posts: 8
  • Country: de
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1085 on: February 28, 2012, 10:47:43 am »
One of the best hidden secrets of every forum is the search button!

Search for "CP2102", which your ebay article says, and the first found entry will tell you: yes you can! ;-)
 

Offline nordiste

  • Newbie
  • Posts: 6
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1086 on: February 28, 2012, 01:38:30 pm »
many thanks for your help.
i solve problem with my bus pirate interface and now DSO works.
tinhead, your software works fine.
many thanks.
 

Offline LEECH666

  • Frequent Contributor
  • **
  • Posts: 398
  • Country: de
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1087 on: February 28, 2012, 06:39:28 pm »
Okay my scope arrived today.

Sorry I am very new to this.

Can I use the fw3dump tool with this DSO version too?

Cheers,
Florian
 

Offline tinheadTopic starter

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1088 on: February 28, 2012, 07:36:17 pm »
short answer - yes
I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline LEECH666

  • Frequent Contributor
  • **
  • Posts: 398
  • Country: de
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1089 on: February 29, 2012, 04:15:40 pm »
Okay, looks like it worked.

I know this is probably redundant information, but here is what I did to get a firmware dump:

1 - downloaded fw_backupV3a.zip that can be found in this post from tinhead.
2 - extracted the file special_secret_dst1kb_9.99.9_cli(200101.1).up from the folder \universal\ to my USB stick.
3 - turend on my scope and went to the utility  menu by pushing the utility button
4 - pressed the F2 key to start a firmware update
5 - hooked my USB stick to the front USB port of my Voltcraft DSO-3062C scope.
6 - continued the firmware dump process by pressing F5 key
7 - renamed special_secret_dst1kb_9.99.9_cli(200101.1).up to dst1kb_9.99.9_cli(200101.1).up as mentioned on the bottom of this post by tinhead. (Because the update process gave me errorcode 0xFE)
8 - repeated step 3 to 6
9 - copied the newly created .\dump\ folder which contains the files boot.bin, kernel.bin and root.bin some place safe (on my Windows desktop, lol)

Maybe this will be of help for someone else.
 

Offline walt

  • Contributor
  • Posts: 42
  • Country: ua
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1090 on: February 29, 2012, 05:45:57 pm »
few people have mentioned that the especialy last 2 firmwares 2.06.3 (111226.1) and 2.06.3(120112.1)
when crashing they damaging the setup file (/param/sav/run1kb*).

And me  :-[

tinhead, I find solve problem with "no place for firware update"
I downgrade to
https://www.eevblog.com/forum/general-chat/hantek-tekway-dso-hack-get-200mhz-bw-for-free/msg63001/#msg63001
and upgrade firmware beck to last official via console
 ALL saved picture folder, like Hantek_xx, appeared in /mnt/ folder    :o
After manually remove its, upgrade from usb storage is ok.

But remove its from GUI is impossible, or I dont now how. After press "save to usb", picture saved to usb and create copy of file in /mnt/ directory  ::) 

You may create script for clear /mnt/ directory, when DSO start ?
 

Offline tinheadTopic starter

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1091 on: March 01, 2012, 03:15:11 am »
walt,

I quickly compiled (based on the already here posted USB hack tool )
a DSOExec tool. It will in principle execute every command you type in edit box on the DSO.

so let say to cleanup /mnt just type rm -r /mnt/* and you ready.

I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline walt

  • Contributor
  • Posts: 42
  • Country: ua
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1092 on: March 01, 2012, 10:57:11 am »
walt,

I quickly compiled (based on the already here posted USB hack tool )
a DSOExec tool. It will in principle execute every command you type in edit box on the DSO.

so let say to cleanup /mnt just type rm -r /mnt/* and you ready.

thats cool  :)
 

Offline stef_teta

  • Newbie
  • Posts: 3
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1093 on: March 01, 2012, 06:45:56 pm »
Hi,

I'm back on my debug work on the DST1102B !
My first post was here.

So I followed your advice, and in /mnt/ I found :

Code: [Select]
[root@Tekway-dso /]# ls -lh /mnt/
total 13507
drwxr-xr-x    1 root     root         512 Dec 28 22:04 tekway0_1
drwxr-xr-x    1 root     root         512 Dec 28 22:07 tekway0_2
drwxr-xr-x    1 root     root         512 Dec 28 22:09 tekway0_3
drwxr-xr-x    1 root     root         512 Dec 28 22:27 tekway10_11
drwxr-xr-x    1 root     root         512 Dec 28 22:28 tekway10_12
drwxr-xr-x    1 root     root         512 Jan  4 21:27 tekway13_1
drwxr-xr-x    1 root     root         512 Dec 28 21:41 tekway7_1
drwxr-xr-x    1 root     root         512 Dec 28 21:41 tekway7_2
drwxr-xr-x    1 root     root         512 Dec 28 21:42 tekway7_3
drwxr-xr-x    1 root     root         512 Dec 28 21:42 tekway7_4
drwxr-xr-x    1 root     root         512 Dec 28 21:43 tekway7_5
drwxr-xr-x    1 root     root         512 Dec 28 21:43 tekway7_6
drwxr-xr-x    1 root     root         512 Dec 28 21:45 tekway7_7
drwxr-xr-x    1 root     root         512 Dec 28 21:53 tekway8_1
drwxr-xr-x    1 root     root         512 Dec 28 21:54 tekway8_2
drwxr-xr-x    1 root     root         512 Dec 28 21:56 tekway8_3
drwxr-xr-x    1 root     root         512 Dec 28 21:57 tekway8_4
drwxr-xr-x    1 root     root         512 Dec 28 21:59 tekway8_5
drwxr-xr-x    1 root     root         512 Dec 28 21:59 tekway8_6
drwxr-xr-x    1 root     root         512 Dec 28 22:00 tekway8_7
drwxr-xr-x    1 root     root         512 Dec 28 22:00 tekway8_8
-rw-r--r--    1 root     root        5.0M Dec 28 22:11 tekwayRecord00.rec
-rw-r--r--    1 root     root        4.2K Dec 28 22:03 tekwaySetUp01.set
-rw-r--r--    1 root     root        4.2K Jan  4 21:28 tekwaySetUp130.set
-rw-r--r--    1 root     root        4.0K Jan  4 21:58 tekwaySetUp150.set
-rw-r--r--    1 root     root        4.2K Dec 28 21:59 tekwaySetUp80.set
-rw-r--r--    1 root     root        4.2K Dec 28 21:59 tekwaySetUp81.set
-rw-r--r--    1 root     root        4.2K Dec 28 21:59 tekwaySetUp82.set
-rw-r--r--    1 root     root        4.2K Dec 28 21:59 tekwaySetUp83.set
-rw-r--r--    1 root     root        4.2K Dec 28 22:02 tekwaySetUp90.set
-rw-r--r--    1 root     root       36.6K Dec 28 22:08 tekwayWaveData00.csv
-rw-r--r--    1 root     root       36.6K Dec 28 22:08 tekwayWaveData01.csv
-rw-r--r--    1 root     root       36.6K Dec 28 22:08 tekwayWaveData02.csv
-rw-r--r--    1 root     root       36.6K Dec 28 22:08 tekwayWaveData03.csv
-rw-r--r--    1 root     root       36.6K Dec 28 22:08 tekwayWaveData04.csv
-rw-r--r--    1 root     root       36.1K Dec 28 22:08 tekwayWaveData05.csv
-rw-r--r--    1 root     root       36.1K Dec 28 22:08 tekwayWaveData06.csv
-rw-r--r--    1 root     root       36.1K Dec 28 22:08 tekwayWaveData07.csv
-rw-r--r--    1 root     root       36.0K Dec 28 22:43 tekwayWaveData101.csv
-rw-r--r--    1 root     root        3.4M Jan  4 21:28 tekwayWaveData130.csv
-rw-r--r--    1 root     root       35.2K Jan  4 21:33 tekwayWaveData131.csv
-rw-r--r--    1 root     root        4.3M Jan  4 21:50 tekwayWaveData135.csv
-rw-r--r--    1 root     root        6.0K Jan  4 21:56 tekwayWaveData141.csv
[root@Tekway-dso /]#

As it seems to be a little weird for me, I would like to know what's the "normal" output of ls -lh /mnt/
Cause it seems to me that there is to many files, which can be the cause of my problem.

Thanks for your answers :)
 

Offline tinheadTopic starter

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1094 on: March 01, 2012, 06:50:11 pm »
So I followed your advice, and in /mnt/ I found :

ups, a lot of snapshots and csv exports

As it seems to be a little weird for me, I would like to know what's the "normal" output of ls -lh /mnt/

normaly (means when there is NO USB flash/harddrive mounted/inserted into front USB port)
you should not see anything there, /mnt should be empty.


I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline stef_teta

  • Newbie
  • Posts: 3
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1095 on: March 01, 2012, 06:52:18 pm »
Ok, I will delete all and see if it changes something.
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1096 on: March 01, 2012, 07:05:20 pm »
You know you are likely deleting your USB memory stick when deleting the contents of /mnt ?
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline nordiste

  • Newbie
  • Posts: 6
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1097 on: March 01, 2012, 10:36:12 pm »
hi,
tinhead, you make a very good stuff and very usefull program with the reset program.
i have idea for update for this program
why not make reset with pressed key at startup instead of putting USB key with good file ?
thanks,
marc
 

Offline tinheadTopic starter

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1098 on: March 02, 2012, 01:28:48 am »
why not make reset with pressed key at startup instead of putting USB key with good file ?

this is what i would like to see developed by the manufacturer, i've contacted my contact person
and he forwarded this request already to HanTekway.

Now you might ask why, well very simple. Look on the schematics, none of the keys are connected to
SoC directly (which would be great and piece of cake from coding point of view), they connected to FPGA.
Still not big deal, but we don't know much about. It will costs time to reverse and analyze the FPGA init code,
the keyscan code. Sure , in principle when we not sure with the init (or not sure if the FPGA will still work
properly when wwe init wrong) the of course we can reload the FPGA design before dso.exe will be loaded.

But honestly, the manufacturer is having all this information and for them to compile a small executable
watching the "default button" key is piece of cake!, they need only to copy/paste view lines and recompile it.
They complied and loaded bugy firmware (once again) so in my opinion they have to fix this.
I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline walt

  • Contributor
  • Posts: 42
  • Country: ua
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #1099 on: March 02, 2012, 03:42:08 pm »
So I followed your advice, and in /mnt/ I found

I have the same problem.
It seems some-what firmware bug unmounting removable media

Now you might ask why, well very simple. Look on the schematics, none of the keys are connected to
SoC directly (which would be great and piece of cake from coding point of view), they connected to FPGA.

Boot with the default, 3-5 seconds to ask whether you want to boot with default config. if the "by default" button is not pressed , read settings from the flash
something like that.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf