WIP: Write logs to microSD in HSM mode#196
Open
Sosthene00 wants to merge 7 commits intoColdcard:masterfrom
Open
WIP: Write logs to microSD in HSM mode#196Sosthene00 wants to merge 7 commits intoColdcard:masterfrom
Sosthene00 wants to merge 7 commits intoColdcard:masterfrom
Conversation
Collaborator
|
you need to add your new module |
Author
|
Thanks, very helpful! I'll try again and try to come up with something cleaner |
25c0941 to
9679366
Compare
Author
|
Now it works on the real thing. Here's a summary of the changes made so far:
Please let me know if you think this is going in the right direction. |
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.
Hi, I've been experimenting a lot recently with the CC, especially with the HSM mode, and it happened a couple times that the CC "freezes", it just stops responding at some point without any logs or indication of what happened on the screen. I'd let it run for days, so when it happened I would usually figure it out many hours after. At least once it crashed while signing as the screen was reading "Signing..."
I had a look at what it logged on the microSD and I didn't found it to be very helpful for my situation, so I tried to modify it to write more logs that could help me if it crashes again.
I tested my code with the simulator, and it worked, I could register a policy and then it would sign psbts and write logs on the SD card.

But then I tried to flash an actual CC Mk4 with my custom code, and it crashed on startup with the following error
I tried my code again with the simulator, and it works there. Here's an actual example of the content of a log file I just made like this:
I open this PR as a WIP because I think there might be demand for that, especially as more people will run the HSM mode, it's totally hacky right now but if you agree I'd gladly put on some more work because I need it. I'd just be happy to have a little help and not brick a couple more CC just to figure it out 😄