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

NRF52 - Remove file totally before opening write #5916

Merged
merged 9 commits into from
Jan 24, 2025
Merged

Conversation

thebentern
Copy link
Contributor

Given the discoveries in #5839, I believe we should abandon the seek(0) / truncate approach to opening files to write, as this has issues in the current NRF52 framework version of LittleFS.
The more crude approach of removing the file from the filesystem prior to opening for write seems to be the only path forward, unless I am overlooking an alternative approach.

@thebentern thebentern changed the title Remove file totally before opening write NRF52 - Remove file totally before opening write Jan 23, 2025
src/SafeFile.cpp Outdated Show resolved Hide resolved
@esev
Copy link
Contributor

esev commented Jan 23, 2025

I've reached the same conclusion. Thanks for this.

@todd-herbert let's try to get this one merged too meshtastic/Adafruit_nRF52_Arduino#1. I think this PR and yours should resolve the issues folks are seeing.

Note: I'm away from my test node till Monday, so I can't test. But peeking in on the logs shows it is still running after removing 85de193 & 1c0f43c. So I expect this PR to work just fine.

Copy link
Contributor

@todd-herbert todd-herbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely agree! Just one line that might want attention first though.

src/mesh/NodeDB.cpp Outdated Show resolved Hide resolved
@todd-herbert
Copy link
Contributor

let's try to get this one merged too meshtastic/Adafruit_nRF52_Arduino#1. I think this PR and yours should resolve the issues folks are seeing.

I'll bring that one forward to match the upstream PR on the Adafruit repo and then yeah lets go ahead with it.

@todd-herbert
Copy link
Contributor

Give me just a few minutes for a quick test run on real hardware 🙏

Copy link
Contributor

@todd-herbert todd-herbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to all be running well here! (Tested on T114)

Copy link
Contributor

@fifieldt fifieldt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense.

@thebentern thebentern merged commit 0d86088 into master Jan 24, 2025
57 checks passed
@thebentern thebentern deleted the remove-first branch January 24, 2025 01:40
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

Successfully merging this pull request may close these issues.

4 participants