I’m currently trying to get the filesystem demo working on an external SSD that I have on hand. It’s a 500Gb Samsung drive formatted to exFat.
When I attempt to mount the filesystem, the InvalidOperationExcecption is thrown, and I don’t really know what’s going on. The DeviceconnectionEventArgs read just fine, as well. I’ve pasted the snippet of my code where the exception is being thrown below, any help is appreciated.
Additionally, I’m new to how you’re supposed to interact with a filesystem like this. My goal is to simply have the ability to write .bin/.txt files to the drive at the very least. If anyone has recommended reading or videos to this, that would be great too.
File System The file system library is subset of the full .NET file system support. Most example should work with without minor changes. The internal drivers fully support FAT16 or FAT32 file systems, with no limitations beyond the FAT file system itself! USB Mass Storage This allows file access on USB devices with MSC class, such as USB memory sticks. See the USB page. SD Card SD and MMC cards are fully supported as detailed on the SD tutorial page. The example below requires the GHIElectronics.TinyCLR.IO…
Are you suggesting that exFat does not fit into FAT16 or FAT32? Other than that, I mount the filesystem the same way as the demo does here, and the demo does in the USB tutorial.
@Mike@Gus_Issa That makes sense, I’ve reformatted the drive to be in FAT32. I’m running into an issue when attempting to execute the non-static write function on the Filestream object. What’s interesting is that the exception being thrown is from the GHIElectronics.TinyCLR.IO.dll, while I was under the impression that until the FileSystem.flush line, the filestream business was currently from default C#. I’ve posted a screenshot of my code and error below, and I’m using this tutorial from GHI File System, now with FAT32 drive. The “drive info section” from the USB tutorial works just fine now.
@Mike when you say USB 1, I take it you mean the USB 1.0 protocol? If so, I thought new versions of SITCore were designed to support fast USB transfer (as their old filesystem specific chips had USB phy implementations), which leads me to believe that USB 2.0 at the very least would be supported. @Gus_Issa The drive is a relatively new Samsung “portable SSD” line that has a single 20GB partition in FAT32 allocated, though its full capacity is 500 GB, the rest is unallocated for the purposes of my testing. I’m not attached to USB flash storage over SD flash storage, but final implementation has to be extremely vibration resistant, and SD cards generally don’t fit that bill.
@Mike problem with that is then can’t format in FAT32, right? At least in Windows, I had to drop the size down to under 32GB before FAT32 formatting was allowed. @Gus_Issa is the analyzer a program or are you referring to something at home base?
@Mike@Gus_Issa I’m gonna get my hands on a USB 2.0 drive tomorrow and see if that affects anything. Thanks for the tip about the command line Gus, will update.