-
Notifications
You must be signed in to change notification settings - Fork 3
Add async version and bug fix #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@lulf |
|
I dont like that its duplicating it all for async, need to think about it and look in more detail |
At least confirm the bug fix commit 😅 |
| obj.offset += data.len() as u32; | ||
|
|
||
| let mut response = DfuResponse::new(request, DfuResult::Success); | ||
| let mut response = DfuResponse::new(DfuRequest::Crc, DfuResult::Success); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand this change. The first parameter here is the originating request, the Crc is set in the body: https://github.com/lulf/nrf-dfu/blob/main/src/dfu.rs#L455-L463 Changing the request type to be Crc instead of Write doesn't make sense to me. Are you seeing a bug occuring without this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that combination of this patch + lulf/watchful#7 fixes the DFU process when Packet Receipt Notification Procedure is enabled, as previously it always hanged when it was enabled.
Though it's not 100% working yet, as first DFU attempt immediately fails, and then second one works, but certainly this one is a small improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks for confirming @plaes !
|
Ugh, |

According to Nordic Documentation for SDK v17.x.x, the response of the Write command must be None or if PRN is enabled, it should send CRC response.
Another feature which is added is async version of this crate.
All of the changes are tested.
Please merge it.