-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Labels
Description
Problem
Raspberry Pi devices (especially Pi 5, but also Pi 4, Zero, etc.) support USB gadget mode for network connectivity via the USB-C port, but this is not documented for these platforms. This would provide a static IP address for initial configuration without needing to scan the network.
Use Case
From issue #330: User suggested adding a static network interface over the USB controller (USB Type-C port) with a static IP, making initial configuration much easier without needing nmap to discover the device.
Current State
- USB gadget networking is already documented for allwinner/licheerv in
configs/allwinner/licheerv/README.md - The licheerv config provides a good template showing:
- Host machine setup (NetworkManager and iptables methods)
- Device-side configuration
- IP address customization
- Connection sharing setup
Proposed Documentation
Add similar USB gadget networking documentation to Raspberry Pi configs, specifically:
For Raspberry Pi 5, 4, Zero, etc.
-
Enable USB gadget drivers:
- Load
dwc2kernel module - Configure via
/etc/modulesor kernel cmdline - Add
g_etheror similar gadget module
- Load
-
Device-side configuration:
- NetworkManager connection file for USB network
- Default static IP (e.g., 192.168.7.2 or 10.0.0.3)
- Example configuration file
-
Host machine setup:
- NetworkManager "Shared" method (easiest)
- Manual iptables setup (for non-NM systems)
- Required host IP address
-
Where to place overrides:
- Kernel config for modules
- Root overlay for NetworkManager configs
- Example paths and files
Implementation Details
From #330 discussion, this involves:
- Loading dwc2 driver (kernel module or cmdline)
- Possibly:
modules=sd-mod,usb-storage,ext4,dwc2,g_etherin cmdline.txt - Or: adding to
/etc/modulesin root overlay - NetworkManager connection file similar to licheerv's usb0.nmconnection
Benefits
- Much easier initial setup - no network scanning needed
- Provides reliable static IP for first login
- Useful for headless setups
- Emergency access if WiFi/Ethernet fails
- Follows existing pattern from licheerv docs
Location
This documentation should go in:
configs/pi/README.md- add new section "USB Gadget Networking"- Could reference licheerv docs as the detailed example
- Include Pi-specific kernel module details
Related
- Issue Feedback and questions #330
- Existing USB gadget docs in
configs/allwinner/licheerv/README.md - Similar feature requested for easier device discovery