Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length



Pages: [1]
  Print  
Author Topic: Driver for CDC VCOM  (Read 397 times)
hermi1981
Newbie
*
Posts: 4


View Profile
« on: February 11, 2010, 06:30:52 AM »

Hi there.

I am trying to realize a communication between USBizi and the PC using a virtual com port over the USB cable. I have used the following Source Code:

ushort maxpower = 500;
USBClientDevice myUSBDevice = null;
USBClientClasses.CDC cdc = null;
try
{
    myUSBDevice = new USBClientDevice((ushort)USBClientDevice.USB_IDs.VID_GHI, (ushort)USBClientDevice.USB_IDs.PID_CDC, 0x100, maxpower, null, "CDC VCOM", null, true);
    cdc = new USBClientClasses.CDC(myUSBDevice, "CDC VCOM");
    myUSBDevice.Start();

    // wait untill the USB Device is ready
    while (myUSBDevice.GetPortState() != Microsoft.SPOT.Hardware.UsbClient.UsbController.PortState.Running)
    { }
 }

catch (Exception e)
{
    Debug.Print("Error Initializing CDC Device: " + e.Message);
 }


I get no Compiler Error and a new device is recogniced by Windows (Windows 7 x64). But where can i ffind the correct driver for this new device. I have tried the one provided with the Example Projects but my system keeps saying that this driver is for the wrong device.

What am i missing here? Thanks for your help.
Logged
GHI_Support
Administrator
Hero Member
*****
Posts: 1252


View Profile
« Reply #1 on: February 11, 2010, 09:49:52 AM »

Please take a look at our library USBClientDevice documentation under "More Important Information". From documentation:
Quote
USBClientDevice myUSBDevice = new USBClientDevice((ushort)USBClientDevice.USB_IDs.VID_GHI, (ushort)USBClientDevice.USB_IDs.PID_CDC, 0x100, maxPower, null, "CDC VCOM", null, false);
USBClientClasses.CDC cdc = new USBClientClasses.CDC(myUSBDevice, "CDC VCOM");
Note that last parameter is false not true. This is to disable USB debugging.
« Last Edit: February 11, 2010, 09:51:24 AM by GHI_Support » Logged
hermi1981
Newbie
*
Posts: 4


View Profile
« Reply #2 on: February 12, 2010, 04:16:04 AM »

Hi.

Yes my mistake i should have loked at the documentation more carefully. Now i have replaced:
(ushort)USBClientDevice.USB_IDs.PID_CDC
with the following:
(ushort)USVClientDevice.USB_IDs.PID_DEBUG_PLUS_CDC

Now the example CDC driver works and I am able to recieve data at the PC. But the debugging driver is not certified. I know i can disable this signature check in Windows 7 at startup. But this is kind of inconvenient.
Logged
SupportAdmin
Administrator
Hero Member
*****
Posts: 5394



View Profile WWW
« Reply #3 on: February 12, 2010, 08:16:40 AM »

This is an *example* driver to get you started. You should make your own with your company name and VID/PID then sign it
Logged
Pages: [1]
  Print  
 
Jump to: