Raw Gadget is a kernel module that allows to emulate USB devices from userspace
1–10 of 26 posts
Re: Raw Gadget is a kernel module that allows to emulate USB devices from userspace
#2Re: Raw Gadget is a kernel module that allows to emulate USB devices from userspace
#3Re: Raw Gadget is a kernel module that allows to emulate USB devices from userspace
#4Re: Raw Gadget is a kernel module that allows to emulate USB devices from userspace
#5When 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.
Re: Raw Gadget is a kernel module that allows to emulate USB devices from userspace
#6Neat. Can you clarify what "emulate" means? Would this let me implement a USB gadget on a Linux board with a device-side USB port, without writing a kernel module?
Re: Raw Gadget is a kernel module that allows to emulate USB devices from userspace
#7A 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 funct…
Re: Raw Gadget is a kernel module that allows to emulate USB devices from userspace
#8A 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 funct…
No, this allows userspace to act as a USB gadget connected to the Linux kernel it's running on.
That's why they have a separate subproject for it-
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?
Re: Raw Gadget is a kernel module that allows to emulate USB devices from userspace
#9What this new module provides is new userspace API to the gadget subsystem, making the dummy hcd much more practical especially for testing USB driver code