Skip to content

Instantly share code, notes, and snippets.

@larsimmisch
larsimmisch / gadget.sh
Created July 5, 2023 20:53
USB gadget on a Raspberry Pi 4 for iPad
#!/bin/sh
# I wanted to use a Raspberry Pi as a USB gadget for audio and ethernet, but got error messages on the iPad
# when I extended the camera connection kit with a Lightning extender.
#
# I managed to avoid this by making sure that the USB gadget announces itself as self-powered (see configs/c.1/bmAttributes)
# With this, the Pi 4 and a Hifiberry Amp supplies audio out and ethernet.
#
# For audio out, alsaloop or similar must also be running.