adafruit / adafruit/Adafruit_Wippersnapper_Arduino

Add recovery fallback for secrets.json file

Open
#898 0 comments 0 reactions 0 assignees View on GitHub
enhancement filesystem
Dominant language
C++
Stars
54
Forks
56
Avg merge
2d 12h
Merged PRs (30d)
11

Description

Sometimes the `secrets.json` is either deleted (accidentally) or corrupted. Instead of this, @tyeth and I were discussing a way to store, on boot, the `secrets.json`'s content in-memory and persist it through boot cycles.

On boot, the device would:
1) check for the existence of this content, recover it and place into a new secrets.json file on the FS
2) create a new `secrets.json` file (current operation)

We'd need to:
* Profile the secret.json max. possible size
* Consider using a struct or just a string depending on serialization/deserialization difficulty.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the boot-time handling for secrets.json and the filesystem operations that create it. Profile the file's maximum size, then evaluate whether an in-memory struct or string can be serialized and restored; done means a missing or corrupted secrets.json is recovered across boot cycles.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, cpp
Domain
embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.