All of lore.kernel.org
 help / color / mirror / Atom feed
* HID gadgets and SET/GET_REPORT
@ 2022-06-16 23:58 Vicki Pfau
  2022-06-17 15:09 ` Alan Stern
  0 siblings, 1 reply; 2+ messages in thread
From: Vicki Pfau @ 2022-06-16 23:58 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, linux-usb

Hello,

I've been working on a HID gadget (in userspace, using ConfigFS) that relays USB data from another device transparently, but I noticed that the HID SET_REPORT and GET_REPORT request types appear to be unusable from userspace. As best as I can tell, in `hidg_setup`, they just aren't handled. One sends empty data and the other just does nothing. Sniffing the USB traffic, the only "reply" I get is -EPIPE, which appears to be generated by the UDC driver (dwc3), and I can't access any of the data involved. The device I'm relaying requires those to work transparently.

I was wondering what would need to be done to get this to work? I've tried pivoting to using FeatureFS with ConfigFS, but there's effectively no documentation on that that I can find, and no real sample code either, so I've been groping around in the dark for the past few weeks while I previously had something that *almost* worked, save for apparently one stubbed out feature. I have no real familiarity with the intricacies of the USB subsystem, otherwise I might try to prepare a patchset myself.

Thanks,
Vicki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: HID gadgets and SET/GET_REPORT
  2022-06-16 23:58 HID gadgets and SET/GET_REPORT Vicki Pfau
@ 2022-06-17 15:09 ` Alan Stern
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2022-06-17 15:09 UTC (permalink / raw)
  To: Vicki Pfau; +Cc: Felipe Balbi, Greg Kroah-Hartman, linux-usb

On Thu, Jun 16, 2022 at 04:58:32PM -0700, Vicki Pfau wrote:
> Hello,
> 
> I've been working on a HID gadget (in userspace, using ConfigFS) that 
> relays USB data from another device transparently, but I noticed that 
> the HID SET_REPORT and GET_REPORT request types appear to be unusable 
> from userspace. As best as I can tell, in `hidg_setup`, they just 
> aren't handled. One sends empty data and the other just does nothing. 
> Sniffing the USB traffic, the only "reply" I get is -EPIPE, which 
> appears to be generated by the UDC driver (dwc3), and I can't access 
> any of the data involved. The device I'm relaying requires those to 
> work transparently.
> 
> I was wondering what would need to be done to get this to work? I've 
> tried pivoting to using FeatureFS with ConfigFS, but there's 
> effectively no documentation on that that I can find, and no real 
> sample code either, so I've been groping around in the dark for the 
> past few weeks while I previously had something that *almost* worked, 
> save for apparently one stubbed out feature. I have no real 
> familiarity with the intricacies of the USB subsystem, otherwise I 
> might try to prepare a patchset myself.

I'm not familiar with the HID gadget, but it certainly seems that your 
best approach would be to fix up the hid function driver by adding 
support for Set-Report and Get-Report requests.

If you really don't feel up to that task, there probably are people on 
the mailing list who would be happy to help.

Alan Stern

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-17 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 23:58 HID gadgets and SET/GET_REPORT Vicki Pfau
2022-06-17 15:09 ` Alan Stern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.