Many thanks again for the massive effort yesterday, I got quite a surprise when I switched on the PC...to find a working firmware update!
you welcome
Are the Tekway/Hantek firmwares directly interchangeable, what I mean is, if say Tekway brought out an update, could it be applied to a Hantek without having to be modified?
Before i answer this question let's take a look what inside both DSO:
standard linux dirs:
/bin - no diff
/dev - no diff
/etc - no diff (which is funny, Hantek device is still tagged as Tekway in many scripts)
/lib - new in firmware 2.06.2 is libiconv.so.2.3.0, to support the language switching
/sbin - no diff
/usr - no diff
custom DSO dirs:
/dso/app - no diff
/dso/driver - lcd.ko and fpga.ko updated fw 2.06.2
/usr/bin/gpg149arm - no diif (there is the gpg binary responsible for firmware decryption)
/logo - no diff (there are icns used by DSO UI)
/OurLanguages - this one is new for fw 2.06.2, it contains text files with translation for menu, so in principle you can edit it and add your language
The fw 2.05.xx have hardcoded english/chinese, no really smart but typical for early firmwares
in root dir:
dso.exe - that's the DSO UI, will be started by rcS
fpga.exe - this is a executable used to load/check FPGA
fpga.conf - a very interessting configuration file, depends on settings the FPGA is slower/faster or using different i/o (like for 500MSs models)
help.db - SQLite DB containing help for UI
dn.rbf - FPGA configuration, different for all model families (250MSs models have own, 500MSs have own and 1GSs have own)
and some already mentioned files used for model identification.
The 2.06.2 update script was (you will find this in your fw dump, NAND have always one or more older updates "saved" but visible only in dump):
[DST type]dst1000b
[soft version]2.06.2(101028.0)
[type]123
[cmd] mv /usr/up/tekwayup_client/dso.exe /dso_update.exe
[cmd] rm /logo/ -rf
[cmd] mv /usr/up/tekwayup_client/logo /
[cmd] mv /usr/up/tekwayup_client/dso-lcd.ko /dso/driver/dso-lcd.ko
[cmd] rm /OurLanguages -rf
[cmd] mv /usr/up/tekwayup_client/OurLanguages /
[cmd] mv /usr/up/tekwayup_client/libiconv.so.2.3.0 /lib/libiconv.so.2.3.0
[cmd] rm /lib/libiconv.so.2
[cmd] ln -s /lib/libiconv.so.2.3.0 /lib/libiconv.so.2
[cmd] mv /usr/up/tekwayup_client/help.db /help.db
[cmd] rm /logotype.dis
[cmd] mv /usr/up/tekwayup_client/logotype.dis /logotype.dis
[cmd] rm /sys.inf
[cmd] mv /usr/up/tekwayup_client/sys.inf /sys.inf
[cmd] rm /cur_acq.type
[cmd] sync
[cmd] sync
[cmd] sync
[end]
So in principle yes, currently both firmwares are directly interchangeable - but - that might change.
I would say, don't just download and try to update your DSO, if something geos wrong you will brick your DSO.For sure, if you have fw backup/dump and JTAG cable you will be able to unbrick your device, but just be warned.
A better way is to check first what inside new firmware, to evaluate it and then to update. A firmware test can be done on DSO itself :
- connect via UART
- terminate dso.exe (by ctrl+C)
- insert USB stick with decrypted update files (they will be mounted to /mnt folder)
- insmod new .ko modules (if necessary)
- execute new files and test how the device works
Same can be done on Samsung S3C2440 dev board (like FriendyArm 2440), but it is better to do it on DSO just because of
the fact that DSO have all the other hardware (ADCs, FPGA)
To decrypt firmware update:
- download the .up file from Hantek/Tekway website
- download and install GPG
- run gpg -d dstxxxxxxx.up > dstxxxxxx.gz (when asked for password type 0571tekway)
- gunzip the dstxxxxxx.gz
- untar the resulting file (it is dstxxxxxx. )
- untar again the resulting DST1000_4000.tar
To create new/custom firmware
- tar the folder "tekwayup_client" and the upend file to dst1000_4000.up.tar
- tar the resulting dst1000_4000.up.tar to DST1KB_version.tar and remove the .tar extension
(for example dst1kb_2.06.8(101231.0) )
- Gzip the DST1KB_version to DST1KB_version.gz and remove the .gz extension
- encrypt with gpg -c DST1KB_version (when asked for key type 0571tekway)
- Rename the resulting DST1KB_version.gpg to DST1KB_version.up
What important to know :
- if you type/use wrong password or Tekway/Hantek change the password, your DSO will still not get bricked because the update will get canceled
- use "move" instead of "copy" in "update" script (or chmod 777 filename after copy)
- ensure that whatever inside folder "tekwayup_client" is listed in upend file too
(this means the "upend" file is a list of files and folders contained in "tekwayup_client" folder - but not subfolders and subfiles!)
There is still not clear situation who is ODM and who OEM of these DSOs, which didn't really matter for us.
We know the hardware is identical and we know we can use both firmwares, so who ever write a better firmware - we can use it.