-
Notifications
You must be signed in to change notification settings - Fork 1.3k
"Cannot remount '/' when USB is active." even when USB disconnected (nRF52840) #2509
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
Comments
I think |
@frank1119 yes, that works. What I'm trying to achieve is to write to the storage without having to tell the user to restart the device with one of the buttons pressed down. It makes sense that we'd be able to remount the storage as writable when the USB is not connected. |
ah i think that is not possible at this time - we'd need #544 first |
im sure it would be greatly appreciated! when dan & scott are awake they can comment further :) |
Maybe setting a flag in nvm (if possible) to test during boot? |
@frank1119 that's a good workaround. I tested and the nvm size on the nRF52840 seems to be 8kb. Our use case is uploading new code/assets through Bluetooth, so this will restrict us to around 8kb at a time, but it's still better than nothing. Thanks for the suggestion! |
@urish I was not suggesting to use nvm as storage, but it is surely a way to think out of the box :-) |
@frank1119 yeah, temporary storage :-) |
@urish I think this issue just needs That being said, I want to add a circuitpython service for uploading and downloading files. The beginnings of it are here: https://github.com/adafruit/circuitpython/blob/master/supervisor/shared/bluetooth.c I want to do a rev on the API but that is my long term way of doing it. |
@tannewt Thanks for the feedback! The file transfer services look interesting, have you considered how it would play together with the USB storage? |
Only a bit. My thinking would be that first one wins. So if you are on USB first then BLE would be read-only. If you are on BLE first then USB would be read-only. If you unplug from USB then you can be granted write access too. |
I'm getting a "Can't remount '/' when USB is active" error, when calling
storage.remount("/", False)
, despite the fact USB is not connected while the command is running.Steps to reproduce
The board has to be battery powered, so that it keeps running the code even when USB is disconnected.
success
anderror
. You will see this output:The text was updated successfully, but these errors were encountered: