CDC And Mass Storage

How do I allow for using both the CDC VCOM and mas storage at the same time? I think this is possible but windows only detects whichever was enabled first.

Theoretically, this is possible but will cause you a lot of headache when it comes to windows and drivers.

Instead, you can switch back and forth between CDC and MSC anytime you like.

This shows how to swtich between the two.
Also, there is an exmaple of CDC + keyboard, but keep in mind what Gus said:
http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/Index.html

Thanks for the response guys but I really need to do a composite device. Why is it that ms.AttachLun throws an exception when i use this with a custom USB device object.

Im doing the following:

device = new USBC_Device(0x5555, 0x0001, 1, 500, "Test", "Test", "0");
ms = new USBC_MassStorage(device, "SD", 1);

ms.AttachLun(0, sdCard, "Testt", "Test");
ms.EnableLun(0);

This gives an exepction with no description. The exception type is Exception and there is no descriptive message. Any ideas?

Anthonyd,

please use the following guidelines when posting issues:
[ol]
[li]Use the code tags (2nd button in the toolbar when posting a message)[/li]
[li]Paste the complete error[/li]
[li]Paste a complete minimal code example that throws the error[/li]
[/ol]

These guidelines will help in resolving your issue faster.

Greetings

Has anyone ever instantiated a USBC_MassStorage object instead of using the default static one? Why is it that this one works:

USBClientController.StandardDevices.StartMassStorage()

but I can’t instantiate my own.

What is the exception?

Also, did you add the Start()?

I mean:


device = new USBC_Device(0x5555, 0x0001, 1, 500, "Test", "Test", "0");
ms = new USBC_MassStorage(device, "SD", 1);

USBClientController.Start(device);

ms.AttachLun(0, sdCard, "Testt", "Test");
ms.EnableLun(0);

Thanks Mike! That was my problem. I was able to setup both the CDC and Mass Storage and both are detected in windows. But now I have a new problem. The CDC driver INF file isnt working. I modified to match the program:

[GHI] 
%CDC%=DDInstall, USB\Vid_5555&Pid_0001&MI_01

[GHI.NTamd64]
%CDC%=DDInstall, USB\Vid_5555&Pid_0001&MI_01

Any ideas?

The “inf file” and windows drivers are beyond the support provided on this forum. Can you please contact GHI directly to learn more about how we can help you.