Hello, I am currently working on a project for a device which logs some data to its own flash memory. I then want to be able to extract this data to a host device (laptop, desktop, etc.) over a USB connection. For this, my aim was to use USB mass storage.
Looking at the docs for it ( https://nuttx.apache.org/docs/latest/applications/system/usbmsc/index.html), it appears that in order to allow the files to be downloadable over USB, I need to first unmount the file system that the files were stored in so that the USB interaction doesn't corrupt them. Is there any way around this, or is there a way to make the USB mass storage read only to avoid potential corruption? Not the biggest deal if not. I also see that the default commands for this feature are msconn/msdis. I would be connecting/disconnecting via my own application, which I suppose means I would perform this via ioctls/something. My device will also be using a shell over USB. Is it possible to have the shell functionality suspended by a similar command to `msconn` and then restored when the host driver "ejects" the USB mass storage device? This way the user can toggle between doing other things in the shell and extracting files. If anyone has used this feature and has tips, let me know! Best, Matteo
