Re: How to use libusb for CDC devices

Xiaofan Chen <[email protected]> Mon, 7 Sep 2015 10:32:38 +0800
Newsgroups gmane.comp.lib.libusb.devel.windows
Message-ID <CAGjSPUBSr-2dXrtp04EnkjNLvuyuLT9QmEQ2mWoR5gcckHVtgQ@mail.gmail.com>
On Fri, Sep 4, 2015 at 8:40 PM, Swapnil Kulkarni <[email protected]> wrote:
> Thanks for clearing the doubt.
>
>> I suppose the NXP drivers you referred to support some device,
>> does that device support toggling RTS?
>
>> When you say USB CDC do you mean USB CDC ACM? If so you
>> should be able to use the standard Windows serial port
>> driver which supports RTS (IIRC).
>
> Yes, it is USB CDC ACM.
> How can I find out if my device supports RTS toggling or not?

Firstly you have to know your product well. Does your FW support
it? Does the Windows driver you use support it?

If you are using the NXP driver, maybe you have to ask NXP.

> Host generates a request when I toggle DTR from terminal and
>  it also updates the RTS status correctly in the same request.
> But it is not generating the request when I toggle RTS from terminal.
>
> I also tried using windows default driver. But it showing 'Device cannot
> start (Error 10)'. How can I make my device compatible with windows
> default driver?

That you have to ask yourself. You need to check if your FW is
correctly done to support USB CDC-ACM? It is using NXP driver
and may not be compatible with CDC-ACM specifications. By
Windows default driver, I assume you are referring to usbser.sys.
Take note it does not seem to support RTS toggling as per the
following threads.
  http://community.silabs.com/t5/8-bit-MCU/USB-CDC-implementation-for-F32x/td-p/69471

  - EscapeCommFunction( SETRTS )
    no request
  - EscapeCommFunction( CLRRTS )
    no request

You do need to check whether the NXP driver supports the function
you need or not.

-- 
Xiaofan

------------------------------------------------------------------------------