I am developing a USB-based peripheral device for use on Windows desktop systems and would prefer to avoid a driver installation step. In part, due to the resources required to develop and sign custom drivers, and in part as third party drivers have proved a significant stumbling block for users.
This suggests the use of a standard USB device class. HID is straightforward and flexible but has poor throughput aggrevated by MCU-specific limitations. Instead I am evaluating a scheme of impersonating a mass-storage device.
The trick being to report the metadata for a FAT filesystem containing a hidden device I/O file, which the interface application then employs raw file unbuffered I/O to communicate through. All data outside of the hard-wired I/O file sectors is reloaded into RAM at enumeration and ignored.
Thus far, this has worked surprisingly smoothly, with fast I/O and enumeration through what is presumably well-optimized path on all systems tested and no privilege elevation. However, this is clearly an abuse of the system and may fall over if Windows decides to, say, detect that the I/O data is being read back inconsistently, to defragment the cluster chain, reformat as exFAT, etc.
My question is whether such a scenario is known to occur in practice, or likely to occur in the near future? Has such a scheme been attempted the past? Will the quantity of dodgy USB mass storage devices out there form an effective shield against the operating system getting fancy?
Finally, are there any other standard USB classes or approaches which I might consider as a more reliable alternative? Windows 10 has finally added standard CDC support yet supporting earlier versions would involve bypassing signed driver installation (plus a history of BSODs, random disconnects and enumeration failures has left me wary of virtual serial devices.)