Products > Test Equipment
Siglent .ads firmware file format
<< < (65/85) > >>
CustomEngineerer:
Thanks JDubU. Was looking for that post but couldn't find it.
ShaneEEV:
Thanks to JDubU and CustomEngineerer!

I'll get into my SDG and make that change.

Cheers!
Shane

O.K. - I took the SN info out of the .orig file and inserted it over the 0123456789 in the <chip> <\chip> area and all is well. firmware back to 23R8 and all is right with the world!

Thanks again, JDubU and CustomEngineerer!
rf-loop:

--- Quote from: ShaneEEV on April 27, 2019, 02:17:53 am ---O.K. - Got it figured out

1) Insert USB Stick into front panel USB socket
2) Put SDG into System / Info / Upgrade
3) Select telnet file for SDG2042X and UPDATE
4) LEAVE POWER ON SDG
5) On remote computer console, type: telnet <SDG IP address> <SPACE> 10101 <RETURN>
6) On remote computer console, type: mount -o remount,rw ubi2_0 <SPACE> /usr/bin/siglent/firmdata0
7) On remote computer console, type: cp /usr/bin/siglent/firmdata0/NSP_system_info.xml /usr/bin/siglent/firmdata0/NSP_system_info.xml.orig
8.) On remote computer console, type: vi /usr/bin/siglent/firmdata0/NSP_system_info.xml
ERR: 9) On remote computer console, press the down arrow until the cursor in the vi window is on the line that starts with <license><bandwidth...  and press dd (that means press 'd' twice) You will see the line has disappeared.
10) On remote computer console, type: :wq <RETURN>
11) On remote computer console, type: sync
12) on SDG: remove USB stick
13) on SDG: turn power OFF

When you power back on, the status menu indicates the model number is now SDG2122X. (the serial number has been replaced with "1234567890", however.

Perhaps someone else knows how to replace the serial number?

--- End quote ---

Of course it do this, look what you have deleted using vi, walking like elephant in porcelain store.

As explained by @CustomEngineerer
Please repair this erroneous red marked step 9 for avoid some noobs confusion when they follow things without further thinking and/or with total lack of knowledge or experience.


With SDG2000X basic principles are roughly same as with SDG1000X. (some differences in details.) This is for SDG1000X only.  (.zip file what include all needed info for SDG1000X and not only for BW alone)

tv84:
Getting back to the topic...  :)

Here is a C# function that allows the deobfuscation of Siglent SDS5000X .ADS files, so that everyone can extract the .ZIP inside:

(memDump is the raw .ADS file)


--- Code: ---        private static void parseADS_SIGLENT_SDS5000X(ref byte[] memDump)
        {
            byte[] buf1 = new byte[memDump.Length - 0x70];

            Array.Reverse(memDump);   // reverses the buffer
            for (int block = 0x2800, i1 = buf1.Length - block, i2 = 0; block > 0; i2 += block, block = Math.Min(0x2800, i1), i1 -= block)  // unshuffling blocks
                Buffer.BlockCopy(memDump, i1, buf1, i2, block);
            for (int iBlock = 0; iBlock < buf1.Length; iBlock += 0x2800)  // XORing with 0xFF (increment. pattern and blocks)...
            {
                for (int i1 = iBlock + 1, i2 = 2; i1 < iBlock + 0x2800 && i1 < buf1.Length; i1 += i2, i2++)
                    buf1[i1] ^= 0xFF;
                for (int i1 = iBlock + Math.Min(0x1400, (buf1.Length - iBlock + 1) / 2); i1 < iBlock + 0x2800 && i1 < buf1.Length; i1++)
                    buf1[i1] ^= 0xFF;
            }
       }
--- End code ---
bugi:

--- Quote from: tv84 on June 10, 2019, 11:15:48 am ---Here is a C# function ...

--- Code: ---            for (int iBlock = 0; iBlock < buf1.Length; iBlock += 0x2800)  // XORing with 0xFF (increment. pattern and blocks)...
            {
                for (int i1 = iBlock + 1, i2 = 2; i1 < iBlock + 0x2800 && i1 < buf1.Length; i1 += i2, i2++)
                    buf1[i1] ^= 0xFF;
                for (int i1 = iBlock + Math.Min(0x1400, (buf1.Length - iBlock + 1) / 2); i1 < iBlock + 0x2800 && i1 < buf1.Length; i1++)
                    buf1[i1] ^= 0xFF;
            }
       }
--- End code ---

--- End quote ---
Out of curiosity, I've lately seen that xor with 0xFF in few places, and I have been thinking why not using the operator that does the same without the 2nd parameter (or the only parameter written explicitly when using compound assignment variants), i.e. bitwise complement (~).  That is "buf1[i1] = ~buf1[i1];"  (To me the complement is also "clearer" to read as it doesn't have the "unnecessary" 2nd parameter, but this may very well be a matter of opinion.)
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod