Gathering all the threads from various places about the USB storage issues.
- SPI flash read command appear to be crash
- Bus Pirate 5 resetting itself, causing storage corruption
- Storage Not Detected on BP5
- Storage architecture discussion
- USB Mass storage and local FATFS conflicts
I’m pretty sure there are several more. I will note one bug effecting me since the flurry of updates to the MSC switching:
- The first time I connect to Windows the serial port won’t open.
A big chunk of the issues are under Linux distros. I am totally unqualified to debug that, but a bunch of people with a lot of experience have tried and it seems like things are still buggy with the report of SPI flash command 0 length files.
Here is what I propose (or rather will dictate from above with a git push):
USB | ||
---|---|---|
USB CDC (serial port) | Closed | Open |
USB MSC (disk) | Enabled | Disabled |
The USB MSD drive will no longer be visible when the serial port is open. This should help with the errors caused under Linux when the drive goes from Read/Write to Read Only. It will also stop the unexpected by users behavior that the device connects/disconnects to refresh the file list on the host OS.
A big bummer here is that the current setup works great for me under Windows. If I dump a flash to a file I can just drag it off the drive and move on with my life. Now there will be extra steps.
I will try to add a config option for a degraded mode compatible with whatever Linux irregularity causes this issue. Assuming this change does actually fix it under Linux, which is yet to be seen.
More drastic
If this still isn’t a solution, then I will use the button to force to USB MSC mode, otherwise the drive will not be visible.
MTP
MTP is not an option unless someone volunteers to write an MTP driver for TinyUSB and then support users through all this.