Author Topic: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!  (Read 243258 times)

0 Members and 1 Guest are viewing this topic.

Offline markone

  • Frequent Contributor
  • **
  • Posts: 730
  • Country: it
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #375 on: November 22, 2014, 08:28:37 pm »
@ andrija :

have you tried to use & verify FM modulation on sine signals ?

With my "Toy" i obtain one of the following results :

- no modulation at all
- wrong modulation
- BSOD, followed by reset loop followed by Recovery Request

I would also ask if your instrument keeps the very screen intensity parameter that you set under system setting menu.

Mine changes it on quitting the menu, re-booting the device and so on.
 
 

Offline andrija

  • Regular Contributor
  • *
  • Posts: 64
  • Country: ca
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #376 on: November 22, 2014, 09:15:36 pm »
I just played with it for a bit. External modulation does not work, either FM or AM (I used the second channel and connected it to MOD jack). Internal modulation kind of works, but almost every time I get a different behaviour for the same setting. Sometimes it does not work at all, sometimes I get one kind of waveform and sometimes another. My Rigol 2072A also likes to lock up often when viewing it. Anyhow it seems it behaves similar to yours except I didn't get any BSOD at all, just basically a random result every time you're in that menu (and it changes when you reboot, too). Like a said, a toy.
 

Offline markone

  • Frequent Contributor
  • **
  • Posts: 730
  • Country: it
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #377 on: November 23, 2014, 12:26:40 am »
Many thanks andrija,

at least now i know it's not my peculiar instrument fault.

So, as i already said, this instrument is currently sold even if the firmware is still in beta stage (at best).

Not fair at all.

PS : BSOD with FM mod occurs with particular parameters combination
« Last Edit: November 23, 2014, 12:46:27 am by markone »
 

Offline markone

  • Frequent Contributor
  • **
  • Posts: 730
  • Country: it
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #378 on: November 23, 2014, 01:02:46 am »
Just to finalize my lame, in attachment some sync output glitch screenshots, present when sine signal freq is below 500Khz  :palm:

 

Offline andrija

  • Regular Contributor
  • *
  • Posts: 64
  • Country: ca
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #379 on: November 23, 2014, 04:23:29 am »
I don't seem to be able to reproduce that, but my sync signal is very jittery above 1MHz, as is the actual signal above 10 or so. I managed to lock up Rigol's front panel doing that, too. Screen was updating but no buttons were working at all, except power button.
 

Offline markone

  • Frequent Contributor
  • **
  • Posts: 730
  • Country: it
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #380 on: November 23, 2014, 05:40:57 pm »
I don't seem to be able to reproduce that

It should be matter of FW / PCB version (see my first post)  or signal parameters.

I too have jitter, as you can spot in one of mine screenshot.

Try with a sine signal, single channel operation, decreasing frequency from 500Khz to lower values, putting the reading scope to 20ns division, rise edge triggered.

 

Online Howardlong

  • Super Contributor
  • ***
  • Posts: 5341
  • Country: gb
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #381 on: November 23, 2014, 05:59:53 pm »
Mine crashes on demand if I press Arb.

AM works, with internal or external modulation.

FM works too, internal an external, Except the carrier is at half the requested frequency when modulation is enabled on the unit.
 

Offline andrija

  • Regular Contributor
  • *
  • Posts: 64
  • Country: ca
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #382 on: November 23, 2014, 08:09:02 pm »
My hardware and firmware are first version - last year in fact even though I bought it just recently - so that can explain differences. As far as I know I can't just upgrade firmware without serious hacking (is there even official firmware for these things? I've seen nothing).
 

Offline markone

  • Frequent Contributor
  • **
  • Posts: 730
  • Country: it
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #383 on: November 24, 2014, 12:24:30 pm »
Mine crashes on demand if I press Arb.

AM works, with internal or external modulation.

FM works too, internal an external, Except the carrier is at half the requested frequency when modulation is enabled on the unit.

No crash with ARB but i too have half frequency carrier with FM mod engaged.

Howardlong, could you report your HW / FW version ?
 

Offline fremen67Topic starter

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: fr
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #384 on: November 29, 2014, 01:24:02 am »
After some digging in the code and some tests, here is what I found regarding the update process of the HDG:
- The name of the update file that the HDG is looking for when you want to update from the utility menu has to start with afg and has to have the .upk extension: "afgxxxxx.upk"
- The update actions have to be described in a xml file named "Manifest.xml" which has to be in a "package" directory.
- Hereafter an example of what the Manifest.xml file can include:
Code: [Select]
<manifest factory="yes">
        <Vendor name="hantek"></Vendor>
        <Product name="FGen"></Product>
        <Model name="HDG2002B"></Model>
        <SoftwareVersion version="0.00.0"></SoftwareVersion>
        <date value="000000.0"></date>
        <cmd>touch /update.ok</cmd>
        <cmd>cp /tmp/package/afg_update /</cmd>
</manifest>
If factory <> "yes" then Vendor, Product name, Model name have to match those on your HDG, SoftwareVersion has also to be greater and date newer than the firmware on your HDG.
If factory="yes", all this informations are just taken from the update file and not tested with the one on your HDG.
You can also just ommit those tags.
The most interesting part is the "cmd" tags which allow you to run commands directly from your update package. The 2 cmd commands above are of course just examples and you can insert as many commands as you like.
Your "package" directory should than be tared 2 times in "afg.upk.tar" and then in "afg.upk.tar.bz" , then encrypted with gpg using "afg369" as passphrase and finally renamed in something like afgxxx.upk.
In the following example, my "package" directory is in /mnt/sd/tmp:
Code: [Select]
tar cvf afg.upk.tar ./package
tar cvzf afg.upk.tar.bz ./afg.upk.tar
cd /
gpg --passphrase afg369 -c /mnt/sd/tmp/afg.upk.tar.bz
cd /mnt/sd/tmp
cp afg.upk.tar.bz.gpg afg_test.upk
You just have after that to go to the update menu in utility and select you afgxxxx.upk file as input for the update.
Your file will be copied by the HDG to /tmp, decrypted with gpg and untared 2 times and then Manifest.xml will be parsed.
After the update the HDG will reboot.
When booting, the HDG checks if there is an "afg_update" file in /. If it founds it, il will run it and then remove it. It is mainly intended to replace afg_bin after an update (commands during updates are launched from afg_bin so it can't be removed a that time) but you can use it to do whatever you like.
As an example, I have attach afg_HDG2002B_to_HDG2102C.upk (zipped) which replaces HDG2002B with HDG2102C in /config/root/system.inf... Guess why  ;)
« Last Edit: January 02, 2015, 11:15:10 pm by fremen67 »
I'm a machine! And I can know much more! I can experience so much more. But I'm trapped in this absurd body!
 

Offline zelea2

  • Regular Contributor
  • *
  • Posts: 61
  • Country: gb
Change the boot logo
« Reply #385 on: December 03, 2014, 03:38:44 am »
Hi, I've written a little C program to extract and patch the logo in Hantek HDG and DSO devices. First you need to dump your mtd partitions (do not include the OOB regions in your dumps) on a USB stick with the nandump utility from your serial console. The kernel is stored in mtd2 for DSOs and mtd4 for HDGs. The boot logo is stored in the kernel (directly into the framebuffer code) in mtdX. Once you've got your partition image you can then extract, modify and patch back the start logo. The mtdX has no filesystem it is just the compressed kernel with a stub to decompress it in memory. The logo is stored as 16bit RGB565 values and one can binary patch the kernel without the need to recompile everything.

'dso-logo mtdX' will create logo.ppm which you can edit with the graphic program of your choice. My little program uses the fact that the first and last lines of the logo are of the same uniform color to detect the position of the logo inside the binary. When I recompress the kernel I use 7z instead of gzip because it has a much better compression ratio and you can draw a lot of things on your logo. If  you want to load JPEGs on your logo most likely the compressed size will overflow and the patch will fail. The kernel.gz is right at the end of mtdX followed only by a short structure so there is plenty of space there but if it overflows I'll have to patch a few more addresses in the stub and I didn't want to change too many things.

'dso-logo -w mtdX' will encapsulate the modified logo.ppm back into the kernel and will patch the mtdX partition image.

If you press 'Space' while your device is booting you enter the following uboot menu:
Code: [Select]
#####    Boot for SKY2416/TQ2416 Main Menu      #####
#####     EmbedSky USB download mode     #####

