Skip to content

New Secure DFU op codes, including Abort #447

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

Merged
merged 4 commits into from
Jul 30, 2021

Conversation

philips77
Copy link
Member

SDK 15 added new Op Codes to DFU bootloader (before, after):

Op Code Name
0x00 Get Protocol Version
0x07 Get MTU
0x08 Write
0x09 Ping
0x0A Get HW Version
0x0B Get FW Version
0x0C Abort

This PR adds them to supported commands, and adds support for Abort request. The other requests are not used and were added for completeness.

Before this PR, Secure DFU was disconnecting in case of an error, leaving the bootloader in its state. The bootloader would eventually timeout, switching back to Application mode after few minutes. With the new Abort request, this is instantaneous. When using bootloader from SDK 12-14 the lib will try to send Abort request, which will be responded with Op Code Not Supported, after which the lib will revert to old behavior and disconnect.

The new behavior is automatic and does not require any changes in the app's code.

@philips77 philips77 changed the title New secure dfu op codes New Secure DFU op codes, including Abort Jul 30, 2021
@philips77 philips77 merged commit af8f87a into develop Jul 30, 2021
@philips77 philips77 deleted the feature/new-secure-dfu-op-codes branch July 30, 2021 10:10
@philips77 philips77 mentioned this pull request Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant