Skip to content

Instantly share code, notes, and snippets.

@cheater
cheater / usb-ether.sh
Last active June 24, 2024 21:08 — forked from dafta/usb-ether.sh
Steam Deck USB Ethernet - get internet from other device, eg from MacOS or from Windows Internet Connection Sharing
#!/bin/sh
echo "This script will let the Steam Deck use internet from a device it's connected to via USB. Reconnect USB after using it to start the connection or the interface might not show up. On Windows, you'll have to share internet with the new Ethernet device in the control panel. If things don't work, try disconnecting and reconnecting the network connection on Windows /from which/ you are getting internet (i.e. what connects the Windows computer to your router). Note if you want to do USB tethering on your phone you don't use this, you just use your phone's USB tethering functionality."
if [ "$UID" -ne 0 ]; then echo "This script needs to be executed as root"; exit 1; fi
if ! (lsmod | grep dwc > /dev/null); then echo "Please enable DRD in BIOS. Turn off your Steam Deck, then press volume up and the power button until you hear the beep. Go to Setup Utility, then set it under Advanced > USB Configuration > USB Dual-Role Device"; exit 1; fi
vendor_id="0x3000" # Valve
product_id="0x28DE"
serial_number=