USB Gadget Multi-Function Networking
One of the most powerful features of Linux on the MSM8916 is the Linux USB Gadget Subsystem (ConfigFS).
Because the USB controller is natively dual-role (OTG), the dongle does not simply act as a consumer device—it can emulate multiple USB peripheral devices simultaneously to your host computer.
What Can USB Gadget Emulate?
Section titled “What Can USB Gadget Emulate?” ┌─────────────────────────┐ │ MSM8916 OpenStick │ └───────────┬─────────────┘ │ (Single USB-A Plug) ┌──────────────────┼──────────────────┐ ▼ ▼ ▼ Virtual Ethernet Virtual Serial Port Mass Storage (RNDIS/ECM) (CDC-ACM) (LUN) 192.168.68.1 / SSH /dev/ttyACM0 debug Mounted Drive- Virtual Ethernet (RNDIS / CDC-ECM / CDC-NCM):
- Appears as a high-speed network adapter.
- Provides instant IP communication (
192.168.68.1) and SSH access without needing Wi-Fi.
- Serial Console (CDC-ACM):
- Appears as a COM port (Windows) or
/dev/ttyACM0(Linux/macOS). - Allows direct terminal login even if the network stack fails or IP changes.
- Appears as a COM port (Windows) or
- Mass Storage (USB Drive):
- Presents a portion of the eMMC or a loopback
.imgfile as a plug-and-play USB thumb drive to your PC.
- Presents a portion of the eMMC or a loopback
Managing Gadget Functions via ConfigFS
Section titled “Managing Gadget Functions via ConfigFS”On OpenStick Debian, gadget configuration is automated via /usr/sbin/gadget or systemd scripts located in /etc/init.d/usb-gadget.
Changing the Gadget IP Address
Section titled “Changing the Gadget IP Address”If 192.168.68.1 conflicts with your local home network:
# Edit the DHCP / DNS daemon configsudo nano /etc/dnsmasq.d/usb.conf
# Change interface address:# address=/openstick/192.168.70.1# dhcp-range=192.168.70.10,192.168.70.50,12h
# Update the network interface configsudo nano /etc/network/interfaces.d/usb0
# Restart networkingsudo systemctl restart networkingsudo systemctl restart dnsmasqConnecting via USB Serial Console
Section titled “Connecting via USB Serial Console”If your computer fails to acquire an IP over USB Ethernet:
- Open your terminal or PuTTY / Serial client.
- Select device
/dev/ttyACM0(orCOMxon Windows). - Set baud rate to
115200. - Press
Enterto see the login prompt:Debian GNU/Linux 11 openstick ttyGS0openstick login:
This provides a 100% reliable rescue channel regardless of firewall or network configuration!