Repository navigation
Conversation
The TCP server always started with an empty store. With SE050_SIM_STORE=<path> it uses ObjectStore::with_persistence, so a simulated chip keeps its objects (keys, counters, Authentication Objects) across restarts, like a real one. Unset, nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The optional object-store persistence change has no active review issues.
No open issues 🎉
What changed in this PR
Enables optional object-store persistence in the SE050Sim TCP server by connecting SE050_SIM_STORE to the existing persistence implementation.
Changes:
- Loads a persistent store when
SE050_SIM_STOREspecifies a nonempty path, allowing simulated objects to survive restarts. - Preserves in-memory behavior when the variable is unset or empty.
| File | Description |
|---|---|
SE050Sim/se050-sim/src/bin/tcp_server.rs |
Selects persistent or in-memory storage based on SE050_SIM_STORE and logs the configured persistence path. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SE050Sim TCP server always starts with an empty object store, although
ObjectStore::with_persistencealreadyexists. This wires it to an environment variable: with
SE050_SIM_STORE=/path/store.jsonthe simulated chip keeps itsobjects (keys, counters, curves, Platform SCP03 keys) across restarts, like a real SE05x. Unset, nothing changes.
We use it to keep a simulated SE05x running as a lab service (in a container, with a volume) behind a hardware I2C
bridge, so firmware under development finds its keys after the simulator restarts.
We drive the simulator from real microcontrollers over I2C through a small ESP32-S3 bridge, https://github.com/shosoin/se05x-lab-bridge, in case it is useful to others.
🤖 Generated with Claude Code