FEZ Panda III CDC issue

Hi,
I’m trying to pass data back and forth between a PC and the Panda III and started out with the CDC example from the documentation. It compiles and runs and I can also see the virtual COM port as COM5 but as soon as I try to connect to this port I get an exception like “the connected device is not functioning properly”.
I tried it with a simple C# console app on Win 7 x64 as well as the ‘old’ FezTerm from the CodeShare. I also did some tests with a Win XP VM with Hyperterminal - always with the same results…
Anyone got an idea what the problem may be? I am using the LEDs to indicate whats going on on the Panda and this seems to be fine. LED2 on when the port was created and LED1 blinking when sending the “Hello World!” bytes…

Thanks and kind regards
Toni

The Code I’m using:

        public static void Main()
        {
            // Start Cdc
            Cdc vsp = new Cdc(); //tryed this too: Cdc(0x1B9F, 0xF001, 0x100, 250, "GHI Electronics", "CDC VCOM", null, "CDC VCOM"); 
            Controller.ActiveDevice = vsp;
            
            OutputPort LED1 = new OutputPort(FEZPandaIII.Gpio.Led1, true);
            OutputPort LED2 = new OutputPort(FEZPandaIII.Gpio.Led2, true);
            LED2.Write(true); //show running...

            // Send "Hello world!" to PC every second. (Append a new line too)
            byte[] hello = System.Text.Encoding.UTF8.GetBytes("Hello world!\r\n");
            while (true)
            {
                // Check if connected to PC
                if (Controller.State !=
                    UsbController.PortState.Running)
                {
                    //Debug.Print("Waiting to connect to PC...");
                }
                else
                {
                    vsp.Stream.Write(hello, 0, hello.Length);
                    LED1.Write(true);
                    Thread.Sleep(10); //just blink
                    LED1.Write(false);
                }
                Thread.Sleep(2000);
            }
        }

Actually, just after posting this I found the answer here:
https://www.ghielectronics.com/community/forum/topic?id=21887

I’m now using a workaround with a modified SerialPortStream class instead of the standard .NET SerialPort class from here:

Commenting out the call to SetCommState() solved the issue for me for the moment. Anyway a fix would be nice though.

We will take a look and welcome to the community.

@ mahony -

what firmware version are you using, please?