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

Improve UpdateConfig command #1586

Merged
merged 1 commit into from
Mar 12, 2020

Conversation

josesimoes
Copy link
Member

Description

  • Add "Done" field.
  • Update declarations of ConfigurationManager_StoreConfigurationBlock to handle new parameter.
  • Update code accordingly, namely on ESP32 and STM32 that can only perform enumeration after receiving the last chunk.

Motivation and Context

  • Targets that receive configuration block in chunks (because of payload size limitations) were performing the enumeration of the config blocks after receiving each chunk. This is not OK because the enumeration should be done only after the last chunk is received.
    In particular this was causing issues when the first chunk didn't contain a network configuration which causes both ESP32 and STM32 to self-create one of these which is wrong and can have a number of side effects. Ranging from overwriting the data that was just received, start writing it after the initial block, writing on flash memory that was supposed to be erased causing the next write operation to fail).

How Has This Been Tested?

  • Debugger WPF test app.

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: josesimoes jose.simoes@eclo.solutions

- Add "Done" field.
- Update declarations of ConfigurationManager_StoreConfigurationBlock to handle new parameter.
- Update code accordingly, namely on ESP32 and STM32 that can only perform enumeration after receiving the last chunk.

Signed-off-by: josesimoes <jose.simoes@eclo.solutions>
@nfbot
Copy link
Member

nfbot commented Mar 12, 2020

Hi @josesimoes,

I'm nanoFramework bot.
Thank you for your contribution!

A human will be reviewing it shortly. 😉

@josesimoes josesimoes added Area: Common libs Everything related with common libraries Series: ESP32 Everything related specifically with ESP32 series targets Series: NXP i6 Everything related specifically with NXP targets Series: STM32xx Everything related specifically with STM32 targets Series: TI-CC13x2_26x2 Breaking-change labels Mar 12, 2020
@josesimoes josesimoes merged commit 6e9338e into nanoframework:develop Mar 12, 2020
@josesimoes josesimoes deleted the improve-updateconfig-cmd branch March 12, 2020 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Common libs Everything related with common libraries Breaking-change Series: ESP32 Everything related specifically with ESP32 series targets Series: NXP i6 Everything related specifically with NXP targets Series: STM32xx Everything related specifically with STM32 targets Series: TI-CC13x2_26x2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants