fix: the last DFU state of non-manifestation tolerant devices should be DfuManifestWaitReset#29
fix: the last DFU state of non-manifestation tolerant devices should be DfuManifestWaitReset#29matteo-meluzzi wants to merge 2 commits into
DfuManifestWaitReset#29Conversation
|
@cecton can you determine whether this is a bug in dfu-core? I am not very familiar with the details of how usb dfu works myself. |
|
hey! sorry I completely missed the PR somehow. I will look into it |
cecton
left a comment
There was a problem hiding this comment.
The doc seems to agree with the WaitReset but when I tested on my device it fails:
[/home/deck/repos/dfu-libusb/src/lib.rs:135:17] &functional_descriptor = FunctionalDescriptor {
can_download: true,
can_upload: true,
manifestation_tolerant: false,
will_detach: true,
detach_timeout: 255,
transfer_size: 2048,
dfu_version: (
1,
26,
),
}
The error is really not helpful:
Error: could not write firmware to the device
Caused by:
0: rusb: Input/Output Error
1: Input/Output Error
I'm sorry it will take a bit more time for me to validate this. If you know anybody who can give feedback on this or if anyone is passing by and looking at this issue, don't hesitate to comment.
| (State::DfuManifest, State::DfuIdle) | ||
| } else { | ||
| (State::DfuManifest, State::DfuManifest) | ||
| (State::DfuManifest, State::DfuManifestWaitReset) |
|
@matteo-meluzzi maybe it's worth checking with the folks of embassy-dfu-usb? They are probably way more knowledgeable about this than me and will have an idea. I tested on a real device I use for a client and this PR seems to break the final step at the end. So it's also possible that the error might be in embassy-dfu-usb rather than here. |
|
Hi @cecton, thank you very much for looking into this. Indeed it's entirely possible that there is a bug in embassy-dfu-usb. I will contact a maintainer of that project and ask them. Thanks again for your help and this super useful crate! 🤠 |
|
Thanks!! Please keep me updated on this I really want to help, I'm just really unsure because I tested on a real device and it doesn't seem to behave properly if I apply the fix here. |
|
After talking with someone with more experience, it seems that the issue is indeed on the embassy side. Thanks very much for your help! Thanks for making this amazing crate! |
|
Thank you so much for you motivating words 💙 it really helps. I maintain this crate for work but it's not always easy and I'm happy to hear it's useful to someone. |

I ran into the following error while trying to update a non-manifestation tolerant device which uses embassy-usb-dfu in the firmware:
Therefore, there must be a mistake either in this library or in
embassy-usb-dfu.By looking at other implementations like this one, I think that the mistake is in
dfu-core.Could you please double check?