• Stars
    star
    630
  • Rank 71,328 (Top 2 %)
  • Language
    HTML
  • License
    BSD 3-Clause "New...
  • Created about 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Windows kernel-mode Bluetooth Profile & Filter Drivers for PS3 peripherals

BthPS3

Windows kernel-mode Bluetooth Profile & Filter Drivers for PS3 peripherals.

Build status GitHub All Releases Discord Website GitHub followers Twitter Follow

About

TL;DR: these drivers allow popular PlayStation(R) 3 gaming peripherals (SIXAXIS/DualShock 3, PS Move Navigation & Motion Controllers) to connect to Windows via Bluetooth without losing any standard functionality. ๐Ÿ˜Š

This set of Windows kernel-mode drivers enhances the standard (a.k.a. vanilla) Bluetooth stack (Microsoft/Broadcom/Toshiba/Intel/...) with an additional L2CAP server service (profile driver) and a USB lower filter driver gracefully working around the reserved PSMs issue causing the PS3 peripherals connections to get denied on the default Windows stack. The profile driver attempts to distinguish the incoming device types based on their reported remote names and exposes their HID Control and HID Interrupt channels via simple bus child devices (a.k.a PDOs). The profile/bus driver supports both "regular" operation modes (requiring a proper function driver like a HID-minidriver) and "raw" mode (powering the PDO up without a function driver and exposing it to user-land) for maximum flexibility and future-proofing. The PSM filter only attaches to Bluetooth class devices and unloads itself if the underlying enumerator isn't USB.

The solution consists of the following individual projects:

  • BthPS3 - Multi-purpose kernel-mode driver. Function driver for service PDO exposed by BTHENUM (Microsoft), Bluetooth profile (L2CAP server service) and bus driver for PS3 wireless peripherals.
  • BthPS3PSM - Lower filter driver for BTHUSB, patching L2CAP packets. Required for profile driver to receive L2CAP traffic.
  • BthPS3Util - User-land command-line utility for managing driver installation tasks and configuration changes.
  • BthPS3CfgUI - User-land GUI utility to safely edit driver settings.
  • BthPS3SetupHelper - Library hosting utility functions for driver management.
  • BthPS3CA - Custom Actions for WiX-based setup.
  • BthPS3Setup - WiX-based setup for driver installation and removal.

Licensing

This solution contains BSD-3-Clause and MIT licensed components:

  • Drivers (BthPS3.sys, BthPS3PSM.sys) - BSD-3-Clause
  • Setup (WiX project and assets) - BSD-3-Clause
  • User-land utilities (BthPS3Util.exe, BthPS3CfgUI.exe) - MIT

For details, please consult the individual LICENSE files.

Environment

BthPS3 components (drivers, utilities) are developed, designed and tested for Windows 10 or newer (x86, x64, ARM64).

Supported Bluetooth host devices

The BthPS3 profile driver and supported devices have been tested successfully with host devices following Link Manager Protocol (LMP) core specification version 3 (which equals Bluetooth 2.0 + EDR) and higher. Anything lower than that is not advised and not supported. Check your particular chip firmware version in Device Manager prior to installing the drivers:

MB0xeRakoP.png

When loaded onto an unsupported host radio, device boot will fail with STATUS_DEVICE_POWER_FAILURE:

P37N2cgWdG.png

For a list of tested devices consult the extended documentation.

Link Manager Versions

LMP Bluetooth Version
0 Bluetooth 1.0b
1 Bluetooth 1.1
2 Bluetooth 1.2
3 Bluetooth 2.0 + EDR
4 Bluetooth 2.1 + EDR
5 Bluetooth 3.0 + HS
6 Bluetooth 4.0
7 Bluetooth 4.1
8 Bluetooth 4.2
9 Bluetooth 5
10 Bluetooth 5.1
11 Bluetooth 5.2

How to build

Prerequisites

You can build individual projects of the solution within Visual Studio.

Documentation

Take a look at the project page for more information.

Device tree

Below representation attempts to visualize the relationships between the drivers and devices involved (near host hardware on the bottom, towards exposed child devices on top):

     +----------------------+                                +----------------------+
     |    Navigation PDO    +<----------+         +--------->+      Motion PDO      |
     +----------------------+           |         |          +----------------------+
                                        |         |
                                        |         |
                                        |         |
                                        |         |
                                        |         |
+----------------------+          +-----+---------+------+         +----------------------+
|      SIXAXIS PDO     +<---------+ Profile & Bus Driver +-------->+     Wireless PDO     |
+----------------------+          |     (BthPS3.sys)     |         +----------------------+
                                  +----------+-----------+
                                             ^
                                             |
                                             v
                                  +----------+-----------+
                                  | Bluetooth Enumerator |
                                  |    (bthenum.sys)     |
                                  +----------+-----------+
                                             ^
                                             |
                                             v
                                  +----------+-----------+
                                  |     bthport.sys      |
                                  +----------+-----------+
                                             ^
                                             |
                                             v
                                  +----------+-----------+
                                  |      bthusb.sys      |
                                  +----------+-----------+
                                             ^
                                             |
                                             v
                                  +----------+-----------+
                                  | BthPS3PSM.sys filter |
                                  +----------+-----------+
                                             ^
                                             |
                                             v
                                  +----------+-----------+
                                  |       USB Stack      |
                                  +----------+-----------+
                                             ^
                                             |
                                             v
                                  +----------+-----------+
                                  | USB Bluetooth dongle |
                                  +----------------------+

Installation

Pre-built binaries and instructions are provided by Nefarius Software Solutions e.U. and available as an all-in-one setup (note: officially supports Windows 10/11 only).

Check out the companion solution DsHidMini for using the controller in games!

Support

If facing issues please check out our official support resources first for similar cases and possible solutions.

Contributing

This project was birthed out of curiosity and the drive to learn more about Bluetooth drivers for Microsoft Windows (and a lingering love for the DualShock 3). If it brought you joy please consider checking out the Sponsor-Button on top and toss a coin to your Developer, O' Valley of Gamers ๐Ÿ˜ƒ

Sources & 3rd party credits

More Repositories

1

ScpToolkit

Windows Driver and XInput Wrapper for Sony DualShock 3/4 Controllers
C#
3,025
star
2

ViGEmBus

Windows kernel-mode driver emulating well-known USB game controllers.
C++
2,582
star
3

DsHidMini

Virtual HID Mini-user-mode-driver for Sony DualShock 3 Controllers
C
1,174
star
4

HidHide

Gaming Input Peripherals Device Firewall for Windows.
C++
888
star
5

Injector

Command line utility to inject and eject DLLs
C++
375
star
6

Indicium-Supra

DirectX API-hooking framework
C++
300
star
7

FireShock

Windows USB Driver for Sony DualShock 3 Controllers
C
210
star
8

Legacinator

The one and only Legacinator
C#
173
star
9

HidGuardian

Windows kernel-mode driver for controlling access to various input devices.
C
171
star
10

Shibari

Gaming input peripherals prototyping platform for Windows
C#
139
star
11

ViGEmClient

ViGEm Client SDK for feeder development.
C
128
star
12

ViGEm.NET

.NET bindings for the ViGEmClient library.
C#
99
star
13

VDX

XInput/x360ce to ViGEm sample application
C++
88
star
14

ViGEm.github.io

Sources of ViGEm Website.
HTML
74
star
15

vicius

Nefarius' nลvฤซcฤญus universal software updater agent for Windows.
C++
49
star
16

nefcon

Windows device driver installation and management tool.
C++
45
star
17

ScpVBus

Scarlett.Crush Productions Virtual Bus Driver
C
40
star
18

AirBender

Windows Bluetooth Host Driver for Sony DualShock Controllers
C
39
star
19

socksifier

One DLL to redirect them all to a SOCKS5 server.
C
35
star
20

sm-ext-socket

This extension provides networking functionality for SourceMod scripts.
C++
33
star
21

XInputHooker

XInput reverse-engineering tools and documentation
C++
30
star
22

Nefarius.Utilities.DeviceManagement

Managed wrappers around SetupAPI, Cfgmgr32, NewDev and DrvStore native APIs on Windows.
C#
30
star
23

Identinator

Rewrites hardware identification properties of USB devices on Microsoft Windows
C#
28
star
24

docs.nefarius.at

Sources of Nefarius' Knowledge-Base Website
HTML
20
star
25

WpfRichText.Ex

Simple WYSIWYG HTML editor control for WPF
C#
19
star
26

Nefarius.DSharpPlus.Extensions.Hosting

Glues .NET Core Hosting and DSharpPlus together for use with DI.
C#
15
star
27

MACAddressChanger

Easily change your network adapters MAC address with this little tool.
C++
13
star
28

CntlmUI

Graphical User Interface and Startup-Agent for the Cntlm Authorization Proxy
C#
12
star
29

DLLSpy

DLL Hijacking Detection Tool
C++
11
star
30

Nefarius.Drivers.WinUSB

WinUSB .NET wrapper library
C#
11
star
31

rtmp-server

Self-hosted RTMP streaming server with web player
HTML
10
star
32

libsbc

Bluetooth low-complexity, subband codec (SBC) library
C
10
star
33

Nefarius.Drivers.HidHide

Managed API for configuring HidHide.
C#
10
star
34

Nefarius.Utilities.Bluetooth

Utility library for unconventional Bluetooth tasks on Windows.
C#
9
star
35

WorkshopMapLoader

Advanced Workshop Map Loader and Game Type Adjuster
SourcePawn
9
star
36

Nefarius.Utilities.WindowsVersion

Utility classes to get detailed Windows version and some extras like UEFI and BCD properties.
C#
8
star
37

udpflood

Simple network stress test tool which penetrates a target host with random UDP packages.
C
8
star
38

WinApiSniffer

Windows API sniffer and dumper utility for reverse engineering.
C
8
star
39

WinDbgSymbolsCachingProxy

WinDbg Symbols Caching Proxy.
C#
8
star
40

HideDS4

A small helper-library which prevents a process from accessing a connected DualShock 4 controller
C++
7
star
41

Nefarius.Peripherals.SerialPort

P/Invoke wrapper for Win32API serial port
C#
7
star
42

Nefarius.Utilities.HIDReportKit

Managed types and utility classes for HID report parsing and transforming.
C#
7
star
43

AnnoyingFlooder

Wanna make a little prank to your IT-Friends? Use this tool and fill his hard drive with hidden garbage files!
C#
6
star
44

WDF-Utils

Windows Device Driver Development Utilities Collection
C
6
star
45

WireShock

Windows Bluetooth Host Driver for Sony DualShock Controllers
C
6
star
46

TrueMount-2

Automounter for TrueCrypt.
C#
5
star
47

HidCerberus

Companion service to manage HidGuardian device blocking and process whitelisting.
C#
5
star
48

GotifySmtpForwarder

Forwards e-mails to a Gotify application.
C#
4
star
49

ViGEm.Setup

Resources for builing a setup to redistribute a device driver reliably.
C#
4
star
50

EPPT

A simple, self-contained Windows tool to display and toggle "Enhanced Pointer Precision" a.k.a. mouse acceleration.
C++
4
star
51

ViGEm.Management

Tools for distribution, installation and management of the ViGEm framework drivers.
C#
4
star
52

StreamsFinder

Microsoftยดs new technology file system has a pretty unknown feature called data streams. Find hidden ones easily with this tool!
C#
4
star
53

putty-tunnel-manager

Automatically exported from code.google.com/p/putty-tunnel-manager
C#
4
star
54

ViGEmClient.vcpkg

Vcpkg portfile for native ViGEm Client library
CMake
3
star
55

SourceSec

Proof-of-concept RSA SourceMod extension
C++
3
star
56

TrueMount-3

Automounter for TrueCrypt
C#
3
star
57

XInputPlayerToDevicePath

XInput User Index to Device Instance ID PoC
C++
3
star
58

Nefarius.Utilities.SessionNotification

Utility classes to get notified about session state changes on Windows.
C#
3
star
59

CitrixConfigurator

Edit the registry-stored configuration of the Citrix Online Plug-in with this small tool.
C#
3
star
60

garbage-and-scam-sites

My personal little rule set for uBlacklist blocking useless and scam trash sites ๐Ÿšฏ
3
star
61

vpatch

Versioning helper command line utility
C#
3
star
62

AppVeyorArtifactsReceiver

Web service listening for deployment webhook calls from AppVeyor CI/CD.
C#
3
star
63

Nefarius.Utilities.Registry

Registry Export File (.reg) Parser
C#
3
star
64

Mana

A tiny work-in-progress Kibana replacement using Blazor.
C#
3
star
65

Nefarius.Utilities.GitHubUpdater

Utility classes to perform application update checks using GitHub repositories.
C#
3
star
66

LupuServ

E-Mail to SMS Gateway service for Lupusec XT1 alarm system
C#
2
star
67

IgorBot

Advanced Discord bot to automate new Member on-boarding.
C#
2
star
68

Libarius

Collection of utility classes for common .NET tasks
C#
2
star
69

ManagedDevcon

Managed wrapper around various SetupAPI functions.
C#
2
star
70

ds4sniffer

DLL performing API-hooking to find which process is talking to the DS4.
C++
2
star
71

AdvancedUpdaterGitHubProxy

Builds an Advanced Installer Updater Configuration File from GitHub Releases.
C#
2
star
72

POCO-Windows

NuGet build scripts for POCO C++ libraries
PowerShell
2
star
73

foxx-filestore

File Storage Foxx Microservice for ArangoDB
JavaScript
2
star
74

Nefarius.Standards.CAMT

Utility classes to help decoding "Bank-to-Customer Cash Management Swiss Payment Standards" a.k.a. CAMT XML files.
C#
2
star
75

CSGOLauncher

Small .NET GUI launcher for CS:GO Windows server
C#
2
star
76

Symphonia

Simple DLNA-compatible music player
C#
2
star
77

NuGetCachingProxy

A very simple caching proxy for NuGet packages
C#
2
star
78

Nefarius.Utilities.AspNetCore

My opinionated collection of utilities for ASP.NET Core applications.
C#
2
star
79

Nefarius.Utilities.DotNetInstaller

Utility classes to download and install modern .NET runtimes.
C#
1
star
80

docker-node-service-host

Provides a convenience Docker image to run Node services under Supervisord.
Dockerfile
1
star
81

Nefarius.Utilities.NtDll

Managed wrappers around NTDLL native APIs on Windows.
C#
1
star
82

metamodmmt

Proxy DLL for Metamod for Half-Life 1 enabling Windows high-resolution timers
C++
1
star
83

nefarius

My GitHub public profile!
1
star
84

SCD

To Secure, Contain, and Deny
C
1
star
85

SIF

Squid Image Fetcher
Python
1
star
86

Updater

Automatically updates SourceMod plugins and files
SourcePawn
1
star
87

ServerHibernateFix

A Sourcemod Plugin to work-around the workshop map server hibernate problem
SourcePawn
1
star
88

MightyDsHidMini

Crude quick 'n' dirty benchmark tool for DsHidMini
C#
1
star
89

ScpSamples

Sample Add-Ons for the ScpServer
C#
1
star
90

ViGEm.Jaeger

Benchmark tool for the client SDK using Jaeger Tracing
C++
1
star
91

Arduino_Uno_Audio_PWM_Modulator

Arduino
1
star
92

honestus

Versioning helper command line utility
C#
1
star
93

ReactiveProtobuf

Protobuf protocol implementation for ReactiveSockets
C#
1
star
94

Nefarius.Utilities.EnglishExceptions

Unlocalizes non-English exception messages in any .NET application.
C#
1
star
95

nefarius-vcpkg-registry

My vcpkg packages registry.
PowerShell
1
star
96

Nefarius.Utilities.WixSharp

C#
1
star
97

Nefarius.Steam.PartnerWebApi

Steamworks Web API wrapper for .NET using Refit.
C#
1
star
98

docker-mdwiki

Docker container for hosting and auto-updating an MDwiki instance.
HTML
1
star
99

CentralisedOutlookSignature

C#
1
star
100

Nefarius.HttpClient.LiteDbCache

Adds disk-based response caching to HttpClient named instances using LiteDB.
C#
1
star