3 ms·
A key bit of information that might clear up some confusion - USB gadgets are the main peripheral-side USB interface in the Linux kernel. When you plug an embe
by XMPPwocky 7y ago
A key bit of information that might clear up some confusion - USB gadgets are the main peripheral-side USB interface in the Linux kernel.
When you plug an embedded Linux device like a phone into something, it could use USB gadgets to expose internal storage as a mass storage device, create a tty and expose that as a USB ACM/CDC device, etc- and using the gadget mechanism, allocate USB endpoints to each of these functions, and enable or disable them at runtime.
So, this project seems to be allowing a Linux device to emulate arbitrary peripherals to an external USB host.
Prior work in this area: see Facedancer.
Neat.
- Vogtinator 7y agoNo, this allows userspace to act as a USB gadget connected to the Linux kernel it's running on.
- XMPPwocky 7y agoIt sure doesn't seem to. That's why they have a separate subproject for it- https://github.com/xairy/raw-gadget/blob/master/dummy_hcd/README.md https://github.com/xairy/raw-gadget/blob/master/dummy_hcd/RE... But you certainly could know more than me about it! Why do you think it's exclusively for acting as a USB gadget connected to the Linux kernel it's running on?
- Vogtinator 7y agoIt looks like I'm only partially right: dummy_hcd is just for the local kernel, but raw gadget is just yet another interface to the UDC, so like usb functionfs just without sanity checks. I found documentation about this in the submission to mainline: https://lwn.net/ml/linux-usb/461a787e63a9a01d83edc563575b8585bc138e8d.1579007786.git.andreyknvl@google.com/ https://lwn.net/ml/linux-usb/461a787e63a9a01d83edc563575b858...