Linux-based DualSense Bluetooth to USB bridge for small USB dongles.
This project turns a Bluetooth-connected Sony DualSense controller into a USB composite device on the host side. The current implementation focuses on macOS: gamepad input, controller output, speaker/headset playback, microphone capture, and mic mute handling are handled on the Linux dongle.
This is a working development build.
Tested with:
- Host: macOS 26.1, Apple Silicon Mac mini.
- Dongle OS: Debian GNU/Linux 11 bullseye, aarch64.
- Dongle kernel: Linux 5.15.0-jsbsbxjxh66+ with USB gadget support.
- Controller: Sony DualSense wireless controller over Bluetooth HID.
- USB host mode: composite USB gadget with HID + UAC2 audio.
- DualSense USB HID identity:
054c:0ce6, product nameDualSense Wireless Controller. - Gamepad input reports to the host at about 250 Hz.
- Button, stick, trigger, touchpad and basic motion input forwarding.
- USB output reports for light bar, player LEDs, rumble and adaptive trigger state.
- USB speaker/headset playback through Bluetooth Opus audio packets.
- USB microphone capture from the DualSense Bluetooth microphone stream.
- Mic mute button handling, including mute state and mic button LED sync.
- DualSense tester 1 kHz speaker/headphone sine-wave test support.
- UAC2 audio function exposed together with the HID gamepad function.
- The project is currently tuned and tested mainly on one OpenStick-style aarch64 Linux dongle. Other boards may need USB gadget, Bluetooth and ALSA adjustments.
- Polling-rate selection is not exposed as a runtime option yet. The current USB input send period is 4 ms, about 250 Hz.
- Pico firmware supports configurable polling modes; the Linux gadget path does
not currently expose HID endpoint
bIntervalas a simple runtime setting. - Speaker/headset audio over Bluetooth is functional but still experimental.
- The browser-based DualSense tester may send the 1 kHz wave test as normal output reports instead of the original feature-report command; this build handles that behavior explicitly.
The project uses CMake and depends on ALSA, pthreads, WDL and Opus.
git submodule update --init --recursive
cmake -S . -B build
cmake --build build -j2The output binary is:
bin/ds5_dongle_linuxOn Debian-based aarch64 systems, install the required build packages first:
apt update
apt install -y build-essential cmake pkg-config libasound2-devThe dongle needs:
- Root access.
configfsmounted at/sys/kernel/config.- USB gadget kernel support:
libcomposite,usb_f_hid,usb_f_uac2. - Bluetooth HID access through BlueZ and
/dev/hidraw*. - ALSA PCM device for the UAC2 gadget audio path.
Pair and connect the DualSense through BlueZ first, then run the bridge binary as root:
sudo ./bin/ds5_dongle_linuxThe binary creates the USB composite gadget and forwards data between the Bluetooth DualSense and the USB host.
DS5_ENABLE_BT_MIC=1: enable Bluetooth microphone handling.DS5_BT_MIC_BUTTON_MUTE=1: make the DualSense mic button toggle mute.DS5_AUDIO_PACKET_MODE=legacy: use the legacy combined audio packet format.DS5_AUDIO_STATE_MODE=pico-mic: use the audio state layout currently closest to the Pico implementation.DS5_HID_NO_OUT_ENDPOINT=1: compatibility mode for HID output reports when the host sends reports through control transfers.
Pair and connect the controller with the Linux dongle through BlueZ first. After the Bluetooth HID device appears, run the bridge binary as root.
Useful checks on the dongle:
ls -l /dev/hidraw* /dev/hidg* /dev/snd/*
bluetoothctl info <controller-mac>Expected runtime signs:
/dev/hidraw*for the Bluetooth DualSense./dev/hidg0for the USB HID gadget./dev/snd/*entries for UAC2 playback/capture.- macOS sees
DualSense Wireless Controlleras HID and audio device.
This Linux build was developed while comparing behavior with the Pico-based implementation and public DualSense protocol references.
Useful references:
- rafaelvaloto/Pico_W-Dualsense
- egormanga/SAxense
- Paliverse/DualSenseX
- controllers.fandom.com DualSense packet documentation
Original project lineage: