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

0 Members and 1 Guest are viewing this topic.

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5121
  • Country: nl
Re: DG4000 - a firmware investigation
« Reply #400 on: June 10, 2020, 06:49:32 pm »
[EDIT] It's fixed, I used a different (older) USB drive, that is the problem 99.9999999999999999999% of the time with these updates in my experience.  So the original drives must have allowed the bootloader to update but then, the same drive, wouldn't do the firmware update!  It kept the Model at DG4202...

I keep one USB drive apart for the DG4000 with a label "DG4000 UPGRADE" on it. I think I tried close to 10 different sticks before I found one that worked.

So... how is you counter now? And your square wave?
Keyboard error: Press F1 to continue.
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: DG4000 - a firmware investigation
« Reply #401 on: June 10, 2020, 07:22:18 pm »
[EDIT] It's fixed, I used a different (older) USB drive, that is the problem 99.9999999999999999999% of the time with these updates in my experience.  So the original drives must have allowed the bootloader to update but then, the same drive, wouldn't do the firmware update!  It kept the Model at DG4202...

I keep one USB drive apart for the DG4000 with a label "DG4000 UPGRADE" on it. I think I tried close to 10 different sticks before I found one that worked.

So... how is you counter now? And your square wave?
I've tried the counter and it seems 'better' 1) it hasn't crashed yet 2) it actually counts.  I looked at some 'square' waves which were like slightly squared sine waves by the time I got up to 25 MHz, at 50 MHz they were sine waves.  I'll come up with pictures if you want.

I'm on version 1.12 which was the highest offered to by by Rigol's website, is 13 or 14 better?

Has anyone here done an automated calibration app for the DG4000?
If at first you don't succeed, get a bigger hammer
 

Offline tv84

  • Super Contributor
  • ***
  • Posts: 3213
  • Country: pt
Re: DG4000 - a firmware investigation
« Reply #402 on: June 10, 2020, 07:42:44 pm »
 :clap:

Now update to v1.14 (attached).

Code: [Select]
[Model Supported] DG4062,DG4102,DG4162,DG4202
[Latest Revision Date] 2017-12-23


[Updated Contents]
v00.01.14.00.01 2017-12-23

- Solve the abnormal output of part of the machine CH1 at normal temperature or low temperature
- Solve the keyboard board encoder causing crashes.


[Previous Versions and Updated Contents]
v00.01.13.00.00 2015-11-05

- Added Traditional Chinese in the Menu.
- The EdgeTime is too slow when the 5MHz square wave is modified to sweep frequency,
- Output can not be changed in real time when editing any wave point.
« Last Edit: June 10, 2020, 07:53:23 pm by tv84 »
 
The following users thanked this post: Gandalf_Sr, GonzoTheGreat

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6147
  • Country: ro
Re: DG4000 - a firmware investigation
« Reply #403 on: June 10, 2020, 09:04:58 pm »
I have a DG4062 that I 'upgraded' to a DG4202 back in Aug 2014 and made no changes since, it reports the following under system info...
...
Anyway, I tried to use the frequency counter (32,768 Hz signal) yesterday and it was useless, locked up even. That made me revisit this thread. 

Mine was a DG4102, now upgraded to DG4202.  I've used the frequency counter before and after the upgrade, and it worked.  The only thing is on speed "Normal" might miss some counts and ruin the statistics (looks like it would be imprecise).  If this happens, change the statistics speed from Normal to Full.
Counter -> Down Arrow -> Statist Set -> Speed Full

Also, not all the displayed digits are measured, some are fake/computed.  The resolution is of only 7 digits/s, if there are more, those are not measured, the extra resolution is the results of arithmetic calculations.
 
The following users thanked this post: Gandalf_Sr

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: DG4000 - a firmware investigation
« Reply #404 on: June 12, 2020, 04:42:10 pm »
Now update to v1.14 (attached).
Thanks, now I see...

Device Model: DG4202
Serial Number: DG4Exxxxxxxxxx
Software Vn: 00.01.14
FPGA Vn: 00.01.11
Hard Vn: 01.03
KeyBrd Vn: 06.01

(Bold stuff has changed)

Used the same USB drive that worked before and all went smoothly.
If at first you don't succeed, get a bigger hammer
 
The following users thanked this post: PA0PBZ

Offline GonzoTheGreat

  • Regular Contributor
  • *
  • Posts: 120
  • Country: aq
Re: DG4000 - a firmware investigation
« Reply #405 on: August 04, 2020, 04:16:06 pm »
[EDIT] It's fixed, I used a different (older) USB drive, that is the problem 99.9999999999999999999% of the time with these updates in my experience.  So the original drives must have allowed the bootloader to update but then, the same drive, wouldn't do the firmware update!
Buying a small pendrive nowadays borders a miracle!

I wonder what the problem is with the newer pendrives?
Is it the cluster size ?  If "yes" then creating a smaller partition on the pendrive would solve the problem, wouldn't it?

Must the partition be formatted as FAT32 or can it be also FAT16 ?
...and what are the acceptable Partition IDs in the partition table anyway ( 0x0b, 0x0c, 0x06, 0x0e, etc...) ?

Finally, must the filename be uppercase or lowercase and is any length acceptable?
 

Offline tv84

  • Super Contributor
  • ***
  • Posts: 3213
  • Country: pt
Re: DG4000 - a firmware investigation
« Reply #406 on: August 04, 2020, 04:23:32 pm »
FAT, FAT16 or FAT32 should work.

Format it with a linux machine.
 

Offline GonzoTheGreat

  • Regular Contributor
  • *
  • Posts: 120
  • Country: aq
Re: DG4000 - a firmware investigation
« Reply #407 on: August 04, 2020, 04:30:38 pm »
Just tried Linux - it did not work.

Could you post the partition table and Boot Sector/FS Information Sector so I can see what parameters work ?

Maybe the pendrive must support CHS addressing and the FAT partition must start on cylinder 1, ...or on head 0 and sector 1, etc...
 

Offline tv84

  • Super Contributor
  • ***
  • Posts: 3213
  • Country: pt
Re: DG4000 - a firmware investigation
« Reply #408 on: August 04, 2020, 04:38:16 pm »
Just tried Linux - it did not work.

Could you post the partition table and Boot Sector/FS Information Sector so I can see what parameters work ?

Maybe the pendrive must support CHS addressing and the FAT partition must start on cylinder 1, ...or on head 0 and sector 1, etc...

:)

I can't go into such detail as I don't have any pen DG4000-approved.

You need to use a small pen and not worry with those inner works.

Format it fully in linux and then a quick FAT format. I've said time and time again: IMHO sometimes it might be a controller timing thing and not so much the formatting params.
 

Offline GonzoTheGreat

  • Regular Contributor
  • *
  • Posts: 120
  • Country: aq
Re: DG4000 - a firmware investigation
« Reply #409 on: August 04, 2020, 04:50:01 pm »
You need to use a small pen and not worry with those inner works.
I need to worry about these details because, the smallest pendrive I have is 8GB.

I tried local computer stores - nothing
I tried local toy stores - nothing
I tried local novelty stores - nothing
I even asked my neighbors - nothing (although when I offered to trade a new 64GB pendrive for an old small used one, they suspected it was some kind of scam).
 

Offline tv84

  • Super Contributor
  • ***
  • Posts: 3213
  • Country: pt
Re: DG4000 - a firmware investigation
« Reply #410 on: August 04, 2020, 05:13:09 pm »
 :-DD  How do you get all that stuff in Antarctica??
 
The following users thanked this post: PA0PBZ, 4cx10000

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6147
  • Country: ro
Re: DG4000 - a firmware investigation
« Reply #411 on: August 04, 2020, 07:09:16 pm »
You need to use a small pen and not worry with those inner works.
I need to worry about these details because, the smallest pendrive I have is 8GB.

I tried local computer stores - nothing
I tried local toy stores - nothing
I tried local novelty stores - nothing
I even asked my neighbors - nothing (although when I offered to trade a new 64GB pendrive for an old small used one, they suspected it was some kind of scam).

Try an USB SD card reader with any card inside.

Offline GonzoTheGreat

  • Regular Contributor
  • *
  • Posts: 120
  • Country: aq
Re: DG4000 - a firmware investigation
« Reply #412 on: August 04, 2020, 11:05:22 pm »
Here is the information from my 1 GB USB stick I use for the DG4000.
OK, I adjusted the partition table and the FAT16 parameter block to be as close to yours as possible (see the attachment), Windows can mount and write to this pendrive, chkdsk reports no errors, but it does not work with the DG4000.
The DG4000 just hangs there with the MOD, UTILITY and STORE buttons lit up steadily (there was a brief burst of activity indicated by the pendrive's LED when I inserted it, though).
« Last Edit: August 05, 2020, 08:34:39 am by GonzoTheGreat »
 

Offline GonzoTheGreat

  • Regular Contributor
  • *
  • Posts: 120
  • Country: aq
Re: DG4000 - a firmware investigation
« Reply #413 on: August 05, 2020, 09:04:36 am »
You could record the USB protocol during the update from the USB stick. Once from a good and once from a bad USB stick. I'd have the option to do that. But searching the log is gonna be tedious.
Yup, that would be the next step in the analysis of the problem, but I don't have a USB capture device ...nor a DG400 "approved" pendrive for comparison.
 

Offline GonzoTheGreat

  • Regular Contributor
  • *
  • Posts: 120
  • Country: aq
Re: DG4000 - a firmware investigation
« Reply #414 on: August 05, 2020, 09:05:49 am »
Try an USB SD card reader with any card inside.
I did, without success ...but not with the clone of the "approved" FAT16 file system like before.
The MOD button is lit up steadily and the UTILITY button flashes slowly ...forever.
 

Offline GonzoTheGreat

  • Regular Contributor
  • *
  • Posts: 120
  • Country: aq
Re: DG4000 - a firmware investigation
« Reply #415 on: August 05, 2020, 12:14:42 pm »
I now wanted to record the data with a self-made USB cable. But this does not work, the DG4000 gets stuck with the three illuminated buttons. Could this indicate a voltage problem?
The cable works without problems if the USB stick is used during normal operation of the DG4000.
It could indicate intolerance of the boot-loader's code to propagation delays occurring in a longer cable.  How long was it?
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6147
  • Country: ro
Re: DG4000 - a firmware investigation
« Reply #416 on: August 05, 2020, 12:49:53 pm »
Try an USB SD card reader with any card inside.
I did, without success ...but not with the clone of the "approved" FAT16 file system like before.
The MOD button is lit up steadily and the UTILITY button flashes slowly ...forever.

Why are you using FAT16 format?  I remember mine it was formatted FAT32.

I've just found my logs with the steps to upgrade, same thread in page 16, see the "code" section.  My USB pen drive was formatted FAT32:
https://www.eevblog.com/forum/testgear/dg4000-a-firmware-investigation/msg2829452/#msg2829452

Offline GonzoTheGreat

  • Regular Contributor
  • *
  • Posts: 120
  • Country: aq
Re: DG4000 - a firmware investigation
« Reply #417 on: August 05, 2020, 04:04:01 pm »
Why are you using FAT16 format?  I remember mine it was formatted FAT32.
Because our resident expert "tv84" has written here that it is OK to use FAT16 and "PeDre" has posted his file system structure here, which contained FAT16.  I just cloned it.
 

Offline tv84

  • Super Contributor
  • ***
  • Posts: 3213
  • Country: pt
Re: DG4000 - a firmware investigation
« Reply #418 on: August 05, 2020, 05:56:26 pm »
I have tested several other USB sticks with 4 and 8 GB, but none works with the update. Even an external power supply for the USB stick does not help.

 :D That adds credit to my theory that this is a timing problem. The programming/interrupts doesn't know how to handle with certain controllers responses. It definitely seems that there is no flux control (delays, timeouts, etc) being maintained.

So, basically, it's a matter of luck.
 

Offline noreply

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: gb
Re: DG4000 - a firmware investigation
« Reply #419 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 tv84

  • Super Contributor
  • ***
  • Posts: 3213
  • Country: pt
Re: DG4000 - a firmware investigation
« Reply #420 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.

 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6147
  • Country: ro
Re: DG4000 - a firmware investigation
« Reply #421 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

Offline tv84

  • Super Contributor
  • ***
  • Posts: 3213
  • Country: pt
Re: DG4000 - a firmware investigation
« Reply #422 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 tv84

  • Super Contributor
  • ***
  • Posts: 3213
  • Country: pt
Re: DG4000 - a firmware investigation
« Reply #423 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:
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6147
  • Country: ro
Re: DG4000 - a firmware investigation
« Reply #424 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.



Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf