Skip to content
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

Fixes SoftDevice OTA updates #1897

Merged
merged 3 commits into from Aug 29, 2019

Conversation

@avtolstoy
Copy link
Member

commented Aug 29, 2019

Problem

  1. The bootloader doesn't correctly handle MODULE_INFO_FLAG_DROP_MODULE_INFO flag. The returned module info for the SoftDevice module is a copy into a static variable, so direct pointer comparisons can't work.
  2. The state checksum doesn't change after an update of either SoftDevice or NCP module, which causes the device to get stuck in safe mode

Solution

  1. Use memcmp() instead
  2. Add a dummy suffix structure to module info and fill SHA for NCP and SoftDevice modules

This should probably be backported into 1.3.0 default

Steps to Test

  1. Flash the bootloader and then flash the SoftDevice binary OTA. It should apply correctly.
  2. TBD on staging.

Example App

N/A

References

N/A


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)
avtolstoy added 3 commits Aug 29, 2019
[gen3] radio stack: return radio stack module info should include a s…
…uffix with a 'unique' SHA in order for OTA upgrade to work correctly
[gen3] ncp: returned NCP module info should include a suffix with a '…
…unique' SHA in order for OTA upgrade to work correctly

@avtolstoy avtolstoy added the bug label Aug 29, 2019

@avtolstoy avtolstoy added this to the 1.4.0-rc.1 milestone Aug 29, 2019

@avtolstoy avtolstoy requested review from m-mcgowan, sergeuz and XuGuohui Aug 29, 2019

@avtolstoy avtolstoy removed request for sergeuz and m-mcgowan Aug 29, 2019

@avtolstoy avtolstoy merged commit 3af8b3b into develop Aug 29, 2019

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@avtolstoy avtolstoy deleted the fix/softdevice-ota branch Aug 29, 2019

@avtolstoy avtolstoy referenced this pull request Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.