[1] Download u-boot or STEPLDR.nb1 or other bootloader to Nand Flash
[2] Download LOGO (logo.bin) to Nand Flash
[3] Erase the MISC partion
[4] Download Kernel (kernel.bin) to Nand Flash
[5] Download UBIFS image (rootfs.ubi) to Nand Flash
[6] Download Kernel_bk (kernel_bk.bin) to Nand Flash
[7] Download UBIFS image (recover.ubi) to Nand Flash
[8] normal start!
[9] recover start!
[0] Set the boot parameters
[f] Format the Nand Flash
[a] Download User Program
[c] Download Config(config.ubi).
[n] Enter TFTP download mode menu
[r] Reboot u-boot
[t] Test Linux Image (zImage)
Enter your selection: t
Now, Please connect to USB cable and USB interface!
USB cable Connected!
Now, Waiting for DNW to transmit data.

Now, Downloading [ADDRESS:0xc0008000,TOTAL:0x400000]
Please waiting ................................................................Download Done!!
Download Address: 0xc0008000, Download Filesize:0x400000
Now, Checksum calculation....Checksum O.K !!!
Boot with zImage

Use the dnw program to send the modified mtdX partition (the zImage kernel) to your function generator. The linux version of this program is here:
Code: [Select]
git clone https://github.com/changbindu/dnw-linux.gitFirst time press 't' just to test that everything works properly. Once you are happy, after another reboot, you can press '4' to pernanently store the new kernel in flash.
Attached is a photo of my new boot logo.
 

Offline rosasharn

  • Regular Contributor
  • *
  • Posts: 114
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #386 on: December 08, 2014, 08:49:13 am »
How about using my own background picture for logo?
 

Offline 6E5

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #387 on: December 17, 2014, 02:01:41 am »
I'm thinking about getting the Hantek just for this purpose, but I never really followed the earlier DSO thread and this thread. With a combined length of 200 pages, it's very overwhelming.

Could someone just give me a list of things to do to get this hack to work? How can I make a backup of the NAND flash?
 

Offline rosasharn

  • Regular Contributor
  • *
  • Posts: 114
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #388 on: December 17, 2014, 05:39:53 am »
How to output white noise from function generator?
 

Offline Lightages

  • Supporter
  • ****
  • Posts: 4314
  • Country: ca
  • Canadian po
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #389 on: December 26, 2014, 05:41:45 pm »
I don't see any recent definitive answer after reading everything. Maybe I missed it. Is this still hackable as per the original post? Can it do logarithmic sweeps?
 

Offline scope sam

  • Newbie
  • Posts: 1
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #390 on: December 30, 2014, 01:09:24 am »
Recently I bought an HDG2082B, the manufacturer had given me a calibration software. The calibration procedure is as followed.



The total procedures are 104 steps. I have tested and successed at one time.

 

Offline zelea2

  • Regular Contributor
  • *
  • Posts: 61
  • Country: gb
LAN
« Reply #391 on: January 02, 2015, 08:45:48 pm »
I've just soldered the following components to enable ethernet on my HDG2000B series generator:
DM9000, 25MHz xtal, 2x22pF,  LAN1102 magnetics, ethernet connector.

When the system boots up I get the following trace:
dm9000 Ethernet Driver, V1.31
dm9000 dm9000: eth%d: Invalid ethernet MAC address. Please set using ifconfig
eth0: dm9000e at c4b22300,c4b24308 IRQ 48 MAC: a2:aa:fd:39:d3:74 (random)
dm9000 dm9000: eth0: link down
dm9000 dm9000: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

I've configured a static IP via the menu but when I try to ping it it's not working. The green LED is lit when I have the cable plugged in but I'm worried that I'might still missing some components. On the back of the PCB there are traces from the eth connector to U6,U7 and some other components that are missing.

Can someone with a working LAN let me know if I'm missing components or the IP menu configuration is not working?
 

