Main Site Documentation

USB Client VCOM Install Failure


#1

Status: FEZ Domino, Serial debugging with shield, system has been working fine on several different programs for several weeks, first with USB debug, now with serial.

Problem: When trying to run a simple code to test the functioning of a virtual COM port using CDC I get an error message both from Windows Vista and XP saying that they can’t install a driver. Both operating systems detect the device as “CDC VCOM” in Device Manager, but with no driver. I am pointing to the /USB Drivers/GHI_NETMF_Interface_with_CDC folder in the GHI SDK directory.

I’ve also tried installing the standard “GHI_NETMF_Interface” driver first as well - same results. However, does that make sense if I’m using serial debug anyway?

When Vista tries to install, it reports the hardware ID as “USB\VID_1B9F&PID_F001&REV_0100”. The GHI driver file lists the ID as “USB\Vid_1B9F&Pid_F003&MI_01” which I’m guessing is the disconnect.

I am running the latest GHI SDK 4.1.3.0 and have even uninstalled and reinstalled it to no avail. I also did a fresh download of the CDC driver zip file from GHI that is listed in the Beginner’s manual with the following link, http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/GHI_NETMF_Interface_with_CDC.zip . Is this the most current driver?

I appreciate any suggestions for a fix. Here is the code:

using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.FEZ;
using GHIElectronics.NETMF.USBClient;
using GHIElectronics.NETMF.Hardware;

namespace USBClient_Example
{
    public class Program
    {
        public static void Main()
        {

            // Check debug interface
            if (Configuration.DebugInterface.GetCurrent() == Configuration.DebugInterface.Port.USB1)
                throw new InvalidOperationException("Current debug interface is USB. It must be changed to something else before proceeding. Refer to your platform user manual to change the debug interface.");
            // Start CDC;
            USBC_CDC cdc = USBClientController.StandardDevices.StartCDC();
            // Send a text line to PC every second. (Append a new line too)
            byte[] bytes = System.Text.Encoding.UTF8.GetBytes("Hello world!\r\n");

            // Check if connected to PC
            while (true)
            {
                if (USBClientController.GetState() != USBClientController.State.Running)
                {
                    Debug.Print("Waiting to connect to PC...");
                }
                else
                {
                    Debug.Print("here's where stuff gets printed");
                    // First write "Hello world!" to PC every second. (Append a new line too)
                    cdc.Write(bytes, 0, bytes.Length);
                    // now write something else
                    byte[] bytesout = System.Text.Encoding.UTF8.GetBytes("GHI & forum team are pretty helpful on this stuff! \r\n");
                    cdc.Write(bytesout, 0, bytesout.Length);
                }
                Thread.Sleep(1000);
            }
        }
    }
}

#2

Here are a few more facts that might help in this analysis. In searching the registry there are three entries with the following device ID for CDC VCOM. Here’s one:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_1B9F&PID_F001\0

These entries have the device ID that’s different than what’s in the GHI CDC driver file. Also page 31 of the USBizi manual has the following caution:

Important Notes:
• Be CAREFUL when changing the USB configuration and settings, as you go on
with development and creating your USB device and connecting it to the PC,
Windows might save the device information in its registry. Therefore, if you change the USB device settings/interfaces and connect it again, it might not work correctly. Make sure to be careful with changing your USB device settings. You may also need to delete all the settings from Windows registry manually.

If this is what’s preventing the drivers from loading on my system are there any specific instructions on which registry entries need to be deleted?


#3

I having the same problems with Win7 64bit Pro and FEZ Panda board…
:frowning:


#4

There are two different drivers. One for CDC alone and one for CDC + a debug interface. I think you are using the wrong one.
See here:
http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/html/93fcfa03-228b-cbe4-e8a5-9a7a8f36cdf0.htm

You need the first driver.


#5

Mike, you have found the answer. The Device ID in the driver matches what windows was looking for and now I can successfully load the driver - program works.

A couple of comments though. Yesterday William pointed me in the right direction with this link, http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/Index.html but I couldn’t see a way to navigate to the driver. Today, your link http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/html/93fcfa03-228b-cbe4-e8a5-9a7a8f36cdf0.htm brought up links to both drivers. I’ll go back and study this some more, but I’m not sure why finding drivers wasn’t obvious to me when I was trying to solve this problem on my own.

I see now where the link from the Beginner’s Guide,http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/GHI_NETMF_Interface_with_CDC.zip, has the CDC driver with debug, but I didn’t see a corresponding link for the CDC VCOM only driver in the Guide.

Bottom line - Thnaks for taking the time to find me the right driver!!


#6

A last comment on where I went wrong - I now see where I should have looked for the drivers in the “USBC_CDC Class” on the GHI documentation page instead of just viewing the “Namespaces” page. Thanks again for your help - be back, I will, I’m sure.


#7

It would be a lot easier if GHI released an installer for these drivers. On Windows 7 it is a PITA to manually install drivers as you have to stop the autoinstaller, then go to Device Manager, then tell it you want to update the driver etc. If you don’t catch the auto installer the first time then things just don’t work and you don’t know why unless you think to look in the Device Manager to see what is going on.