Skip to content

Conversation

@AliMoal
Copy link
Contributor

@AliMoal AliMoal commented Mar 16, 2024

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.

@AliMoal
Copy link
Contributor Author

AliMoal commented Mar 18, 2024

@lulf
Please check this PR.

@lulf
Copy link
Owner

lulf commented Mar 18, 2024

I dont like that its duplicating it all for async, need to think about it and look in more detail

@AliMoal
Copy link
Contributor Author

AliMoal commented Mar 18, 2024

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 😅
Of course I just changed process function due to using embassy-storage-async crate.

obj.offset += data.len() as u32;

let mut response = DfuResponse::new(request, DfuResult::Success);
let mut response = DfuResponse::new(DfuRequest::Crc, DfuResult::Success);
Copy link
Owner

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?

Copy link
Contributor

@plaes plaes Mar 22, 2024

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.

IMG_20240322_123001

Copy link
Owner

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 !

@AliMoal
Copy link
Contributor Author

AliMoal commented Mar 27, 2024

@plaes Your changes in is accepted and merged but my name is not in contributors. ☹️ @lulf

@lulf
Copy link
Owner

lulf commented Mar 27, 2024

@plaes Your changes in is accepted and merged but my name is not in contributors. ☹️ @lulf

The commit was using co-developed-by instead of co-authored-by. I've amended the history to use the latter, and your contribution shows up now.

@plaes
Copy link
Contributor

plaes commented Mar 27, 2024

Ugh, co-developed-by is used by Linux Kernel development. Weird that GitHub isn't supporting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants