WICG / webusb

Connecting hardware to the web.
https://wicg.github.io/webusb/
Other
1.32k stars 132 forks source link

Improve linux USB gadget driver support #126

Open espoal opened 6 years ago

espoal commented 6 years ago

I suggest we could patch the linux USB gadget driver to improve WebUSB support.

The current isssue are:

I've already worked on a custom patch for proof of concept, but it's owned by my employer, so I can't upstream it. Also maybe @gregkh might not accept it upstream in the linux usb driver. I made it work by patching the serial device with custom descriptors, so that the official driver couldn't recognize it anymore.

A smarter approach could be to have the webusb gadget allows the user to pick a function, and then decorate it with descriptor, ie: webusb driver with serial function, or storage function.

There might be a workaround by cleverly writing the descriptors using the current driver, but I'm still looking for it.