Re: How to open two USB pipes (0x81 - 0x02) in USB - HID devic



John wrote:

I have a vendor HID device with two additional endpoints, 0x81
(input) and the optional endpoint 0x02. With only one endpoint (0x81)
everything is ok. I can get a handle with CreateFile and I can send
messages with HidD_SetOutputReport and with WriteFile.

Now I have introduced a second endpoint (0x02 - output). I can still
discover the device and I can get a device handle. I even can send
messages over the control pipe with HidD_SetOutputReport. However if
I try to write via WriteFile then I get an error 1784. I guess that I
have to use another handle which is pointing to the pipe with
endpoint 0x02. But how???

It's been a while, but from what I understand, the only optional
endpoint that a HID device may have is an interrupt output endpoint,
which is used for sending output reports to the device instead of the
control pipe.

In the HID API, you don't explicitly send data via an endpoint - you
send output reports and it's up to the HID class driver to decide
whether to use the control endpoint or optional interrupt endpoint. If
it has decided not to use the interrupt endpoint, then AFAIK there's
nothing you can do about it.

If you want to delve lower you're going to have to bypass HID altogether
- but then you need to make sure your driver grabs the device before HID
finds it...

Regards,

--
Mark McDougall, Engineer
Virtual Logic Pty Ltd, <http://www.vl.com.au>
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266
.



Relevant Pages

  • Re: Castle USB API: Interrupt endpoints
    ... endpoint with the direction of the open request will be picked. ... If you haven't got!HID loaded then that shouldn't be a problem. ... USB quirks alter behaviour of the stack, ...
    (comp.sys.acorn.programmer)
  • Re: Castle USB API: Interrupt endpoints
    ... anyone would want to use an output interrupt endpoint. ... Is there such a facility in the present USB stack, ... device before (the bad thing here is, that the Linux kernel HID ...
    (comp.sys.acorn.programmer)
  • Re: USB endpoint pipe access
    ... In which case the standard Hid class driver will be handling your ... interrupt out endpoint). ...
    (microsoft.public.development.device.drivers)
  • Re: =?iso-8859-1?Q?Re:_Welcher_Mikrocontroller_f=FCr_USB?=
    ... HID müsste doch fast mit jedem USB Controller gehen. ... Den Endpoint 0 ... Prev by Date: ... Next by Date: ...
    (de.sci.electronics)
  • Re: KMDF1.5: Reading from USB interrupt endpoints
    ... you can read/write to an interrupt endpoint using the same APIs that you read/write to an bulk endpoint ...
    (microsoft.public.development.device.drivers)