USB Gadget
Jump to navigation
Jump to search
We can do all sorts of nifty things with a USB OTG connector. Here are some of them.
Introduction
The term "USB Gadget" will usually refer to the Linux USB gadget framework. This is relevant for those sunxi devices that offer a "On-The-Go" (OTG) port, allowing this USB connector to act in a "dual role" mode. The 'gadget' part means we're particularly interested in the slave mode - where the sunxi board will present itself as "device" to another USB host (e.g. a PC), allowing it to 'mimic' a wide variety of USB peripherals.
The gadget framework in mainline kernel currently supports the following gadget drivers:
- Audio gadget
- Composite gadgets: Multifunction composite, Ethernet & ACM, ACM & mass storage, Nokia composite
- EHCI debug device gadget
- Ethernet gadget: CDC ECM, simple subset of CDC, CDC EEM, CDC NCM, RNDIS
- Function filesystem gadget
- Gadget zero
- Gadget filesystem
- HID gadget
- Mass storage gadget
- MIDI gadget
- Printer gadget
- Serial gadget (CDC ACM, CDC OBEX)
Devices with USB OTG
The following devices all provide an USB OTG port:
Possible security implications
The ability to act as a wide range of USB peripherals, with device behavior that can be customized to a very large degree, may have security implications for the USB host. See e.g. https://en.wikipedia.org/wiki/Firmware#Security_risks, or search for "BadUSB". |