On Fri, Feb 1, 2013 at 2:45 AM, Eric Lundby <eric.lun...@modrobotics.com> wrote:
> I am however still unable to get basic communication working with
> libusb. When using Microchips supplied driver that exposes a com port
> everything works correctly over serial. When trying to use libusb bulk
> transfers, my send works, but my receive times out.
>
> Using USBlyzer I did notice that when using Microchips driver, there
> are several Control Transfers sent to 'Set Line Coding' and 'Get Line
> Coding' before my messages are sent or received. Does anyone know if
> this could be why my basic communication could be failing with libusb
> (because I'm not setting line coding)?

As Pete mentioned in the TI thread, you have to get familiar with
the USB CDC-ACM specification.
http://www.usb.org/developers/devclass_docs

You may need to read the main CDC spec and the CDC-ACM
portion (inside the PSTN Subclass spec). It talks about class
specific request like what you have seen.

Microchip does not really write the driver, it just provides an inf file
to reference the OS provided driver (Microsoft usbser.sys driver)
for the CDC-ACM interface. The other interface uses HID so no
inf file is needed.

BTW, what is the reason that you do not want to use the
Microchip provided driver package?

You can use libusbx to talk to CDC-ACM device, but you need
to emulate what usbser.sys is doing, USBLyzer can of course
help. Reading the spec can help as well.

The following Microchip AN could potentially help as well.
http://ww1.microchip.com/downloads/en/AppNotes/01164a.pdf

If you read the Microchip USB Stack CDC-ACM device code,
you will also know what class specific request Microchip has
implemented.
(C:\Microchip Solutions v2012-10-15\Microchip\USB\CDC Device
Driver\usb_function_cdc.c)

-- 
Xiaofan

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to