I found this site while exploring search results for various embedded systems communities. I've heard of element14 plenty in the past and I'm surprised I didn't think of visiting here sooner. As implied, I'm new and I might not be aware of site/forum specific rules, so please let me know if something is off or if there is a better place to make this post.
I'm working to create a bridge between one device that saves logs to a flash drive automatically and a PC to handle those logs. I've gotten the first step down for the most part, which is enumeration; I plug my device in and it appears to my computer as a mass storage device. I'll need this device, which I cannot alter, to think of it as a generic flash drive. The next step I need to achieve is to be able to send it a file or information in a standard way. Right now the device manager detects my device as a MSD but it doesn't show up under the same place my other drives do in file explorer. I'm not surprised about this, I haven't yet implemented any functions that would actually do anything if I could access it anyway.
I learned that enumeration takes place on endpoint 0 and I need to handle standard requests I receive from there. Now I believe I need to work with SCSI commands that will be passed into my bulk endpoints. I'm working with the VNC2 which includes a lot of drivers and functionality, but no mass storage device drivers, but it handles a lot of basic USB operations that made handling standard requests and enumeration pretty simple. It has a code/function called VOS_IOCTL_USBSLAVE_WAIT_SETUP_RCVD and its description says it blocks until it receives a setup packet. I do not know how this is implemented as that is hidden from me, but that is how I receive the setup packets for the enumeration process and I feel that that is something I need to do for my Bulk_Endpoint_Out; have it listen for a request and the be able to parse and respond. I don't know if I can re purpose that function to listen for these other commands or not. Does anyone have any advice on how I might be able to do that? If my assumptions are wrong, please let me know. If my assumptions are correct, that'd also be good to hear. I'm trying to understand it all and do a good, thorough job with this project and advice from community members around the world has been key to my successes so far.
Thanks!
Jesse