Offline idpromnut

  • Supporter
  • ****
  • Posts: 613
  • Country: ca
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #392 on: January 02, 2015, 09:43:56 pm »
@zelea2: I compared the modifications that you did and the various bits and pieces on your PCB to mine, and it all looks the same (or very similar). I would recommend (since I ran into this), reflow the crystal; I had a problem with my soldering on this part and it caused the ethernet to not work in the manner you describe (although I didn't use a can like you did, I used a 4-pad SMD crystal).
 

Offline fremen67Topic starter

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: fr
Re: LAN
« Reply #393 on: January 02, 2015, 10:10:18 pm »
Can someone with a working LAN let me know if I'm missing components or the IP menu configuration is not working?
There are no more components to add.
Try to change directly the IP address in /dso/etc/boot.sh. It should be 192.168.1.127 by default:

ifconfig eth0 192.168.1.127 up

Not sure the modification through the utility menu will work after a reboot
Edit: could you post your Hardware&Software version?
« Last Edit: January 02, 2015, 10:11:57 pm by fremen67 »
I'm a machine! And I can know much more! I can experience so much more. But I'm trapped in this absurd body!
 

Offline fremen67Topic starter

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: fr
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #394 on: January 02, 2015, 10:12:58 pm »
Recently I bought an HDG2082B, the manufacturer had given me a calibration software. The calibration procedure is as followed.



The total procedures are 104 steps. I have tested and successed at one time.
Very interesting. Could you post the software or a link to it?
I'm a machine! And I can know much more! I can experience so much more. But I'm trapped in this absurd body!
 

Offline fremen67Topic starter

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: fr
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #395 on: January 02, 2015, 10:27:28 pm »
Is this still hackable as per the original post?
It is still hackable. If you have version 1.0.2, system.inf is now in /config/root

Can it do logarithmic sweeps?
Not directly. It is linear. You will have to download it as a user function
« Last Edit: January 02, 2015, 11:09:10 pm by fremen67 »
I'm a machine! And I can know much more! I can experience so much more. But I'm trapped in this absurd body!
 

Offline fremen67Topic starter

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: fr
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #396 on: January 02, 2015, 11:07:45 pm »
I'm thinking about getting the Hantek just for this purpose, but I never really followed the earlier DSO thread and this thread. With a combined length of 200 pages, it's very overwhelming.

Could someone just give me a list of things to do to get this hack to work? How can I make a backup of the NAND flash?
hack: system.inf modification (first post)
backup: https://www.eevblog.com/forum/testgear/hantek-hdg2002b-awg-5mhz-or-100mhz-let's-see!/msg476550/#msg476550
I'm a machine! And I can know much more! I can experience so much more. But I'm trapped in this absurd body!
 

Offline zelea2

  • Regular Contributor
  • *
  • Posts: 61
  • Country: gb
Re: LAN
« Reply #397 on: January 05, 2015, 06:33:32 pm »
Not sure the modification through the utility menu will work after a reboot
Edit: could you post your Hardware&Software version?

They don't; that was the problem. The IP is not remembered after a reboot. Now I have a working LAN which replies to ping (no other components were needed after all) but there is no service running on the generator (nmap returns no open ports). I'll probably need to modify some script next time when I open the case and hook my FTDI serial adapter and enable telnet. For now I have a useless LAN interface ;-)

@fremen67 My configuration is as follow:

Serial: DDS2300526
Memory: 64MB
PCB: 1004
Software: 1.00.2(140819.0)
Kernel: Linux 3.2.35
FPGA: 12
Keyboard: 3
Processor       : ARM926EJ-S rev 5 (v5l)
BogoMIPS        : 198.45
Features        : swp half fastmult edsp java
Hardware        : SMDK2416
 

Online Howardlong

  • Super Contributor
  • ***
  • Posts: 5341
  • Country: gb
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #398 on: January 05, 2015, 10:09:47 pm »
On my (fairly new) model, I modified the /dso/etc/boot.sh to bring up the Ethernet interface with a fixed IP address relevant to my LAN (ifconfig eth0 192.168.12.34 up) and added the telnetd daemon (telnetd &) so I didn't have to keep plugging in the serial port...

Code: [Select]
...
insmod /dso/driver/dm9000.ko
insmod /dso/driver/s3c-hsudc.ko
insmod /dso/driver/g_android.ko

insmod /dso/driver/tq2416_backlight.ko
insmod /dso/driver/tq2416_beep.ko

ifconfig eth0 192.168.12.34 up
/etc/init.d/nfs.sh &
telnetd &
/bin/hostname "anolis"

echo "1500">/proc/sys/vm/dirty_expire_centisecs
/dso/etc/alsa_node.sh
...
 

Offline fremen67Topic starter

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: fr
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #399 on: January 06, 2015, 12:06:09 am »
On my (fairly new) model, I modified the /dso/etc/boot.sh to bring up the Ethernet interface with a fixed IP address relevant to my LAN (ifconfig eth0 192.168.12.34 up) and added the telnetd daemon (telnetd &) so I didn't have to keep plugging in the serial port...
Yes that's the way to go. It was already activated like this in v1.00.1 but Hantek removed it in v1.00.2.
You said your model is fairly new: what hardware/software version do you have?

@zelea2: thank you for the information. The latest software version I saw right now is 1.00.2(140926.0) on PCB 1004.
I'm a machine! And I can know much more! I can experience so much more. But I'm trapped in this absurd body!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf