Author Topic: New Rigol 16-bit function generators DG800/900 series  (Read 99416 times)

0 Members and 1 Guest are viewing this topic.

Offline ultranalog

  • Contributor
  • Posts: 32
  • Country: pl
  • Audio Nerd - not an audiophool
    • It's only audio
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #400 on: March 19, 2020, 02:13:12 pm »
Haven't checked this thread for a few weeks, interesting developments :)

I found the new firmware, Rigol wants you to log in but if you look at the HTML you simply find a direct link to the RAR file: https://www.rigol.eu/Public/Uploads/uploadfile/files/ftp/DG/软固件/SardineII(ARM)Update-v00.02.04.00.00.rar

My original FW was 1.09.
I used TV84's downgrade to 1.08, got a DG992 and reprogrammed my serial number afterwards.
Life was good (well, until the world fell apart)
Today, I flashed the TV84-1.08 to 2.04 and it came back as DG811 with original serial number.
I then re-flashed with TV84's downgrade and came back to 1.08, regained my DG992 model but did not lose my serial number this time!

Oddly enough when it came back to DG992 it even had the frequency settings that I last used.
Fine with me, I didn't even know what is so great about 2.04 anyway, the release notes are not super impressive:

Quote
[Updated Contents]

v00.02.04.00.00   2020-02-18

     - Add open source declaration in help UI
    - Solve the problem of address error in ultralab heartbeat server configuration
    - Solve the bug that the relay output instantaneous voltage error after setting offset

It looks to me like Rigol is really not happy with this thread.
playing around with near DC (20 kHz) for fun and profit
 

Offline klamath

  • Contributor
  • Posts: 6
  • Country: it
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #401 on: March 19, 2020, 02:17:57 pm »
Haven't checked this thread for a few weeks, interesting developments :)

I found the new firmware, Rigol wants you to log in but if you look at the HTML you simply find a direct link to the RAR file: https://www.rigol.eu/Public/Uploads/uploadfile/files/ftp/DG/软固件/SardineII(ARM)Update-v00.02.04.00.00.rar

My original FW was 1.09.
I used TV84's downgrade to 1.08, got a DG992 and reprogrammed my serial number afterwards.
Life was good (well, until the world fell apart)
Today, I flashed the TV84-1.08 to 2.04 and it came back as DG811 with original serial number.
I then re-flashed with TV84's downgrade and came back to 1.08, regained my DG992 model but did not lose my serial number this time!

Hi,
But where can I find the “TV84's downgrade to 1.08” firmware?
 

Offline spruutz

  • Newbie
  • Posts: 1
  • Country: de
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #402 on: March 19, 2020, 09:47:28 pm »
Hello,

got my DG821 this week and I really enjoy it.
I have tried to ugrade it to a DG832 but it doesn't want to. Also any other upgrade have no effect.

SW version 00.01.08.00.01

I have done the steps from tv84 post #147 and used a RaspberryPi with raspian to write the bin file to the formatted USB drive (2GB). Also tried it with HxD on my Windows laptop, but after entering the SCPI code :PROJ:MODE DG832 and restarting the DG it says still 821.
Has anybody a glue what I am doing wrong?

Many thanks in advance!
 

Offline klamath

  • Contributor
  • Posts: 6
  • Country: it
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #403 on: March 20, 2020, 08:15:30 pm »
Hello,

the trick to change model type with magic usbstick work very well, (THANKS tv84)
I've change my dl3021 to 3021A and my dp832 to 832A, but for success of operation you need to create a good usb stick.

I have a dg811 with 1.09 fw and the trick not work, it required a 1.08
so, are you sure to have 1.08 firmware and not 1.09 or later?



Hello,

got my DG821 this week and I really enjoy it.
I have tried to ugrade it to a DG832 but it doesn't want to. Also any other upgrade have no effect.

SW version 00.01.08.00.01

I have done the steps from tv84 post #147 and used a RaspberryPi with raspian to write the bin file to the formatted USB drive (2GB). Also tried it with HxD on my Windows laptop, but after entering the SCPI code :PROJ:MODE DG832 and restarting the DG it says still 821.
Has anybody a glue what I am doing wrong?

Many thanks in advance!
 

Offline Mikets7

  • Newbie
  • Posts: 2
  • Country: gr
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #404 on: March 23, 2020, 07:27:49 pm »
Hi!

