Nefarius.Utilities.Bluetooth
August 5, 2026 · View on GitHub
Utility library for unconventional Bluetooth tasks on Windows.
Important
This project is still evolving, so API-breaking changes might occur each update!
About
This is a collection of utility classes using undocumented Windows APIs to achieve wireless greatness! Ever needed a simple method of enabling or disabling Bluetooth without all that UWP and Store App nonsense? Wanna dive into modifying SDP records on your machine? This ever-growing library will provide the tools without any bloated dependencies! Enjoy and use responsibly! 😃
Documentation
Generating documentation
dotnet build -c:Releasedotnet tool install --global Nefarius.Tools.XMLDoc2Markdownxmldoc2md .\bin\net9-windows\Nefarius.Utilities.Bluetooth.dll .\docs\
Examples
Check for radio availability
// gives you 'true' if a radio is available (enabled or disabled)
bool isAvailable = HostRadio.IsAvailable;
// gives you 'true' if a radio is enabled (and therefore implicitly available)
bool isEnabled = HostRadio.IsEnabled;
// gives you 'true' if a radio is available and enabled
bool isOperable = HostRadio.IsOperable;
Turn Bluetooth On, Off or Restart it
Turn on:
using var radio = new HostRadio();
radio.EnableRadio();
Turn off:
using var radio = new HostRadio();
radio.DisableRadio();
Restart/reload (soft):
using var radio = new HostRadio();
radio.RestartRadio();
Restart the radio bus device (USB port cycle; requires administrative privileges):
HostRadio.RestartRadioDevice();
Disconnect a remote device
using var radio = new HostRadio();
radio.DisconnectRemoteDevice("MAC address");