On 02/11/2019 11:13, Barry Jackson via Groups.Io wrote:
On 01/11/2019 22:48, QRP RX wrote:
On Fri, Nov? 1, 2019 at 07:46 PM, Barry Jackson wrote:
I notice that some .dfu firmware files that I have seen are in the 80kB to
100kB plus so the 16kB looks wrong to me.
16 kB is a page size. It means data chunk size which controller can accept for flashing.
So, software needs to split 80-100 kB firmware to 16 kB data chunks and send it one-by-one.
Thanks for your reply,
However I am not trying to upload to the vna, I am trying to download the existing firmware for backup.
The dfu-util man page says:-
"
-t, --transfer-size? SIZE
Specify the number of bytes per USB transfer. The optimal value is usually determined automatically so this option is rarely useful. If you need to use this option for a device, please report it as a bug.
"
Which is why I did not specify a -t option.
If I do, the max limit seems to be 4096, but the resulting file size is still only 16k.
What am I missing?
Barry
G4MKT
OK, I was missing the start address.
###############################################################
[baz@localhost Original]$ dfu-util -a 0 -s 0x08000000 -U original.bin -vv
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
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 2048
DfuSe interface name: "Internal Flash "
Memory segment at 0x08000000 64 x 2048 = 131072 (rew)
Limiting upload to end of memory segment, 131072 bytes
Poll timeout 72 ms
Poll timeout 72 ms
Upload [=========================] 100% 131072 bytes
Upload done.
[baz@localhost Original]$
#############################################################
So, armed with this backup, I felt more confident to try to upload your (QRP) firmware.
#############################################################
[baz@localhost NanoVNA]$ dfu-util -a 0 -D NanoVNA-0.3.0m.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
Match vendor ID from file: 0483
Match product ID from file: 0000
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 = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
file contains 1 DFU images
parsing DFU image 1
image for alternate setting 0, (1 elements, total size = 87457)
parsing element 1, address = 0x08000000, size = 87449
Download [=========================] 100% 87449 bytes
Download done.
done parsing DfuSe file
[baz@localhost NanoVNA]$
##############################################################
Seems to be working fine so far. Phew!!
Barry
G4MKT