i have a Rigol DG811 and i am trying to hack it!
i have follow the steps of TV84 but nothing!
my sn is 1.08 its the old version!
i format the flash drive (32gb) via windows i change at 2000000sector to 0B 0A 3B 2E 5F 4C EC BE with HxD and with r&s visa
i send the command :PROJ:MODE DG992 ... but nothing
thanks in advance!!!
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 2854
  • Country: ca
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #405 on: March 23, 2020, 11:24:21 pm »
Hi!

i have a Rigol DG811 and i am trying to hack it!
i have follow the steps of TV84 but nothing!
my sn is 1.08 its the old version!
i format the flash drive (32gb) via windows i change at 2000000sector to 0B 0A 3B 2E 5F 4C EC BE with HxD and with r&s visa
i send the command :PROJ:MODE DG992 ... but nothing
thanks in advance!!!

Does the USB symbol show up when the drive is inserted into DG800?
If you open the drive with HxD again is the data still there?
Maybe try a smaller flash drive.
 

Offline Mikets7

  • Newbie
  • Posts: 2
  • Country: gr
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #406 on: March 24, 2020, 08:03:16 am »
Hi!
Thanks for the quick response..

Done it...thank you very much... :phew:
It performed easily only following the procedure
Tv84 explains only via linux...
I used raspi....love raspi...

Best regards...

Thank so much...
 

Offline ultranalog

  • Contributor
  • Posts: 32
  • Country: pl
  • Audio Nerd - not an audiophool
    • It's only audio
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #407 on: March 24, 2020, 07:48:05 pm »
For the linux people that are scared of command line:

1. What the hell are you doing with linux?  :-DD

2. Use 'gparted' for formatting. Not 'disks'. That utility is a useless-tility.

3. Format the disk 'FAT32' for a firmware image, Format it as 'FAT16' if you want to make a magic disk.

This worked without fail for me.
playing around with near DC (20 kHz) for fun and profit
 

Offline digitalautomotive

  • Newbie
  • Posts: 1
  • Country: eg
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #408 on: March 25, 2020, 03:55:44 pm »
Hi,
Can you please help where to find the custom firmware 1.08 so i can downgrade my DG811 Fw 1.09.00.02 to modify it to DG992 using TV84 method.
Thanks in advance
 

Offline Ruediger

  • Contributor
  • Posts: 5
  • Country: de
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #409 on: March 30, 2020, 11:53:09 am »
Hi guys,

I bought my DG811 some time ago and received it with the FW1.09.  Now I would like to upgrade it and need your help to downgrade the FW to 1.08 or to test other ways of updrading for you.

Thanks for your help
 

Offline evgbog

  • Contributor
  • Posts: 6
  • Country: ru
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #410 on: April 06, 2020, 03:32:20 pm »
Finally, got DG811 unit from China. Unfortunately, it have 2.02 firmware installed.

Is it possible to upgrade to 992?
 

Offline thetechnick

  • Contributor
  • Posts: 7
  • Country: de
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #411 on: April 07, 2020, 07:06:29 pm »
Finally, got DG811 unit from China. Unfortunately, it have 2.02 firmware installed.

Is it possible to upgrade to 992?

It is, but you need to downgrade the firmware and do the unlock trick from this post: https://www.eevblog.com/forum/testgear/new-rigol-16-bit-function-generators-dg800900-series/msg2420391/#msg2420391
Unfortunately the device does not let you downgrade the firmware, so you need to bypass the version validation for the downgrade to succeed.

tv84 seems to have a working "downgrade" firmware, although he did not put it up for public download.
Probably due to the attachment-size limit, I am sure he will share a download link when he has time.

I am currently trying to take a stab at it myself, although my experience with such stuff is about zero :D

Rigol pulled the old (hackable) firmware from most of their websites, but by checking some of their file servers I finally found it.
If someone needs the old firmware - just ping me. Cannot upload it here due to attachment size restrictions of the forum.
PLEASE NOTE: you cannot downgrade your device with the original firmware - you need to patch it first, somehow :D
 

Online bd139

  • Super Contributor
  • ***
  • Posts: 20503
  • Country: gb
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #412 on: April 07, 2020, 07:18:44 pm »
Is there a change log for software versions for the DG800 series at all?
 

