Re: USB endpoint pipe access
From: Sajan Wilfred (s_wilfred_a!t_mailcity_com)
Date: 02/18/05
- Next message: Tim Roberts: "Re: USB Video Class Device don't work"
- Previous message: Mike Yoke: "Re: Are bulk transfers on a given pipe handle serialized?"
- In reply to: Vaughn Treude: "USB endpoint pipe access"
- Next in thread: Vaughn Treude: "Re: USB endpoint pipe access"
- Reply: Vaughn Treude: "Re: USB endpoint pipe access"
- Messages sorted by: [ date ] [ thread ]
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!
- Next message: Tim Roberts: "Re: USB Video Class Device don't work"
- Previous message: Mike Yoke: "Re: Are bulk transfers on a given pipe handle serialized?"
- In reply to: Vaughn Treude: "USB endpoint pipe access"
- Next in thread: Vaughn Treude: "Re: USB endpoint pipe access"
- Reply: Vaughn Treude: "Re: USB endpoint pipe access"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|