Open karniv00l opened 1 year ago
Hello!
Unfortunately we have not developed the DFU format afaik so that's probably why it doesn't work. It's writing the .dfu like it is a .bin file
If you have time feel free to make a PR. Otherwise maybe someone will take it at some point (maybe @yozhgoor if he wants to get into embedded development :grin:)
Can you briefly talk about what work to do, or what documents to refer to, so that it can support files in dfu format? I have the time and interest to perfect it. @cecton
hmm ... I will try :sweat_smile: @biner88
So... to avoid writing another state machine for the "download" command, we would need to make a reader (impl std::io::Read) that wraps the .dfu
file. I think that's what I would do. You can even put that in a separate crate if you want (this could be useful for others I suppose?).
Then, in the DfuSync
, we would need a new method that takes a .dfu
file in argument.
Does that help? You probably need to find the specs for the .dfu file somewhere or just copy/inspire from the source code of dfu-util directly.
Sorry for replying so late, we finally used the bin file to update it. Thanks for sharing the crate.
No problem! I will keep the ticket open because it's a feature request (and it's useful)
Hi there,
firstly, thank you for this great library! I've stumbled upon it when researching DFU libraries for a Flutter package I was planing on developing.
I did some quick tests, flashing both
.bin
and.dfu
formats. So the.bin
file works flawlessly without specifying address or interface, but after.dfu
is downloaded, the microcontroller won't boot/run properly. The chip is STM32F405.Here's how I tested it:
dfu-libusb
For both bin and dfu files, I use the same command, just a different file:
Binary
DFU
dfu-util
Compared to
dfu-util
which works for both files, but different args are required:Binary
DFU
I'm attaching logs for both executions:
logs_bin.txt logs_dfu.txt
not sure how much you can help me here, but I appreciate your time.