Use seu DualShock 4 sem fio — do seu celular Android para o PC.
O DS4Wifi permite que você use o seu celular Android como uma ponte sem fio para conectar seu controle DualShock 4 ao computador. Ao conectar o controle físico no celular via USB ou Bluetooth, o DS4Wifi transmite os comandos através da rede local (ou via cabo usando ADB reverse) para o computador, onde um controle virtual de PS4 é criado através do driver ViGEmBus.
O projeto é composto por duas partes principais:
| Componente | Localização | Descrição |
|---|---|---|
| Android App | android/ |
Aplicativo em Kotlin que lê os comandos do controle conectado ao celular e envia via TCP |
| PC Server | pc/ |
Servidor em Python com interface em terminal (Rich) que recebe os pacotes e emula o controle de PS4 |
O computador reconhece o dispositivo como um DualShock 4 padrão, o que significa que funciona com compatibilidade total nos jogos, incluindo vibração física repassada do PC de volta para o controle conectado ao celular.
- Emulação completa de DualShock 4 (botões, analógicos, gatilhos e direcional).
- Transmissão de comandos em tempo real por rede local ou cabo USB (via ADB reverse).
- Suporte a vibração nativa em jogos compatíveis.
- Interface simples estilo terminal no servidor de PC com suporte a inglês, português e espanhol.
- Leitura do nível de bateria do controle exibida tanto no celular quanto no dashboard do PC.
- Otimização de latência usando canais assíncronos em Kotlin e TCP_NODELAY.
- Executável autônomo (.exe) para o servidor do PC, sem necessidade de instalar o Python.
- Windows 10 ou mais recente.
- Driver do ViGEmBus instalado no sistema.
- Python 3.10+ (apenas se for rodar o código-fonte manualmente).
- Android com suporte a USB OTG.
- Um controle DualShock 4.
- Opção A: Cabo USB ligando o celular ao PC (usando ADB reverse para menor latência).
- Opção B: Celular e PC conectados na mesma rede sem fio (WiFi).
Opção 1 (Executável pré-compilado):
Execute o arquivo DS4WifiServer.exe localizado dentro da pasta pc/. Não é necessário instalar nenhuma outra dependência além do driver ViGEmBus.
Opção 2 (Código fonte):
# Instale as dependências necessárias
pip install vgamepad rich
# Inicie o servidor
python pc/server.pyCompile o código do projeto usando o Gradle ou abra a pasta no Android Studio:
cd android
./gradlew assembleDebugDepois, instale o arquivo APK gerado no seu aparelho.
- Certifique-se de ter instalado o driver do ViGEmBus no Windows.
- Conecte o controle DualShock 4 ao celular via cabo OTG ou Bluetooth.
- Conecte o celular ao computador:
- Se for usar WiFi: Garanta que ambos estão na mesma rede.
- Se for usar cabo: Ative a depuração USB e rode o servidor do PC, que fará o redirecionamento de porta automaticamente.
- Execute o
DS4WifiServer.exeno computador (ou rode via script Python). - Escolha o idioma no console do PC e inicie o servidor.
- Abra o aplicativo DS4Wifi no celular. Ele tentará se conectar de forma automática. Caso a conexão falhe, ele repetirá o processo a cada 2 segundos até conseguir parear.
DS4Wifi allows you to use your Android phone as a wireless bridge to connect your DualShock 4 controller to your PC. By connecting the physical controller to the phone, DS4Wifi streams the input packets over the local network (or via USB cable using ADB reverse) to the computer, where a virtual PS4 controller is created using the ViGEmBus driver.
The project is split into two components:
| Component | Location | Description |
|---|---|---|
| Android App | android/ |
Kotlin application that captures gamepad events and streams them over a TCP socket |
| PC Server | pc/ |
Python server with a terminal interface (Rich) that receives the packets and emulates a virtual DualShock 4 |
Games see a native DualShock 4 device, meaning full compatibility, including rumble support sent back from PC games directly to the controller on your phone.
- Complete DualShock 4 emulation (buttons, axes, triggers, and D-pad).
- Real-time streaming over local WiFi or USB cable (via ADB reverse).
- Native rumble/vibration feedback support.
- Clean terminal UI for the PC server with English, Portuguese, and Spanish language options.
- Real-time controller battery level reporting displayed on both client and server UIs.
- Latency optimizations using Kotlin Channels and TCP_NODELAY.
- Pre-compiled standalone executable (.exe) for the PC server.
- Windows 10 or newer.
- ViGEmBus driver installed.
- Python 3.10+ (only required if running from the source code).
- Android device with USB OTG support.
- DualShock 4 controller.
- Option A: USB connection using ADB reverse (recommended for lowest latency).
- Option B: Both devices connected to the same local WiFi network.
Option 1 (Pre-compiled Executable):
Run the DS4WifiServer.exe file located inside the pc/ folder.
Option 2 (Source Code):
# Install dependencies
pip install vgamepad rich
# Run the server
python pc/server.pyBuild the project from source:
cd android
./gradlew assembleDebugThen install the generated APK file on your device.
- Ensure the ViGEmBus driver is installed on Windows.
- Connect your controller to the phone via Bluetooth or USB OTG.
- Connect the phone to the computer (either over WiFi or via USB debugging cable).
- Run
DS4WifiServer.exeon your PC. - Select your language in the terminal prompt and start the server.
- Open the DS4Wifi app on your phone. It will attempt to connect automatically, retrying every 2 seconds if the server is not ready yet.
| Layer | Technology |
|---|---|
| Android App | Kotlin, Coroutines, VibratorManager API |
| PC Server | Python, vgamepad, Rich, PyInstaller |
| Communication | TCP sockets with JSON payloads |
| Gamepad Driver | ViGEmBus (virtual DualShock 4) |
DS4Wifi/
├── android/ # Android app (Kotlin)
│ ├── app/ # Main application module
│ ├── build.gradle.kts # Project build config
│ └── ...
├── pc/ # PC server (Python)
│ ├── server.py # Main server script
│ ├── DS4WifiServer.exe # Pre-built executable
│ └── ...
├── logo.png # Project logo
└── README.md # This file
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2026 DS4Wifi Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
