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.
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.
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.
|
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.