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

kmarty and 12 Guests are viewing this topic.

Offline carloscuev

  • Regular Contributor
  • *
  • Posts: 122
  • Country: mx
    • Spanish Freescale Developers Forum
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #650 on: June 30, 2011, 04:15:36 am »
ready compiled update file for Tekway DSOs only (with patched 512k/1M CSV export and updated help file)

Thank you very much Tinhead !
 

Offline rf-loop

  • Super Contributor
  • ***
  • Posts: 3070
  • Country: cn
  • Starting with DLL21
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #651 on: June 30, 2011, 06:57:05 am »
ready compiled update files for Hantek DSOs only (with patched 512k/1M CSV export and updated help file)

Thank you very much tinhead about nice work!
I hope that the company Hantek also like to thank and appreciate the work you've done.
If practice and theory is not equal it tells that used application of theory  is wrong or the theory itself is wrong.
It is much easier to think an apple fall to the ground than to think that the earth and the apple will begin to move toward each other and collide.
 

Online Pinkus

  • Frequent Contributor
  • **
  • Posts: 607
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #652 on: June 30, 2011, 08:00:53 am »
Mmmmh - first bug found where the scope always crashes??
· Press button "Display"
· Choosing XY instead of YT immediately chrashes my scope.
Hardware: Hantek5102B, pimped to 5202B
HW 10005 (blue PCB), latest FW (110531.1. from Tinheads files dst1kb_2.06.3_15202b_fact)
Can somebody verify that this crash happens everywhere?

One more questions:
I noticed, that in my terminal program the scope says:
root@Tekway-dso /]#
I assume that is OK ??

Update: Logfile (RS232 output) is attached
« Last Edit: June 30, 2011, 08:12:59 am by PeterK13 »
 

Offline tinhead

  • Super Contributor
  • ***
  • Posts: 1905
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #653 on: June 30, 2011, 08:09:19 am »
Thank you very much tinhead about nice work!
I hope that the company Hantek also like to thank and appreciate the work you've done.

you welcome.

You mean is it time to ask for free Hantek Handheld DSO ? Or maybe one of the new DSO5000BMV series?
Probably i should, support costs always money. However, they know my address and my real name, so up to them.


As i said BMV series, do you noticed they updated series ? Long memory now with 2M instead of 1M, build-in 2GB flash card.
http://www.hantek.com.cn/english/produce_list.asp?unid=134
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 tinhead

  • Super Contributor
  • ***
  • Posts: 1905
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #654 on: June 30, 2011, 08:22:43 am »
Mmmmh - first bug found where the scope always crashes??
· Press button "Display"
· Choosing XY instead of YT immediately chrashes my scope.
Can somebody verify that this crash happens everywhere?

yes, i noticed it too. It does have something to do with an overflow during channel activation.
However it works perfect if you enable (just turn on, it does not matter if then on AC/DC/GND) both channels
or actually disable (turn off) both channels before you enable XY mode.

A small bug only, normally you will anyway enable both channels, setup coupling etc. before you go to XY.


One more questions:
I noticed, that in my terminal program the scope says:
root@Tekway-dso /]#
I assume that is OK ??
yes, don't care about that. That's historical thing, both companies belongs to sahe share holders and dev team is also shared,
probably Hantek could update root fs and change hostname, but normally enduser have nothing to do there.
« Last Edit: June 30, 2011, 08:35:33 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 rf-loop

  • Super Contributor
  • ***
  • Posts: 3070
  • Country: cn
  • Starting with DLL21
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #655 on: June 30, 2011, 09:26:31 am »
Mmmmh - first bug found where the scope always crashes??
· Press button "Display"
· Choosing XY instead of YT immediately chrashes my scope.
Hardware: Hantek5102B, pimped to 5202B
HW 10005 (blue PCB), latest FW (110531.1. from Tinheads files dst1kb_2.06.3_15202b_fact)
Can somebody verify that this crash happens everywhere?

One more questions:
I noticed, that in my terminal program the scope says:
root@Tekway-dso /]#
I assume that is OK ??

Update: Logfile (RS232 output) is attached

Also with original hantek factory installed 110531.1 FW and version 7 HW (original unmodified DSO5062B and also unmodified DSO5102B)

(BTW it is same type crash what happend with measure menu if use help... (--> Killed.)  Scope did not loose his mind... after crash it follow UART commands.
totally different if compare example zoom window crash in old FW... what is really crash)

So problem is in original Hantek FW and also with new ver 7 HW.

Both Channels off or on, no crash. Only one on -> Killed (not crashed to random but need still power off/on if terminal is not connected to uart.
« Last Edit: June 30, 2011, 11:51:18 am by rf-loop »
If practice and theory is not equal it tells that used application of theory  is wrong or the theory itself is wrong.
It is much easier to think an apple fall to the ground than to think that the earth and the apple will begin to move toward each other and collide.
 

Offline flodins

  • Contributor
  • Posts: 40
  • Country: pl
    • flodins.info
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #656 on: June 30, 2011, 07:27:13 pm »
tinhead

Do you know what toolchain they used in hantek? I'm still trying to run chroot on scope.
 

Offline rf-loop

  • Super Contributor
  • ***
  • Posts: 3070
  • Country: cn
  • Starting with DLL21
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #657 on: June 30, 2011, 07:39:07 pm »
NOTE!

Do not use this new here shared 110531.1 FW (tinhead shared  .up) for new HW version 10070 scopes.

this time it is not compatible without some adjustment/repair.

Only for HW 10050 and below afaik.

(original factory installed 110531.1 works of course with new 10070 HW)

« Last Edit: June 30, 2011, 07:47:18 pm by rf-loop »
If practice and theory is not equal it tells that used application of theory  is wrong or the theory itself is wrong.
It is much easier to think an apple fall to the ground than to think that the earth and the apple will begin to move toward each other and collide.
 

Offline tinhead

  • Super Contributor
  • ***
  • Posts: 1905
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #658 on: June 30, 2011, 08:04:37 pm »
NOTE!

Do not use this new here shared 110531.1 FW (tinhead shared  .up) for new HW version 10070 scopes.

this time it is not compatible without some adjustment/repair.

Only for HW 10050 and below afaik.

(original factory installed 110531.1 works of course with new 10070 HW)


right, sorry i forgot to tell this because in principle all hw1007 boards have exact the same firmware version .. of course except fixed help file and patched dso.exe to support larger CSV export ... now i see the problem, if someone having
hw1007 try to update over existing "same" firmware then of course the DSO will stop to work properly.

The reason is actually very simple, the update script don't know "yet" hw1007, so it will copy wrong FPGA design.
This will not damage the hardware, but the firmware will not work properly.

In such case you have to:
- copy attached file to USB stick
- insert stick into DSO
- connect over UART
- run this killall dso.exe
- run cp /mnt/dn.rbf /
- run chmod 777 /*
and then start the dso application by typing /dso.exe

as far i can see this should be sufficient.

I case you tried to "fix" with self-calibration you will have to run it again after these steps in above.


Some tech. background:

Since hw1007 the firmware (dso.exe) is checking the hardware revision within few functions and calling in a different
way the FPGA. So if the eeprom/board are 1007 everything fine as long the fpga design is from hw1007.
Now what here happens is that the update script don't know yet hw1007 and definitely copied older fpga design file
overwriting the 1007 version, which of course don't have new functions implemented and the DSO is getting "crazy".
Therefore this simple fix - restore of hw1007 fpga design file (dn.rbf) should helps out.

Even if there is some backward compatibility (actually the dn.rbf from hw1007 works on hw0 too), i would
not recommend to use different version than the one designed for the specific hw revision.
We can test many things, but we don't have view into the sources, so it might be dangerous mixing versions.

The executable itself (dso.exe) is a different story, Hantek will probably some day drop support for hw 0,
but as of now they still supporting and developing only one executable file for all models (even these 500MSs models have the same dso.exe file) and all hw revisions.
« Last Edit: June 30, 2011, 08:30:19 pm 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 tinhead

  • Super Contributor
  • ***
  • Posts: 1905
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #659 on: June 30, 2011, 09:24:02 pm »
Thank you very much tinhead about nice work!
I hope that the company Hantek also like to thank and appreciate the work you've done.

you welcome.

You mean is it time to ask for free Hantek Handheld DSO ? Or maybe one of the new DSO5000BMV series?
Probably i should, support costs always money. However, they know my address and my real name, so up to them.



... and now you can write "Don't count your chickens before they hatch"

Actually i was thinking maybe for 5sec. about the update script compatibility with hw1007 ... but at that time i
wasn't thinking about compiled update files, instead of that i posted  files for manual update ...
and later as i finally decided (on request .. yeah, not my fault :P) to compile all these files i was not thinking
anymore about hw1007/update script potenatial compatibility issue .. here we go.
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 tinhead

  • Super Contributor
  • ***
  • Posts: 1905
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #660 on: June 30, 2011, 10:15:08 pm »
tinhead

Do you know what toolchain they used in hantek? I'm still trying to run chroot on scope.

i tell you something, with different linux you will probably get some issues with lcd , definitely with usb,
we don't know the i/o nor memory mapping of cpld and fpga ... so we running blind.

If you need to compile kernel modules for this board, a good starting point is QQ2440 2.6.13 toolchain, gcc 2.95.3 OABI
(however i complied mtd utils with 3.4.1 EABI). A good idea is to look for firendlyarm2440, mini2440, qq2440, tq2440 boards
and 2.6.13 sources/cross toolchains, many things are already really ancient but you will still find them
(someone posted in this thread link for Q2440 sources).

This will work for all things except new hardware like wifi-sticks (ok, there are some working exceptions).

« Last Edit: June 30, 2011, 10:25:51 pm 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 flodins

  • Contributor
  • Posts: 40
  • Country: pl
    • flodins.info
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #661 on: July 01, 2011, 01:20:52 am »
tinhead

Do you know what toolchain they used in hantek? I'm still trying to run chroot on scope.

i tell you something, with different linux you will probably get some issues with lcd , definitely with usb,
we don't know the i/o nor memory mapping of cpld and fpga ... so we running blind.

If you need to compile kernel modules for this board, a good starting point is QQ2440 2.6.13 toolchain, gcc 2.95.3 OABI
(however i complied mtd utils with 3.4.1 EABI). A good idea is to look for firendlyarm2440, mini2440, qq2440, tq2440 boards
and 2.6.13 sources/cross toolchains, many things are already really ancient but you will still find them
(someone posted in this thread link for Q2440 sources).

This will work for all things except new hardware like wifi-sticks (ok, there are some working exceptions).

There is no problem with usb or lcd, framebuffer test works, I can display anything on screen. I can't make busybox or other binutils working. Then I whant to put X11 on screen and run some soft with GUI
« Last Edit: July 01, 2011, 01:22:27 am by flodins »
 

Offline tinhead

  • Super Contributor
  • ***
  • Posts: 1905
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #662 on: July 01, 2011, 10:03:10 am »
There is no problem with usb or lcd, framebuffer test works, I can display anything on screen. I can't make busybox or other binutils working. Then I whant to put X11 on screen and run some soft with GUI

you misunderstood me, i'm talking about possible DSO application issues not about the hardware itself.
On the hardware level itself you can install whatever, WinCE, µCOS, RTOS, *nix - this is Samsung SoC S3C2440
board + DSO extras.

But there might be an issue when the dso.exe tries to access LCD or accessing USB for DSO<->PC communication or general issues trying to access i/o and mapped memory. Just look into /dso/drivers directory and you will see why drivers you
will need to rebuilt without sources. Sure, maybe these original drivers will work with tainted kernel, but if not
you will have do recompile them .. and we don't have source code for them. And sure, you could disassemble them and recompile, but that's might not work either if you do it wrong.

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 flodins

  • Contributor
  • Posts: 40
  • Country: pl
    • flodins.info
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #663 on: July 02, 2011, 12:50:23 am »
Now I know that they use crosstool-0.27 gcc 2.3.2 and glibc 3.4.1 to Fedora Core 4 system (: oh source code could save lot of time, How did you know about "rgj" developer?
 

Offline rf-loop

  • Super Contributor
  • ***
  • Posts: 3070
  • Country: cn
  • Starting with DLL21
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #664 on: July 02, 2011, 08:53:22 am »
Now I know that they use crosstool-0.27 gcc 2.3.2 and glibc 3.4.1 to Fedora Core 4 system (: oh source code could save lot of time, How did you know about "rgj" developer?

This time whole scope was  Tekway. Small company who first copy some Tektronix extremely poor model but after then they develop new scope. They sell also scopes to organization under PLA.


But this kind of fun can also today find inside FW:

"
#2007-9-29  by rgj
if [  -f /$1 ]; then
        echo "have dso_update.exe"
        if [ -f /dso.exe ]; then
                mv /$1 /dso.exe
                echo "do backup and update the sysytem"
        fi
else
        echo "no update file to foud"
fi
echo "now run app ....."
exit 1
« Last Edit: July 02, 2011, 08:56:52 am by rf-loop »
If practice and theory is not equal it tells that used application of theory  is wrong or the theory itself is wrong.
It is much easier to think an apple fall to the ground than to think that the earth and the apple will begin to move toward each other and collide.
 

Offline Gall

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: ru
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #665 on: July 04, 2011, 06:00:14 am »
i tell you something, with different linux you will probably get some issues with lcd , definitely with usb,
we don't know the i/o nor memory mapping of cpld and fpga ... so we running blind.
Haven't you tried to determine this?

Most likely the peripherals are occupying whole memory banks (nGCS#x) for simplicity. One memory bank of S4C2440 is 128M, and it is quite probbale that the DSO's memory is just mapped to S3C2440's address space. Another memory bank may be used for control registers ant it may be that only 2-3 least significant bits are used while MSBs are completely ignored, resulting in 4-8 io ports occupying the whole 128M bank.

Did you make any other hires photos of the board with components unsoldered? May be we can run the kernel debugger?
The difficult we do today; the impossible takes a little longer.
 

Offline tinhead

  • Super Contributor
  • ***
  • Posts: 1905
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #666 on: July 05, 2011, 06:04:44 pm »
Haven't you tried to determine this?

Most likely the peripherals are occupying whole memory banks (nGCS#x) for simplicity. One memory bank of S4C2440 is 128M, and it is quite probbale that the DSO's memory is just mapped to S3C2440's address space. Another memory bank may be used for control registers ant it may be that only 2-3 least significant bits are used while MSBs are completely ignored, resulting in 4-8 io ports occupying the whole 128M bank.

i know how this works, it was just a simplified answer who just trying to update Linux version without
deep hadrware knowledge.

Did you make any other hires photos of the board with components unsoldered?

no, not yet. I got some broken boards so i will finalize schematics of hw0 soon.
Unfortunately boundary san was not working properly for all pins (like adress bus, etc.)

May be we can run the kernel debugger?

afaik there is no integrated kernel debugger in 2.6.13

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 tinhead

  • Super Contributor
  • ***
  • Posts: 1905
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #667 on: July 05, 2011, 07:33:43 pm »
For those who have 2.06.3 (110531.1) installed:

I did modified the English.lan which is the menu file if you specify English UI.

The changes are in principle everywhere, typo corrections, naming changes from chinese-english translation to
proper good-known names, word-wrap fix to all message boxes (Probe check, Firmware updates etc...),
warnings and error messages and so on.

Not that i can't work with "regular" instead of "Pass/Fail mask" or "Open" instead of "Run" or "On",
but it makes definitely sense to not spend time for guessing what the function is actually doing.

Attached two update files:
dst1kb_2.06.3_newlang(110531.1).up - this one is with the proper English
dst1kb_2.06.3_orglang(110531.1).up - this one is the original one, in case you wish to restore back for whatever reason

The update works on both Tekway and Hantek models (update is not model dependant), however
please do not install it if you have different firmware version than 2.06.3 (110531.1) as it might breaks something.

If you like it let me know, maybe Hantek/Tekway will implement it into the next official firmware version.

« Last Edit: July 06, 2011, 01:28:59 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 jellytot

  • Contributor
  • Posts: 30
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #668 on: July 06, 2011, 10:33:56 am »
Thanks Tinhead. Thats a huge improvement, I think that Hantekway would only be too grateful
to have this work done for them...I hope they do use it in future builds.. :)
 

Offline rf-loop

  • Super Contributor
  • ***
  • Posts: 3070
  • Country: cn
  • Starting with DLL21
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #669 on: July 06, 2011, 12:30:15 pm »
Yes, really nice work. Thanks!
If practice and theory is not equal it tells that used application of theory  is wrong or the theory itself is wrong.
It is much easier to think an apple fall to the ground than to think that the earth and the apple will begin to move toward each other and collide.
 

Offline jyo

  • Newbie
  • Posts: 4
  • Country: fr
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #670 on: July 06, 2011, 02:15:53 pm »
Great job, tinhead. Oscar of the best DSO hacker! ;)
But we are not in Kansas, true? What about a french langage update?
I'm interested by everything.
Are everythings interested by me?
 

Offline walt

  • Contributor
  • Posts: 42
  • Country: ua
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #671 on: July 06, 2011, 03:34:53 pm »
Hi guy`s!

I read tinhead post about DC/DC converter on 3.3V.

Most easy and low cost way its magamp in current fly-back PSU. Like in standard ATX PSU on 3.3v rail.
No linear IC (~1$), same diode, little more big capacitor and inductor.
And no heat.


By the way, If  add capacity to existing smoothing inductor to form a parallel oscillatory circuit with a frequency converter can be greatly reduced noise frequency conversion.
   
« Last Edit: July 06, 2011, 04:51:00 pm by walt »
 

Offline JRoque

  • Newbie
  • Posts: 4
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #672 on: July 06, 2011, 09:13:23 pm »
Hello all. I had to register to thank tinhead for his help. I purchased a Chinese version of the DST1102B for USD $580 including - get this - next day shipping! They sent me a Chinese AC plug but that's fine. The USB port in the back doesn't work.. yikes. They also sent me a front panel sticker in English.

I went through all of this thread and nothing seemed to work. Oh the scope was complaining about something but I have no idea what it was. I got to the last page and found out that my 10070 hw version scope, already with 2.06.3 fw wouldn't take the same fw again. The last file updated by honorable and oh wise one tinhead did it and now my UI is in English.

BTW, my PC complains about an unrecognized device being plugged in. I've seen this issue before with my own USB devices where I've missolder (a word?) the USB chip or a short is drawing too much current. Now that my menu is readable (to me), I'll see what else I find. But this will likely be a hardware issue with the scope USB driver chip - and there goes any savings I had by buying direct from China :-)

Regards,
JR
 

Offline tinhead

  • Super Contributor
  • ***
  • Posts: 1905
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #673 on: July 06, 2011, 10:35:15 pm »
first of all try to find out what king of message you saw on the screen ...

Regards the USB, well the transciever is integrated into the main µC (Samsung S3C2440), this is a BGA chip so it
might be soldering issue (PB-free sucks). However, it might be something else too (like a cold soldered series resistor
between BGA chip and USB plug, or cable).

Btw,you should connect the DSO to PC after the DSO fully started-up, this is because of the fact that the S3C2440
will send different VID/PID during boot process (actually this is coming from the bootloader) and laetr different one
after Linux on the DSO started-up.

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 JRoque

  • Newbie
  • Posts: 4
Re: Hantek - Tekway - DSO hack - get 200MHz bw for free
« Reply #674 on: July 06, 2011, 11:52:49 pm »
Hi. My guess is that the messages I was seeing before were related to the firmware conflict. They were red in color, does that help? 8=)

I got it to connect... sort of. I powered it off, disconnected it from mains and waited 5 mins (switched on for max drain). I then plugged AC in and booted it. After about 30 seconds I plugged it into the PC and no error! It now says "Tekway Measurement Device" in Windows Device Manager. I launch TTScope and it connects to the scope but it says: "No exsit [sic] configuration files to this machine!", whatever that means. The only thing that seems to work is the "Auto Set" function from the Setup list.

I'm going to try your suggestion of waiting a couple of minutes after booting to see if that helps.

Regards,
JR

PS: I rather shoot myself in the foot than trying to replace a PB-free BGA. Thanks for the warning.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf