I have this configuration of the devices HOST_PS
<----> Transmitter
<---- Touchscreen
.
Currently on my transmitter I have created a composite USB gadget device which could contain up to 5 HID devices, (2Mouse, 2Keyboard, Touchscreen). HOST PC could enumerate all of them and everything is working properly. From transmitter side I am writing HID report data comeing from the touchscreen to the corresponding /dev/hidg device and Host PC acts correctly. The problem occurred when
- I have bought a new usb_touchscreen.
- Extracted the report descriptor from that touchscreen.
- Pass the
report descriptor
and all the corresponding data(dev, no_out_endpoint, protocol, report_desc, report_length, subclass
) to/sys/kernel/config/usb_gadget/Nhid/functions/hid.usb0/
.
After all this steps the HOST_PC could enumerate the touchscreen properly but the tocushes doesn't work(I also know why).
HOST_PC printing this message hid-multitouch xxx:yyy:zzz.uuu: failed to fetch feature 7
.
Some touchscreens using Feature reports
for allowing the HOST to have configurable device. If I connect the Touchscreen directly to the PC I can see the following under the hood. I'll describe the final steps before sending the input reports from the touchscreen.
- pc -> touchscreen (GetDescriptor(Report))
- pc -> touchscreen (GetReport(Feature eport))
- touchscreen ->pc (Input Report)This is already HID report that sends the touchscreen
The problem hid-multitouch xxx:yyy:zzz.uuu: failed to fetch feature 7
is though I am setting the report descriptor to USB_GADGET's HID device and HOST_PS enumerates it properly, I am not sending
the feature report
to the host
as it requested in step 2 above
.
QUESTION:
How to send feature report from device to HOST_PC, if the device is USB_GADGET composite HID device. In usual for sending the Input report
(HID data) I am writing the incoming data from the touchscreen to the corresponding /dev/hidg<N>
device.
NOTES:
The HOST_PC is Linux(Ubuntu, CentOS,... doesn't metter) and I ma not interested on Windows.
The Touchscreen works perfectly if I connect it to the PC directly.
I don't want to modify the touchscreen's report descriptor, remove feature report part and solve the problem like that.
PS:
I know this is a little bit complicated but Thanks in advance.