Main Site Documentation

Usb cdc


#1

By default the CDC is 9600 right? So would I have to alter the properties for the virtual COM device in Windows to alter this? Ideally I’d want something like 115200 or more?

Also how do I detect if I’m actualluy plugged into a PC? At the moment I’m just sending data to the CDC regardless?


#2

You should give a look at the online doc

and especially this page : http://ghielectronics.com/downloads/NETMF/Library%20Documentation/html/93fcfa03-228b-cbe4-e8a5-9a7a8f36cdf0.htm

You can see this code:

// Check if connected to PC
                if (USBClientController.GetState() != USBClientController.State.Running)
                {
                    Debug.Print("Waiting to connect to PC...");
                }
                else
                {
                    cdc.Write(bytes, 0, bytes.Length);
                }

Edit: URLs with the % sign seem to not display correctly :think: Simply copy/paste the whole link in your browser.


#3

Wow you know I totally overlooked that even though I passed it several times :confused:


#4

Baudrate does not matter. You are communicating over USB.


#5

Sometimes, the most obvious things become invisible because we look too much at them and we don’t pay any more attention to them :wink:


#6

Bec: Yeh :confused:

Mike: Ahh didn’t realise just confusing all these intermixed things and it being a virtual COM port :frowning: