Just wanted to document somewhere that I was able to update firmware using dfu-util (
http://dfu-util.sourceforge.net) which supports the STM DfuSe extension (
http://dfu-util.sourceforge.net/dfuse.html) used by this scope. dfu-util should be available as a package on most Linux distros, and also on macOS through homebrew, which is what I used.
To begin, place the device in DFU mode as normal (Hold F1 while powering on).
Then as a test and to create a backup of the current firmware, run:
$ dfu-util --device 0483:* -a 0 -s 0x08005000 -U backup.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
Limiting upload to end of memory segment, 503808 bytes
Upload [=========================] 100% 503808 bytes
Upload done.
If that works, then you're communicating with the device properly, so let's use the .dfu package to write the new firmware:
$ dfu-util --device 0483:* -a 0 -D HantekHTX2020070701.dfu
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Match product ID from file: 0000
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
file contains 1 DFU images
parsing DFU image 1
image for alternate setting 0, (1 elements, total size = 229444)
parsing element 1, address = 0x08005000, size = 229436
Download [=========================] 100% 229436 bytes
Download done.
done parsing DfuSe file
Finally, we need to exit DFU mode. dfu-util lets us do this, but not without doing another upload/download action. So let's read the firmware out again and also pass along the "leave" command to kick the device out of DFU.
$ dfu-util --device 0483:* -a 0 -s 0x08005000:leave -U backup_new.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
Limiting upload to end of memory segment, 503808 bytes
Upload [=========================] 100% 503808 bytes
Upload done.
Transitioning to dfuMANIFEST state
And finally, just to describe the command line flags used here: the --device flag picks the device, and while the raw binary reading isn't picky, the DfuSe mode wants this to match what's specified in the .dfu file, so 0483:* matches that. "-a 0" matches the DFU endpoint for the internal flash. SPI and NOR flash also seem to be exposed:
Found DFU: [0483:df11] ver=0200, devnum=9, cfg=1, intf=0, path="253-1.3", alt=2, name="@NOR Flash : M29W128F/0x64000000/0256*64Kg", serial="XXXXXXXXXXXX"
Found DFU: [0483:df11] ver=0200, devnum=9, cfg=1, intf=0, path="253-1.3", alt=1, name="@SPI Flash : M25P64/0x00000000/128*64Kg", serial="XXXXXXXXXXXX"
Found DFU: [0483:df11] ver=0200, devnum=9, cfg=1, intf=0, path="253-1.3", alt=0, name="@Internal Flash /0x08000000/06*002Ka,250*002Kg", serial="XXXXXXXXXXXX"
Hopefully this is useful to someone!