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, [url]http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/GHI_NETMF_Interface_with_CDC.zip[/url] . 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);
}
}
}
}