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

(roadmap proposal) Text-based configuration management #91

Open
kpfleming opened this issue Apr 14, 2024 · 5 comments
Open

(roadmap proposal) Text-based configuration management #91

kpfleming opened this issue Apr 14, 2024 · 5 comments

Comments

@kpfleming
Copy link
Contributor

As noted in #72, it would be useful for users to be able to manage their configuration without having to compile/recompile firmware. This would also allow users to upgrade to new firmware releases directly using builds from the repository (and via LVFS).

I've been working on a plan for this, which includes a number of steps:

  1. Implement firmware and configuration upload/download via DFU (DFU support (Phase 1) #78)
  2. Cleanup config_t and ensure that it includes all of the user configuration (including KBD_LED_AS_INDICATOR, HOTKEY_TOGGLE, etc. which are currently compiled directly into the code) (implemented)
  3. Add a host-side tool which can import/export configuration using an INI-style text file (implemented, example INI file)
  4. Add INI upload/download via DFU
  5. Use INI export/import during the DFU firmware upgrade process to preserve configuration across firmware upgrades that change the configuration version

I'm using minIni as the INI-file library, it's small enough and simple enough to be incorporated into the firmware without a major increase in size.

I waited to open this issue until I had items 1-3 already implemented and tested, to be certain that I actually could implement them :-)

All feedback welcome; if this approach is acceptable, I'll open followup PRs as each of the earlier ones are merged, eventually getting to completion at step 5.

@raldnor
Copy link

raldnor commented Apr 15, 2024

Great work! Excellent documentation in the ini-files as well. Would it be possible to protect the DFU ini upload with something like a password or pin, requiring a new firmware upload to reset such a password/pin?

@hrvach
Copy link
Owner

hrvach commented Apr 15, 2024

I have an alternative idea for a friendly config without any external software, but need to try a proof of concept when I'm finally back from work trip - I'm curious if it would be feasible.

Sorry for being slow lately guys, but work is a bit crazy.

Also, @kpfleming your config cleanup changes are great and long overdue on my end. Whatever the interface to change the config ends up being, having it configurable is always a good idea :)

@kpfleming
Copy link
Contributor Author

Great work! Excellent documentation in the ini-files as well. Would it be possible to protect the DFU ini upload with something like a password or pin, requiring a new firmware upload to reset such a password/pin?

All things are possible :-) It's a little challenging to use any sort of shared-key mechanism when the device doesn't have a user interface, though.

@jalmeroth
Copy link
Contributor

It's a little challenging to use any sort of shared-key mechanism when the device doesn't have a user interface, though.

What about pressing the BOOTSEL button instead?

@kpfleming
Copy link
Contributor Author

I have an alternative idea for a friendly config without any external software, but need to try a proof of concept when I'm finally back from work trip - I'm curious if it would be feasible.

The approach I'm working on doesn't require any external software, but it was much easier to develop/debug the INI-handling code outside of the firmware. In addition, once it is in the firmware if the user attempts to upload an invalid configuration, there's no way for the firmware to report back errors to let them know what was wrong, so I think having an external tool that can be used to validate the configuration will be useful.

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

No branches or pull requests

4 participants