Offline thetechnick

  • Contributor
  • Posts: 7
  • Country: de
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #413 on: April 07, 2020, 07:31:33 pm »
If you download the latest firmware you will find a Release Notes file.
As v00.01.09.00.00 was never released as an updated, just preinstalled on some devices, there seems to be no change log entry for it.

Code: [Select]
[Model Supported] DG811,DG821,DG831,DG812,DG822,DG832,DG952,DG972,DG992,DG2052,DG2072,DG2102
[Latest Revision Date] 2020-02-18


[Updated Contents]

v00.02.04.00.00 2020-02-18

     - Add open source declaration in help UI
- Solve the problem of address error in ultralab heartbeat server configuration
- Solve the bug that the relay output instantaneous voltage error after setting offset
 

Online bd139

  • Super Contributor
  • ***
  • Posts: 20503
  • Country: gb
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #414 on: April 07, 2020, 07:36:04 pm »
Fantastic thanks. That actually answers the question I was going to ask about the instantaneous output voltage as well  :-+

Looks like I'm going to upgrade my cracked DG822 to latest firmware. Will lose 100MHz but not that fussed about it at the moment.
 

Offline thetechnick

  • Contributor
  • Posts: 7
  • Country: de
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #415 on: April 07, 2020, 07:46:20 pm »
Fantastic thanks. That actually answers the question I was going to ask about the instantaneous output voltage as well  :-+

Looks like I'm going to upgrade my cracked DG822 to latest firmware. Will lose 100MHz but not that fussed about it at the moment.

If you cracked it "properly" the update should not reset the model designation, see:
https://www.eevblog.com/forum/testgear/new-rigol-16-bit-function-generators-dg800900-series/msg2950872/#msg2950872
https://www.eevblog.com/forum/testgear/new-rigol-16-bit-function-generators-dg800900-series/msg2951658/#msg2951658

( I already read through this whole thread way too many times... )
Just people that receive new units with v00.02.xx need to downgrade... in order to upgrade - sounds stupid, but seems to work :D
 
The following users thanked this post: bd139

Offline Ruediger

  • Contributor
  • Posts: 5
  • Country: de
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #416 on: April 09, 2020, 05:34:38 am »
Thanks for the answers.

I'll wait for TV84 to answer.
If any of you have an idea to upgrade directly from FW1.09 I can try it for you.

I volunteer.

Have a nice day
 

Online tv84

  • Super Contributor
  • ***
  • Posts: 2352
  • Country: pt
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #417 on: April 10, 2020, 10:35:08 pm »
When I am not mistaken, AshDash was the first one with a shipped 1.09, who had to invest time and brain to contribute decisive steps to tv84 and other friendly helpers to search for a new/other way to downgrade; probably this is also the case for an upgrade to 2.04 and any further...

:) Let's call him a helpful volunteer and that's why he deserved a special treatment... His upgrade method is not "public".   ;)

So, from all the posts in these last 2 pages i seem to conclude that the (factory released) v2.04 equipments don't migrate the model ID from the v1.08 version because they already have a valid DG81x ID in the new memory struct area.

If that's so, it should be possible to patch the FW to do it or ... using the MODF command (which is Rigol's official way). 

Edit: Therefore the "downgrade" method only works with re-upgrade up to v2.02 , as such its validity has expired.
« Last Edit: April 19, 2020, 01:40:54 pm by tv84 »
 
The following users thanked this post: Ruediger

Offline evgbog

  • Contributor
  • Posts: 6
  • Country: ru
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #418 on: April 11, 2020, 12:30:53 pm »
I've extracted some fw4uboot.sh parts from GEL files:

Command used:
Code: [Select]
openssl aes-128-cbc -in 1.bin.aes -out 1.bin -d -K "BAD8CFFEBBAAB5C4C3D8D4BFCAFDBEDD" -iv "0" -nopad


Also,  fw4linux.sh seems to be encoded using some other key.

FW 1.80
Code: [Select]
#upgrade_shell
#check version first
showMessage 'Upgrading(1/4), check version...' 7 14
if checkVer "00.01.00.11.01"; then \
  echo New version; \
else \
  echo Old version; \
  showMessage 'Upgrading failed, not new version!' 7 14;\
fi;


#check all md5
progress 16
showMessage 'Upgrading(2/4), check images...' 7 14
progress 17
if tar_find 0x88000000 Sardine.img.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} 856ee251bb839a7c231c2920903939c3; then \
    echo check Sardine.img.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check Sardine.img.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find Sardine.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 app_gz.img.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} e3260cf08c98485d8d51c2fd83142c61; then \
    echo check app_gz.img.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check app_gz.img.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find app_gz.img.gz error!;\
  exit_from_shell;\
fi;

#update spi flash images
progress 19
showMessage 'Upgrading(3/4), flash images...' 7 14
#update nand images
mtdparts default;
echo 'set mtdparts environment';
setenv mtdparts "mtdparts=nand.0:1m(NAND.bootpic-usr),1m(NAND.bootpic-def)ro,1m(NAND.bootpic-def.bak)ro,512k(NAND.uboot-env),512k(NAND.uboot-env.bak),512k(NAND.fdt)ro,512k(NAND.fdt.bak)ro,8m(NAND.kernel)ro,8m(NAND.kernel.bak)ro,31m(NAND.reserved),180m(NAND.sardine)ro,100m(NAND.filesystem),20m(NAND.cal),-(NAND.userspace)"
echo 'del partitions';
mtdparts del NAND.reserved
mtdparts del NAND.sardine
echo 'add partitions';
mtdparts add nand0 0x01f00000@0x01500000 NAND.reserved
mtdparts add nand0 0x0b400000@0x03400000 NAND.sardine
saveenv
echo 'set mtdparts environment OK!';
if tar_find 0x88000000 Sardine.img.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.sardine; then \
      progress 70;\
      if nand write 0x82000000 NAND.sardine ${filesize}; then \
        progress 74;\
      else \
        nand erase.part NAND.sardine; \
        if nand write 0x82000000 NAND.sardine ${filesize}; then \
          progress 74;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip Sardine.img.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar Sardine.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 app_gz.img.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.reserved; then \
      progress 94;\
      if nand write 0x82000000 NAND.reserved ${filesize}; then \
        progress 98;\
      else \
        nand erase.part NAND.reserved; \
        if nand write 0x82000000 NAND.reserved ${filesize}; then \
          progress 98;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip app_gz.img.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar app_gz.img.gz error!;\
  exit_from_shell;\
fi;

#env
echo 'set some env';
showMessage 'Upgrading(4/4), set some env...' 7 14
progress 99
setenv softver '00.01.00.11.01'
setenv builddate '2018.08.30 16:39:44'
setenv bootcmd nandboot
showMessage 'Upgrade OK, please reboot.' 7 14
progress 100
saveenv
echo 'System download OK!';
##end##


FW 2.02
Code: [Select]
#upgrade_shell
#check version first
showMessage 'Upgrading(1/4), check version...' 7 14
if checkVer "00.01.09.00.01"; then \
  echo New version; \
else \
  echo Old version; \
  showMessage 'Upgrading failed, not new version!' 7 14;\
  exit_from_shell;\
fi;


#check all md5
progress 16
showMessage 'Upgrading(2/4), check images...' 7 14
progress 17
if tar_find 0x88000000 Sardine.img.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} ac0f5b34f8b37c3648ad2995b911c611; then \
    echo check Sardine.img.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check Sardine.img.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find Sardine.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 app_gz.img.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} 9d6a5188b8f2cc5254ed1b5d62b0f431; then \
    echo check app_gz.img.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check app_gz.img.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find app_gz.img.gz error!;\
  exit_from_shell;\
fi;

#update spi flash images
progress 19
showMessage 'Upgrading(3/4), flash images...' 7 14
#update nand images
mtdparts default;
if tar_find 0x88000000 Sardine.img.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.sardine; then \
      progress 70;\
      if nand write 0x82000000 NAND.sardine ${filesize}; then \
        progress 74;\
      else \
        nand erase.part NAND.sardine; \
        if nand write 0x82000000 NAND.sardine ${filesize}; then \
          progress 74;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip Sardine.img.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar Sardine.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 app_gz.img.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.reserved; then \
      progress 94;\
      if nand write 0x82000000 NAND.reserved ${filesize}; then \
        progress 98;\
      else \
        nand erase.part NAND.reserved; \
        if nand write 0x82000000 NAND.reserved ${filesize}; then \
          progress 98;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip app_gz.img.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar app_gz.img.gz error!;\
  exit_from_shell;\
fi;

#env
echo 'set some env';
showMessage 'Upgrading(4/4), set some env...' 7 14
progress 99
setenv softver '00.01.09.00.01'
setenv builddate '2019.10.29 18:31:33'
setenv bootcmd nandboot
showMessage 'Upgrade OK, please reboot.' 7 14
progress 100
saveenv
echo 'System download OK!';
##end##


FW 2.04
Code: [Select]
#upgrade_shell
#check version first
showMessage 'Upgrading(1/4), check version...' 7 14
if checkVer "00.01.09.00.01"; then \
  echo New version; \
else \
  echo Old version; \
  showMessage 'Upgrading failed, not new version!' 7 14;\
  exit_from_shell;\
fi;


#check all md5
progress 16
showMessage 'Upgrading(2/4), check images...' 7 14
progress 17
if tar_find 0x88000000 logo.bmp.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} c1963c37d1742018cc1658103b48d969; then \
    echo check logo.bmp.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check logo.bmp.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find logo.bmp.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 uImage.img.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} 683c8c204a06c9d5a15535973e1b991d; then \
    echo check uImage.img.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check uImage.img.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find uImage.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 fdt.img.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} 4b38335267ccfa51bfeb5c361d6ffb1c; then \
    echo check fdt.img.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check fdt.img.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find fdt.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 rootfs.img.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} c21426ba480b4cff028d819a7e2865a3; then \
    echo check rootfs.img.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check rootfs.img.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find rootfs.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 Sardine.img.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} 03a9b8fc7d6a86f08679809af56ca86a; then \
    echo check Sardine.img.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check Sardine.img.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find Sardine.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 logo.bmp.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} c1963c37d1742018cc1658103b48d969; then \
    echo check logo.bmp.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check logo.bmp.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find logo.bmp.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 logo.bmp.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} c1963c37d1742018cc1658103b48d969; then \
    echo check logo.bmp.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check logo.bmp.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find logo.bmp.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 uImage.img.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} 683c8c204a06c9d5a15535973e1b991d; then \
    echo check uImage.img.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check uImage.img.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find uImage.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 fdt.img.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} 4b38335267ccfa51bfeb5c361d6ffb1c; then \
    echo check fdt.img.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check fdt.img.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find fdt.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 app_gz.img.gz; then \
  if md5sum -v ${tar_find_addr} ${filesize} 74ce13e40ae4fd1535f02e4e88d730e2; then \
    echo check app_gz.img.gz success; \
  else \
    showMessage 'Upgrading failed, bad images!' 7 14;\
    echo check app_gz.img.gz error; \
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar_find app_gz.img.gz error!;\
  exit_from_shell;\
fi;

#update spi flash images
progress 19
showMessage 'Upgrading(3/4), flash images...' 7 14
#update nand images
mtdparts default;
if tar_find 0x88000000 logo.bmp.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.bootpic-def; then \
      progress 39;\
      if nand write 0x82000000 NAND.bootpic-def ${filesize}; then \
        progress 43;\
      else \
        nand erase.part NAND.bootpic-def; \
        if nand write 0x82000000 NAND.bootpic-def ${filesize}; then \
          progress 43;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip logo.bmp.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar logo.bmp.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 uImage.img.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.kernel; then \
      progress 46;\
      if nand write 0x82000000 NAND.kernel ${filesize}; then \
        progress 50;\
      else \
        nand erase.part NAND.kernel; \
        if nand write 0x82000000 NAND.kernel ${filesize}; then \
          progress 50;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip uImage.img.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar uImage.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 fdt.img.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.fdt; then \
      progress 54;\
      if nand write 0x82000000 NAND.fdt ${filesize}; then \
        progress 58;\
      else \
        nand erase.part NAND.fdt; \
        if nand write 0x82000000 NAND.fdt ${filesize}; then \
          progress 58;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip fdt.img.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar fdt.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 rootfs.img.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.filesystem; then \
      progress 62;\
      if nand write 0x82000000 NAND.filesystem ${filesize}; then \
        progress 66;\
      else \
        nand erase.part NAND.filesystem; \
        if nand write 0x82000000 NAND.filesystem ${filesize}; then \
          progress 66;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip rootfs.img.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar rootfs.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 Sardine.img.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.sardine; then \
      progress 70;\
      if nand write 0x82000000 NAND.sardine ${filesize}; then \
        progress 74;\
      else \
        nand erase.part NAND.sardine; \
        if nand write 0x82000000 NAND.sardine ${filesize}; then \
          progress 74;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip Sardine.img.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar Sardine.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 logo.bmp.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.bootpic-usr; then \
      progress 76;\
      if nand write 0x82000000 NAND.bootpic-usr ${filesize}; then \
        progress 80;\
      else \
        nand erase.part NAND.bootpic-usr; \
        if nand write 0x82000000 NAND.bootpic-usr ${filesize}; then \
          progress 80;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip logo.bmp.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar logo.bmp.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 logo.bmp.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.bootpic-def.bak; then \
      progress 82;\
      if nand write 0x82000000 NAND.bootpic-def.bak ${filesize}; then \
        progress 86;\
      else \
        nand erase.part NAND.bootpic-def.bak; \
        if nand write 0x82000000 NAND.bootpic-def.bak ${filesize}; then \
          progress 86;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip logo.bmp.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar logo.bmp.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 uImage.img.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.kernel.bak; then \
      progress 88;\
      if nand write 0x82000000 NAND.kernel.bak ${filesize}; then \
        progress 92;\
      else \
        nand erase.part NAND.kernel.bak; \
        if nand write 0x82000000 NAND.kernel.bak ${filesize}; then \
          progress 92;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip uImage.img.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar uImage.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 fdt.img.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.fdt.bak; then \
      progress 94;\
      if nand write 0x82000000 NAND.fdt.bak ${filesize}; then \
        progress 98;\
      else \
        nand erase.part NAND.fdt.bak; \
        if nand write 0x82000000 NAND.fdt.bak ${filesize}; then \
          progress 98;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip fdt.img.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar fdt.img.gz error!;\
  exit_from_shell;\
fi;
if tar_find 0x88000000 app_gz.img.gz; then \
  if unzip ${tar_find_addr} 0x82000000 0x6000000; then \
    if nand erase.part NAND.reserved; then \
      progress 94;\
      if nand write 0x82000000 NAND.reserved ${filesize}; then \
        progress 98;\
      else \
        nand erase.part NAND.reserved; \
        if nand write 0x82000000 NAND.reserved ${filesize}; then \
          progress 98;\
        else \
          showMessage 'Upgrading failed, write failed!' 7 14;\
          exit_from_shell;\
        fi; \
      fi; \
    else \
      showMessage 'Upgrading failed, write failed!' 7 14;\
      exit_from_shell;\
    fi; \
  else \
    showMessage 'Upgrading failed, unzip image error!' 7 14;\
    echo unzip app_gz.img.gz error!;\
    exit_from_shell;\
  fi; \
else \
  showMessage 'Upgrading failed, image not found!' 7 14;\
  echo tar app_gz.img.gz error!;\
  exit_from_shell;\
fi;

#env
echo 'set some env';
showMessage 'Upgrading(4/4), set some env...' 7 14
progress 99
setenv softver '00.01.09.00.01'
setenv builddate '2020.02.18 08:59:53'
setenv bootcmd nandboot
setenv kernel_size '0x409000'
setenv kernel_check '0x1174efc5'
setenv fdt_size '0x9140'
setenv fdt_check '0x614e138a'
showMessage 'Upgrade OK, please reboot.' 7 14
progress 100
saveenv
echo 'System download OK!';
##end##


FW 2.04 seems to have many changes to the previous.

I wondering  how to patch this 1.08 script to downgrade my 2.02 unit. I get "ERROR: bad script!" message when trying to flash 1.08 FW.
« Last Edit: April 11, 2020, 01:40:38 pm by evgbog »
 
The following users thanked this post: thm_w, stupiid, Ruediger

Online tv84

  • Super Contributor
  • ***
  • Posts: 2352
  • Country: pt
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #419 on: April 11, 2020, 01:16:23 pm »
Also,  fw4linux.sh seems to be encoded using some other key.

So that you can better enjoy the quarantine period:     :D

BCD2FCFECB9AB54B12D2D4AFCAFD6E0D

BTW, IVs must be 0.
 
The following users thanked this post: bulba99

Offline evgbog

  • Contributor
  • Posts: 6
  • Country: ru
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #420 on: April 11, 2020, 01:20:46 pm »
Wow!

I've modified (commented with #) version check section of fw4uboot.sh, encoded it with open-ssl, updated SardineUpdate.GEL (haven't updated any headers) and reflashed with "Help" key at startup, and voila:

My DG811 ver 2.02 unit transformed to DG992 ver 1.08.01 without sending any SCPI commands. Serial number changed to DG8000000000001.

So, what is my next step? Do I need send change model command  with magic USB to flash next FWs?
« Last Edit: April 11, 2020, 01:27:59 pm by evgbog »
 
The following users thanked this post: thm_w, Ruediger

Online tv84

  • Super Contributor
  • ***
  • Posts: 2352
  • Country: pt
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #421 on: April 11, 2020, 01:29:03 pm »
My DG811 ver 2.02 unit transformed to DG992 ver 1.08.01 without sending any SCPI commands. Serial number changed to DG8000000000001.

So, what is my next step? Do I need send change model command  with magic USB to flash next FWs?

First you must use IV = 0 or behavior can be strange...

Sure it did, that's normal behavior when you downgrade. Now you should correct the S/N and force model. Then re-upgrade. When you do that it should rollback to DG811...
 

Offline evgbog

  • Contributor
  • Posts: 6
  • Country: ru
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #422 on: April 11, 2020, 01:46:37 pm »
Quote from: tv84
First you must use IV = 0 or behavior can be strange...

Oh, that's right, thanks.  I guessed why firts string of decoded block is corrupted. I fixed previous post, need to use -iv "0" argument.

Quote from: tv84
Sure it did, that's normal behavior when you downgrade. Now you should correct the S/N and force model. Then re-upgrade. When you do that it should rollback to DG811...

UPDATE: successfully flashed to 2.02, but fail on 2.04 (model reset to 811). So, will stay on 2.02 FW.
« Last Edit: April 11, 2020, 04:56:48 pm by evgbog »
 

Offline evgbog

  • Contributor
  • Posts: 6
  • Country: ru
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #423 on: April 15, 2020, 06:43:06 pm »
I was asked how to prepare custom firmware for downgrade firmware version.

Here is my mini how-to guide:

1. Get 1.08.01 official firmware (available at web.archive.org of rigolna.com website)
2. Use hex editor (HxD, for example), open SardineUpdate.GEL
3. You will see encrypted block of data at the begining, starting at 200h offset. Select this block and do "save selection"  to file fw4uboot.sh.aes (size 4016 bytes).
4. Decode file using command (under linux)
Code: [Select]
openssl aes-128-cbc -in  fw4uboot.sh.aes -out  fw4uboot.sh -d -K "BAD8CFFEBBAAB5C4C3D8D4BFCAFDBEDD" -iv "0" -nopad5. Edit decoded fw4uboot.sh. Comment ..if checkVer ...else ... fi rows like this (insert # characters):
Code: [Select]
#if checkVer "00.01.00.11.01"; then \
echo New version; \
#else \
#  echo New version; \
#  showMessage 'Upgrading failed, not new version!' 7 14;\
#fi;
6. Make sure total length of edited fw4uboot.sh is still 4016 bytes (if not, add or delete some characters in commented rows).
7. Encrypt edited fw4uboot.sh using command:
Code: [Select]
openssl aes-128-cbc -in  fw4uboot.sh -out  fw4uboot_new.sh.aes -K "BAD8CFFEBBAAB5C4C3D8D4BFCAFDBEDD" -iv "0" -nopad9. Using hex editor, update data block at 200h of SardineUpdate.GEL with encrypted fw4uboot_new.sh.aes
10.All done. Proceed flashing SardineUpdate.GEL to device (using "Help" key at boot method).

Next step is to use @tv84 guide. https://www.eevblog.com/forum/testgear/new-rigol-16-bit-function-generators-dg800900-series/msg2420391/#msg2420391

« Last Edit: April 15, 2020, 07:01:30 pm by evgbog »
 
The following users thanked this post: thm_w, bulba99, klamath, stupiid, Ruediger, Powernun, randphysguy

Online tv84

  • Super Contributor
  • ***
  • Posts: 2352
  • Country: pt
Re: New Rigol 16-bit function generators DG800/900 series
« Reply #424 on: April 15, 2020, 07:02:44 pm »
UPDATE: successfully flashed to 2.02, but fail on 2.04 (model reset to 811). So, will stay on 2.02 FW.

Which was your original version?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf