Author Topic: DG4000 - a firmware investigation  (Read 163565 times)

0 Members and 1 Guest are viewing this topic.

Offline noreply

  • Frequent Contributor
  • **
  • Posts: 279
  • Country: gb
Re: DG4000 - a firmware investigation
« Reply #425 on: August 06, 2020, 07:38:22 pm »
Not sure if this is going to be at all helpful, but I thought I should chime-in with regard to USB stuff.

I use (had no problems so far with a number of instruments) a Sandisk Ultra microSDHC UGS-I 32GB card

I put this 'card' into a usb adaptor - and the device 'looks like' a USB drive to the instrument.

I can then change the microSDHC cards - each different card with associated firmware / files / hacks - in the adaptor for each different instrument.

The cards are kept in a little 'box' dedicated for the storage of these devices - and they are cheap to buy <$10 and convenient to store.

Hope the above info is helpful.

The bonus element in the above is that if you want to 'retire' the microSDHC card from your USB applications - you can simply put it into a camera / smartphone and simply format - now you have a totally new use.

 

Offline PeDre

  • Regular Contributor
  • *
  • Posts: 186
  • Country: at
    • Private Website
Re: DG4000 - a firmware investigation
« Reply #426 on: August 07, 2020, 07:00:20 am »
I have tested different cards with my SD card adapter. All cards worked!
The adapter was bought at "Conrad", "Renkforce" is the house brand.

The cards were formatted in the adapter with the "SD Card Formatter 5.0.1" from www.sdcard.org. Only the option "Quick format" was used.

The cards up to 1 GB were formatted with FAT16 and 16 kB cluster size.
The cards with 2 GB were formatted with FAT16 and 32 kB cluster size.
The cards with 16 and 32 GB were formatted with FAT32 and 32 kB cluster size.

Important!
During testing I noticed that you have to press the help button very fast, otherwise the update will not work. And the DG4000 gets stuck with the three illuminated buttons.
I could check this several times with working cards.

Edit:
Information about the SD-Card adapter:

Device ID: USB\VID_048D&PID_1336\00000000000006
Hardware IDs: USB\VID_048D&PID_1336&REV_0100 USB\VID_048D&PID_1336

Device Descriptor:
bcdUSB:  0x0200
bDeviceClass:  0x00
bDeviceSubClass:  0x00
bDeviceProtocol:  0x00
bMaxPacketSize0:  0x40 (64)
idVendor:  0x048D (Integrated Technology Express)
idProduct:  0x1336
bcdDevice:  0x0100
iManufacturer:  0x01
0x0409: "Generic   "
iProduct:  0x02
0x0409: "Mass Storage Device"
iSerialNumber:  0x03
0x0409: "00000000000006"
bNumConfigurations:  0x01
« Last Edit: August 07, 2020, 09:36:47 am by PeDre »
 

Online tv84

  • Super Contributor
  • ***
  • Posts: 1947
  • Country: pt
Re: DG4000 - a firmware investigation
« Reply #427 on: August 07, 2020, 07:29:19 am »
Peter,

We have to take into account that your controller IC (which is in the reader) is always the same. So, in size/format investigation terms, is not totally clarifying.

During testing I noticed that you have to press the help button very fast, otherwise the update will not work.

This is one of the best conclusions from your test! We press a button to trigger an event. Why is it that the pressing speed is relevant to the triggering of the event?

In my opinion 2 reasons: bad programming in the trigger answering function or a problem with the event sequence timings of the processes triggered by the pressing.

 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 2656
  • Country: ro
Re: DG4000 - a firmware investigation
« Reply #428 on: August 07, 2020, 07:49:09 am »
I kept the 'Help' button continuously pressed, from the powered off state until 'Utility' starts to flash, like I wrote in my update log.

Code: [Select]
-DG4000Update.GEL should be copied alone on the clean formatted USB drive (mine was FAT32)
-To update FW
- insert USB with desired GEL file
- power down the DG4102
- keep the 'Help' button pressed while pressing the 'Power ON' button
- release the 'Help' button when 'Utility' button starts to flash
- from there, leave the unit running, the buttons will start to blink one by one, starting with 'Ramp'
- after about 10 minutes, the DG4000 will restart itself, firmware update is now done
-To see FW version press 'Utility' -> 'System' -> 'System Info'
-To see detailed version press 'Utility' -> 'System' -> 'System Info' -> 'G1' ->'G3' -> 'G5'
    where G1...G5 are the grey buttons on the right of the screen

Online tv84

  • Super Contributor
  • ***
  • Posts: 1947
  • Country: pt
Re: DG4000 - a firmware investigation
« Reply #429 on: August 07, 2020, 07:58:17 am »
I kept the 'Help' button continuously pressed, from the powered off state until 'Utility' starts to flash, like I wrote in my update log.

Do you have consistent behavior with that technique?

I hadn't notice your procedure. Based on the trigger speed reported by Peter, I think your method is a good option to try to replicate.  :-+
 

Offline PeDre

  • Regular Contributor
  • *
  • Posts: 186
  • Country: at
    • Private Website
Re: DG4000 - a firmware investigation
« Reply #430 on: August 07, 2020, 08:06:54 am »
If I hold down the help button when I turn on the DG4000, it will boot normally without starting the update.
I can only press the Help button after powering up for the update.

Edit:
System Info:
Device Model: DG4162
Serial Number: DG4D135100282
Software Version: 00.01.14.00.01
FPGA Version: 00.01.11.00
Hard Version: 01.01
Keyboard Version: 06.01
Enc FPGA Version: 05
« Last Edit: August 07, 2020, 08:22:17 am by PeDre »
 

Online tv84

  • Super Contributor
  • ***
  • Posts: 1947
  • Country: pt
Re: DG4000 - a firmware investigation
« Reply #431 on: August 07, 2020, 08:53:45 am »
If I hold down the help button when I turn on the DG4000, it will boot normally without starting the update.
I can only press the Help button after powering up for the update.

 :-DD    :palm:
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 2656
  • Country: ro
Re: DG4000 - a firmware investigation
« Reply #432 on: August 07, 2020, 09:32:35 am »
Do you have consistent behavior with that technique?

That's how I did when you taught me how to upgrade from DG4102 to DG4202, or at least that's what I wrote down:
https://www.eevblog.com/forum/testgear/dg4000-a-firmware-investigation/msg2829452/#msg2829452
 :-//

The generator says now it's a DG4202, and it can generate sine signals up to 200 MHz.  Since then, I didn't make any other firmware upgrade.  I'll try to remember to test at the next upgrade, and write back here if that behavior still happens.

The USB pen drive was an ADATA model UV100/4GB, formatted FAT32.

Might be hardware version related, IDK, my DG4102 was bought in Oct 2015, from Batronix.


Offline Wim13

  • Regular Contributor
  • *
  • Posts: 239
  • Country: nl
Re: DG4000 - a firmware investigation
« Reply #433 on: October 25, 2020, 10:23:48 am »
I upgraded my DG4102 from fw 1.08 to fw 1.14, but the upgrade was different from the attached upgrade document.

I had, fw 1.08 and bootloader 0.4,
(for new readers, the bootloader version is on the system info page, under keyboard version !?!?)

First i had to find a working USB stick i have several, a 256Mb did not work a 2 GB older type did work with FAT32.

I tried to change fw first without loading a new bootloader, to see waht happens,(nothing)
sometimes it did nothing and utility and store button stay on.
and sometimes all kind of buttons began to flikker, nice, but nothing worse happens.
Later i discovered that it had to do someting with the setting save last powerOn.

So i updated the bootloader, the file is only 166Kb, it took several minutes of flikkering utility button,
then suddenly the waveform buttons went on, and in a second later the unit rebooted by it self, but ..
no changes in the system info menu ??

So i turned the unit off and on again,...black screen !??, nothing, rebooted again
still nothing, then i noticed that the mod, utility and store button were on again.....

Loooks it was waiting for something, and could not load fw 1.08 with the new bootloader !!
Then i put the USB stick with the fw 1.14 in the unit and watched wath would happen.

The utitlity button began to flikker for lots of minutes...not much activity on the stick..
and then suddenly the ramp button light up, and the flikkering of utility stoped.

Well, slowly all waveform buttons lights went on....and finally it rebooted by it self,
and a happy end, all worked oke.

So the attached file is not correct, in my case, between loading bootloader and fw.









 

 

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 382
  • Country: gb
    • Me
Re: DG4000 - a firmware investigation
« Reply #434 on: October 26, 2020, 11:58:35 am »
Thank you for everyone's efforts on this thread, especially TV84. Having now gone through the steps here on my DG4062, and performed calibration as explained, on doing a sweep from 1MHz to 200MHz, I'm getting output which jumps up and down by about 5dB from 1MHz to about 30 MHz, is then flat ± 0.5dB to about 100MHz, then falls of pretty much linearly to about 4dB down at 200MHz.
Worse, for some combinations of voltage and frequency (e.g. 10MHz 200mV, 400mV) I get no output at all.

Have I missed something? Any suggestions for how to fix at least the issues up to 30MHz?
 

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 382
  • Country: gb
    • Me
Re: DG4000 - a firmware investigation
« Reply #435 on: October 26, 2020, 01:28:31 pm »
Here's a plot of the output versus frequency
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 4514
  • Country: nl
Re: DG4000 - a firmware investigation
« Reply #436 on: October 26, 2020, 04:51:05 pm »
This is the output of my liberated DG4062, I did not touch the calibration.
1dB down at about 160MHz and almost 3dB at 200MHz.
Keyboard error: Press F1 to continue.
 
The following users thanked this post: ralphrmartin

Online TurboTom

  • Frequent Contributor
  • **
  • Posts: 959
  • Country: de
Re: DG4000 - a firmware investigation
« Reply #437 on: October 26, 2020, 07:15:53 pm »
I guess I got lucky with mine... It started live as a DG4102.  >:D

 

Offline bgm370

  • Contributor
  • Posts: 8
  • Country: us
Re: DG4000 - a firmware investigation
« Reply #438 on: October 26, 2020, 07:35:23 pm »
I had the same calibration problem with my 4062 “enhanced” to a 4202 a while ago. Both 1.12 and 1.14 were not calibrating properly. I downgraded to 1.08 (it might have been an even earlier fw version) and it calibrated just fine. Then I upgraded it back to 1.14 and the proper calibration was preserved.
 
The following users thanked this post: ralphrmartin

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 382
  • Country: gb
    • Me
Re: DG4000 - a firmware investigation
« Reply #439 on: October 26, 2020, 09:04:59 pm »
BGM, your suggestion certainly helped, although there's still something not quite right.
I now get a more-or-less flattish trace out to 100 MHz, and while I dont get so many weird jumps up and down now below 30MHz, I still get one jump down of about 0.8dB at 12 MHz or so.
There is then a linear-ish ramp down from about 100MHz to 200MHz, dropping a further 5dB.

I'm not too worried about the latter - perhaps the device just has some default values for this frequency range which wouldn't have needed factory calibration anyway.

However, the step at 12 MHz is rather more puzzling as I would have thought that would have been calibrated out.

On the other hand, the device is 7 or 8 years old now, so perhaps it has just drifted away from the original calibration.

PA0PBZ, I see if you look carefully, your plot also seems to show a bit of a drop at around 12MHz.

Perhaps I'll try to run through the full calibration procedure - but for both channels that seems to involve taking perhaps 300 power and voltage readings, and typing them in, which will be no fun when the DG's keyboard suffers from key bounce.

Thanks again for all the help.
« Last Edit: October 26, 2020, 09:06:46 pm by ralphrmartin »
 

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 382
  • Country: gb
    • Me
Re: DG4000 - a firmware investigation
« Reply #440 on: October 27, 2020, 03:45:32 pm »
Well, having gone back to 4.08, done the calibration with defaults, and got a not too bad trace, and come back to 4.12, I then spent a morning doing a proper calibration (with multimeter and spectrum analyzer). The net result is back to like that shown in my original sweep: several serious jumps of a few dB up to about 12MHz, flat-ish out to about 100MHz, and then a linear-ish slope losing 4dB by 200MHz. Where it's flat and linear are probably flatter and more linear than before - but the large artefacts, and slope, still exist.

I suspect the slope might be due to different circuitry in the (newer?) higher frequency models.

However, if I do a sweep not from 1Mhz to 200MHz, but from 1MHz to 12MHz, all the jumps go away. So, they are not a calibration issue, but some sort of artefact produced by the sweep function,. Different ranges of sweeps make jumps in different places. Ugly.
« Last Edit: October 27, 2020, 03:49:00 pm by ralphrmartin »
 

Online tv84

  • Super Contributor
  • ***
  • Posts: 1947
  • Country: pt
Re: DG4000 - a firmware investigation
« Reply #441 on: October 27, 2020, 03:56:10 pm »
Let's call it a 30-100MHz model...
 

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 382
  • Country: gb
    • Me
Re: DG4000 - a firmware investigation
« Reply #442 on: October 27, 2020, 04:37:48 pm »
Haha. Gained 40Mhz, lost 30Mhz, for an overall win by 10Mhz!  :-DD

But even stranger - if I set everything back to the factory calibration - all of the jumps disappear....
This sounds to me awfully like there's a "differencing two big numbers to get a small number" kind of problem somewhere in there.

So I now have a 0 MHz to 110MHz model ...  ;D
So apart from wasting a morning on a useless calibration,  I'm definitely winning!
And as long as I only want a narrow band at even higher frequencies, that's good too, as long as I check the exact output level separately.


 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 2656
  • Country: ro
Re: DG4000 - a firmware investigation
« Reply #443 on: October 27, 2020, 04:51:33 pm »
I see no reason why it should jump like that.  Maybe the calibration instruments are not calibrated, or maybe the measuring setup has something wrong in it, maybe a cable is faulty, IDK, but my unlocked DG4102 doesn't show any amplitude jumps in the first 30MHz or so (also never touched its calibration - I suspect the altered calibration might be the most probable cause for seeing jumps).

Does the amplitudes and frequencies of the jumps preserve when a narrower frequency sweep is performed?

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 382
  • Country: gb
    • Me
Re: DG4000 - a firmware investigation
« Reply #444 on: October 27, 2020, 05:37:21 pm »
It's the voltage settings (not RF power settings) which caused the jumps, and that was done with a 6.5 digit Agilent meter I've no reason to suspect to be out of spec. BNC coax lead to a BNC-banana plug splitter. Same coax lead to BNC-to-N adapter for spectrum analyzer. No problems with these leads etc in other work.

I've tried calibrating twice now, and both times ended up with jumps, once before going back to firmware 08 and redoing things there, and once after coming back to the latest fw.

Note that my machine doesn't show any jumps if you reset to the factory calibration.

Maybe the calibration procedure itself has some issues. It would be interesting to know if anyone has successfully recalibrated their DG4000 with the procedure given, with the current fw.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 2656
  • Country: ro
Re: DG4000 - a firmware investigation
« Reply #445 on: October 27, 2020, 05:51:39 pm »
Does the same Agilent voltmeter shows the generated voltage (after calibration) as correct (constant) when tested at various fixed frequencies?  If not, then the calibration procedure went wrong.  If yes, then it's either the voltmeter or the spectrum analyzer.

Voltage jumps of 3 or 6 dB should be easy to spot on any instrument.  Does the jumps show on other instruments, too, e.g. an oscilloscope or some other less precise voltmeter?
 
The following users thanked this post: ralphrmartin

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 382
  • Country: gb
    • Me
Re: DG4000 - a firmware investigation
« Reply #446 on: October 27, 2020, 06:43:01 pm »
Thanks for your comment, RoGeorge.

Does the same Agilent voltmeter shows the generated voltage (after calibration) as correct (constant) when tested at various fixed frequencies? If not, then the calibration procedure went wrong.

True (as long as I use frequencies within the meter's AC range), but that doesn't tell us where it went wrong:
- voltmeter not working correctly (e.g. giving inconsistent readings at different frequencies)
- I misapplied the calibration procedure (failed to write some values, entered incorrect values by mistyping for example)
- there's a bug in the user calibration procedure code e.g. it
-- tries to measure voltages at frequencies outside the DMMs capabilities
-- does something wrong with the entered values (stores them in the wrong place, wrong format, etc)

If yes, then it's either the voltmeter or the spectrum analyzer.

Not necessarily. The software in the DG4000 in general, and the sweep function in particular, may make some assumptions about the calibration. It is certainly doing something strange when sweeping, as the jumps may or may not be present depending on exactly what frequency range you sweep. Intuitively, miscalibration should always lead to the same voltage at the same frequency, just the wrong voltage, and that is not happens. The voltage you get at a particular frequency depends on the frequency range of the sweep.

Unfortunately, because of the jumps, I reset it to the factory calibration (which doesn't have them), so I have now way of telling which of these possibilities it is, without wasting another 1/2 day to redo the calibration. Note that lack of jumps observed with the factory calibration indicates that the jumps are real in my calibration (you said to see if they exist using a different instrument).

Furthermore, the factory calibration does give readings on the voltmeter (using the same leads) from 1kHz to 100kHz (in steps of 1kHz) which are within 0.2% or better of the stated output of the DG4000, so I have no reason to think the voltmeter is playing up.

Perhaps the software makes some assumptions about the entered calibration values, and if the calibration values entered are too far from the expected ones, it breaks these assumptions
« Last Edit: October 27, 2020, 06:49:30 pm by ralphrmartin »
 

Offline ZETOR1

  • Newbie
  • Posts: 1
  • Country: pl
Re: DG4000 - a firmware investigation
« Reply #447 on: January 04, 2021, 04:35:44 pm »
Hello. I have dg4062 software version: 00.01.01. I want to update to 00.01.06. Where I can find 01.01.06. or 00.01.07?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf