I posted this to the end of my first question thread but no one answered, so I thought I’d start it in a new thread. I need to use the USB Raw Device class in .NETMF but I’m unsure of what the procedure would be and what some of the data needs to be.
Some background on my project:
I have a LabView GUI that sends 4 commands to my board (which has the FT2232H chip) via USB. I’m trying to replicate that using the FEZ Cobra. I installed USBlyzer and watched the USB stream when I used the LabView GUI to send the commands. It saw 4 commands, 8 bytes each, separated by 8-byte buffers. I have no intention of reading from the FT2232H chip (that’s not my short-term goal, at least).
What I don’t understand:
I came across some example codes which I tried to decipher. In each of them, after using OpenPipe to open up a communication channel to the USB client, SendSetupTransfer was called before anything else was done. I read the USB setup packet but I still don’t know how to set it up (and I don’t know if I have to set it up). Would any of the bytes in the 4 commands I want to send to the FT2232H chip be sent through the SendSetupTransfer command or would it be through TransferData?
Can anyone tell me what I should write in the SendSetupTransfer arguments if I need to call it? For “bmRequestType”, bit 7 is probably 0 (host to device). Bits 6 and 5 are probably Class or Vendor, and bits 4-0 are most likely Endpoint. But I’m not certain. I also don’t know what the “bRequest” would be! Help?