From: Peter S. <pe...@st...> - 2011-10-26 16:28:43
|
Kustaa Nyholm wrote: > would a 2nd interface require an other set of end points separate > from the keyboard-HID interface? Each interface has it's own endpoints, and endpoint 0 is considered not belonging to any specific interface so it can be considered common, but Windows may not allow useful access to it without say WinUSB being installed. Are the Microsoft descriptors an alternative? Ie. that one or both interfaces use WinUSB when plugged in, and thus accessible using libusb? Doesn't work on older Windows systems though. I clearly assume that you are working with Windows, since anywhere else I think it would be easier to use vendor specific. > The hardware only supports four end points and two are already in > use by the HID FWIW a HID class interface isn't required to have an interrupt out endpoint, so if the hardware has no further restrictions (e.g. 2/2 IN/OUT endpoints) then you can use just one endpoint for each. > I'm skating on thin ice here, Well, check, otherwise noone can give any useful advice. > So we would need to use the existing HID out end point for our > control transfer, or what? That sounds confusing. HID1_11.pdf Section 4.4 specifies the HID class interface, although with sloppy terminology. They have a column with heading Pipe which lists one pipe and two endpoints. Anyway, ep0 is common and given, and not actually part of the interface at all beyond that it can also carry requests that are destined for an interface. HID class then specs one interrupt in endpoint which is required, and one interrupt out endpoint which is optional. So if the out endpoint exists it must be interrupt, so there are no control transfers going over it. A control transfer goes over a control endpoint, usually the only control endpoint in a device is ep0, since it can carry also interface-specific requests. Endpoint 0 can certainly be used to send (small amount) data to the device, but you must investigate exactly how and what you can accomplish through the kernel drivers and system APIs that you are able to use. WinUSB and libusb would make it trivial. HID makes it more complicated. I understand you can't install but if target platform is newer systems then perhaps you can still use WinUSB and libusb by adding Microsoft descriptors to the device. //Peter |