Chuck(G)
25k Member
I've got an interesting dilemma on my hands and am trying to think of a rational solution.
I have a large MCU connected to a PC via USB. I'm using CDCACM class for text-mode interaction, but want to make data available to the connected PC for download only. The OS on the PC is nonspecific; it could be anything (MacOS, Windows, Linux, etc.), so long as it supports standard USB device types.
Normally, I'd implement the file transfer as communication with a USB MSD class, but that assumes that the host PC knows something about the file system that I'm using on the MCU (e.g. FAT32). But if I want to implement my own filesystem (for reasons of efficiency), the PC host won't know it.
So USB MSD class seems to have some drawbacks. If I were using a TCP/IP connection, I could use, say, ftp to perform the transfer, as ftp was designed to be filesystem and OS-agnostic. The same picture applies for simple file transfer such as XMODEM. But it's not a lead-pipe cinch that the PC OS will know anything about XMODEM, Kermit or other older file transfer protocols.
Basically, I'm looking for a device class or method that is filesystem-agnostic that can be hosted with standard USB classes. File transfer will be simple--the PC host gets the whole file starting at the beginning and proceeds to the end. PC-to-MCU file transfer is not supported.
Any suggestions?
I have a large MCU connected to a PC via USB. I'm using CDCACM class for text-mode interaction, but want to make data available to the connected PC for download only. The OS on the PC is nonspecific; it could be anything (MacOS, Windows, Linux, etc.), so long as it supports standard USB device types.
Normally, I'd implement the file transfer as communication with a USB MSD class, but that assumes that the host PC knows something about the file system that I'm using on the MCU (e.g. FAT32). But if I want to implement my own filesystem (for reasons of efficiency), the PC host won't know it.
So USB MSD class seems to have some drawbacks. If I were using a TCP/IP connection, I could use, say, ftp to perform the transfer, as ftp was designed to be filesystem and OS-agnostic. The same picture applies for simple file transfer such as XMODEM. But it's not a lead-pipe cinch that the PC OS will know anything about XMODEM, Kermit or other older file transfer protocols.
Basically, I'm looking for a device class or method that is filesystem-agnostic that can be hosted with standard USB classes. File transfer will be simple--the PC host gets the whole file starting at the beginning and proceeds to the end. PC-to-MCU file transfer is not supported.
Any suggestions?