Replacement for USBC_CDC (deprecated in GHI.Premium.USBClient 4.2)

Hi,

I’m wanting to do some simple 2 way IO between my PC and Spider via USB.
Have read a number of codeshare and wiki items on this - e.g. GHI Electronics – Where Hardware Meets Software
but the USBC_CDC class has been deprecated in the premium library in v4.2.

Is there a replacement available that will present as a com port on the PC - i.e. trying to keep the PC side as simple as possible as well.

Thanks
Rob

Hi Rob,

You could just use a http://www.ghielectronics.com/catalog/product/287 to talk to the PC

CDC is still fully supported. CDC+ debugging si the one that was removed.

Hi Gus,

I’m missing something then, sorry.

From the GHI library doco http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation%20v4.2/Premium/Index.html:

Creates USB Client CDC (Virtual COM Port).
Namespace: GHI.Premium.USBClient
Assembly: GHI.Premium.USBClient (in GHI.Premium.USBClient.dll) Version: 4.2.7.0 (4.2.7.0)

C#
[ObsoleteAttribute(“Not Supported”)]
public class USBC_CDC

And my code (below):

using GHI.Premium.USBClient;

namespace GadgeteerApp1
{
    public partial class Program
    {

        USBC_CDC cdc;

        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {
            cdc = USBClientController.StandardDevices.StartCDC();

emits the warning:
Warning 1 ‘GHI.Premium.USBClient.USBC_CDC’ is obsolete: ‘Not Supported’ C:\Users\robmaw\AppData\Local\Temporary Projects\GadgeteerApp1\Program.cs 20 18 GadgeteerApp1

is this a warning I can ignore? - i.e. it is not complaining about the StartCDC() call, just the variable declaration of cdc as a USBC_CDC.

Thanks

I am not sure but will check for you.

You can use this, and there should be no problem. This was added while we were reviewing the libraries, as it is still under review.

1 Like