Custom USB Device code needed

Hey everyone,
Anyone know of a tutorial on creating both the client side USB host code in Windows and custom USB device code for FEZ Domino for transferring binary stream data? I want to make FEZ Domino a simple controller of switches and sensors and I’ve been using the CDC, but it is pretty slow. The FEZTerm was a great example of a nicely documented tutorial for CDC. I’m looking for the same thing for building a custom USB Device. I’m thinking libusb for the Windows side. There is a .NET library and it has plenty of good support, including a wizard to create the .inf file. Let me know what you think.

The most I can find on the subject is at: http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/html/d90687b4-c3b4-c73e-6d04-63a1df404437.htm

If I could pull all the information together, I would be glad to put together a tutorial. I just don’t know where else to look.

Thanks,
Greg

Before we dig into details, can you explain what is “slow”? What do you see now and what do you expect to see instead?

Making your own driver has its advantages but it is not going to give you much speed improvement! Otherwise, GHI would have done all the work and gave you everything ready to go :slight_smile:

What version of windows are you using? Do you have latest updates? I know windows had major problem in CDC driver where the max you could get out of it was 64KB but I been told this was changed and it is very fast now.

You can send/receive byte[] data with the serialport class and CDC at full blast usb. AFAICT, you would not gain much by going down another level. Essencially, you would be creating an abstraction of serialport. Could be wrong, much work and not much (if any) gain in speed.

I do have a related question to this. When using CDC, does the Baud rate setting even do anything? Or is it just wire speed regardless of baud rate?

Baud rate doesn’t change anything on CDC as it is virtual

Technically the baud rate for CDC is a command sent to the device to request a baud change on the serial port(not USB). This doesn’t affect the USB pipe and the Panda just ignores it.

In one of my PIC projects I do consume that command to change the baud of the serial port as my PIC acts as a USB <-> Serial adaptor connected to a GPS.

I have used custom HID devices in my PIC projects before. You don’t need a driver on the PC as it already has drivers for HID. It also gives you nicely framed packets so you don’t have to write a whole protocol/packet layer. But I doubt that it will be faster, I think HID is speed throttled…