Control your Switch or Switch 2 console from a PC (Windows, Linux, macOS) or through your browser/phone with low latency using a Raspberry Pi. 🎮
This project was built from scratch in C++ and uses UDP for low latency. It is designed for playing console games with your PC controller while avoiding the typical lag of Bluetooth or heavy script-based solutions.
👥 Up to 4 players simultaneously - Works with a single Raspberry Pi and a single PC.
⌨️ Keyboard Support - Desktop clients support keyboard controls, either by overriding P1 or by using the keyboard as one player.
🌐 Web App & Mobile Touch Controls - The server includes an embedded web interface with a desktop control panel and touch-optimized mobile gamepad, no client install needed.
🔄 Gyroscope and Rumble - PC clients with gyro-capable controllers (DS4, DualSense, compatible USB motion pads), Android and iOS can send motion data! Rumble is only supported on PC clients or controllers connected through the mobile apps.
⚙️ Macros - Create, record and share your own macros from any PC client!
⏰ Wake up your Switch 2 whenever you want to! Click here for more details.
🟢 Supports any Raspberry Pi with USB gadget!
Pre-compiled Binaries Available! You can download ready-to-use GUI/CLI clients and the Raspberry Pi server directly from the Releases page.
The web interface is included in the Raspberry Pi server binary - no additional files needed.
demo.mp4
1. 🥧 Raspberry Pi (Server):
- Download
ns-pc-control-raspberry-pi.zipto your Pi:
wget https://github.com/Dycool/NS-PC-Control/releases/latest/download/ns-pc-control-raspberry-pi.zip
unzip ns-pc-control-raspberry-pi.zip
- Enable USB gadget, check the Raspberry Pi setup for more details.
- Start the backend:
sudo chrt -f 99 ./ns-backend
2. 💻 PC / Mobile (Client):
- Desktop — Download the zip for your OS (Windows, Mac, or Linux), launch
ns-client, enter your Pi's IP. - Android — Download
NS-mobile.apkfrom the release and install it. - iOS — Download
NS-mobile.ipafrom the release (sideload via iloader). - Up to 4 controllers are supported simultaneously on a single client.
Mobile clients do not support rumble with touch controls.
3. 🌐 Web App (Optional):
- The backend includes an embedded web server with mobile touch controls.
- Enable it with the
-wflag:sudo chrt -f 99 ./ns-backend -w - Open
http://<pi-ip>:8080in your browser. - See the Web App Guide for details.
The Raspberry Pi server can emulate two different controller profiles:
| Feature | Hori Controllers | Pro Controllers |
|---|---|---|
| HID report size | 8 bytes | 64 bytes |
| Latency | Fastest | Fast |
| Gyro | No | Yes |
| Rumble | No | Yes |
Default mode is the pro controller. Use -hori if you have any issues with the other mode:
sudo chrt -f 99 ./ns-backend -horiAny SDL-compatible controller connected to your client is supported, so basically any controller on the market.
| Action | Shortcut |
|---|---|
| HOME | Press GUIDE button, or L3 + R3 simultaneously |
| CAPTURE | Press START + BACK simultaneously |
These shortcuts can be disabled on the PC client.
Detailed guides and technical information are in the docs/ folder:
- Raspberry Pi System Setup - Enabling USB gadget mode and automating on boot.
- Building from Source - Compiling the desktop client (Windows/Mac/Linux), Android/iOS mobile apps, and server from scratch.
- Controller Modes - Legacy vs modern backend mode, gyro, rumble, and how to choose.
- Macros - Recording and replaying button sequences for speedruns and TAS.
- Architecture & Security - Latency optimization tips and HMAC-SHA256 protocol details.
- Web App & Mobile Clients - Using the embedded web interface and mobile touch controls.
- Wakeup Setup - Configure wake-up support for Switch 1 and Switch 2.
- My vision - The main goal behind this project.
| Components | Sources |
|---|---|
| Desktop clients | Qt6 Widgets / SDL3 Gamepad API / UDP sockets |
| Android client | Kotlin + WebView / JNI C bridge / UDP sockets |
| iOS client | Swift + WKWebView / C bridge / GameController / CoreMotion |
| Raspberry Pi server | Linux USB Gadget (configfs / libcomposite) / UDP sockets |
| Cryptography | HMAC-SHA256 (standalone C++ implementation) |
| Protocol | Custom UDP-based protocol with magic/version/sequence number guards |
| Pro controller Emulation | switch-auto-core by churunfa |
| Switch 2 Wake Setup | Switch2-RPI-Wake by Bill-git1 |
Found a bug or have a feature request? Open an issue at github.com/Dycool/NS-PC-Control/issues with as much detail as possible (OS, controller model, reproduction steps).
See the repository license for details.