Re: USB endpoint pipe access

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Sajan Wilfred (s_wilfred_a!t_mailcity_com)
Date: 02/18/05


Date: Fri, 18 Feb 2005 08:51:31 +0530


>From the information you gave, it seems you are not using any custom driver
in the PC. In which case the standard Hid class driver will be handling your
device. This driver is different from bulkusb sample driver in the DDK and
don't expect to open the device endpoint by appending pipe information using
the standard HID driver. As per the HID standard, application should
communicate with the device using HID reports. After opening the device, use
ReadFile and WriteFile to Read or Write data in report format. The HID stack
takes care of translating the Read/Write to HID GET_REPORT request (from the
interrupt in endpoint)/SET_REPORT request (either to control out or
interrupt out endpoint).

If you really want to open endpoints as bulkusb sample does, modify the inf
to suite your hardware and install it instead of the default HID driver.

Regards,

Sajan

"Vaughn Treude" <Vaughn Treude@discussions.microsoft.com> wrote in message
news:FE6BFC9D-5DD4-49E3-B826-CD7E3CE0AE20@microsoft.com...
> I have a custom embedded device that is connects to a PC via USB and
> configures itself as an HID device. I need to read and write some custom
> data on endpoint 1, and I have a pair of descriptors set up, one for
input,
> one for output. The usbview application sees these the device and its
> descriptors as valid. I can open a handle to the device itself using the
> standard method of calling SetupDiGetInterfaceDeviceDetail to get the
device
> path and opening it with CreateFile. But I can't figure out how to open
the
> input/ouput pipes to endpoint 1. The DDK example file rwbulk.c claims I
> should concatenate the strings "pipe00" and "pipe01" to the device path,
open
> another handle, and read or write to this. But this doesn't work for me.
I
> can open it, and I can write to it, but WriteFile returns zero bytes
written
> and my embedded device never sees a transaction for endpoint 1. What am I
> missing? Thanks!



Relevant Pages

  • Re: USB endpoint pipe access
    ... I ran BusHound and verified that my device is definitely writing the reply ... I'm trying to use the standard HID driver. ... In which case the standard Hid class driver will be handling your ...
    (microsoft.public.development.device.drivers)
  • Re: [PATCH 1/1] media: dvb-usb/af9015, fix disconnection crashes
    ... Well the thing is that this device offers two different ways to read the remote: vendor class bulk endpoint (0/81, used afatech driver) and HID class interrupt endpoint. ...
    (Linux-Kernel)
  • Renaming of the USB HID driver
    ... the concept of the HID parser is not really USB related anymore. ... USB and Bluetooth subsystems only have to provide a transport layer. ... Here are instructions on how to compile and use the driver. ... plus additions to support force feedback. ...
    (Linux-Kernel)
  • Re: Custom HID device - problems with driver dev
    ... I saw several people refereence the USB printer ... as a launch point for a "generic HID driver" so that's were I started. ... Are you trying to create an int pipe or a bulk pipe? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Mid level layer between device driver and application
    ... injected in a virtual HID driver for a direct multitouch support. ... For that I'll have to deal with kmdf only, ... > device and inject it in the form this project wants. ...
    (microsoft.public.development.device.drivers)