UsbBluetooth 0.1.2

dotnet add package UsbBluetooth --version 0.1.2
                    
NuGet\Install-Package UsbBluetooth -Version 0.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UsbBluetooth" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UsbBluetooth" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="UsbBluetooth" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add UsbBluetooth --version 0.1.2
                    
#r "nuget: UsbBluetooth, 0.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package UsbBluetooth@0.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=UsbBluetooth&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=UsbBluetooth&version=0.1.2
                    
Install as a Cake Tool

USB Bluetooth

Build NuGet

Take full control of your USB Bluetooth controllers from C#!

For general documentation about the project, please visit usbbluetooth.github.io.

For a C version of this library, check out UsbBluetooth for C.

For a Python version of this library, check out UsbBluetooth for Python or Scapy UsbBluetooth for direct integration with Scapy.

Installation

Use the NuGet package!

Usage

Once installed, you may list devices using UsbBluetoothManager.ListControllersWithDriver(), and for each device you may Open() the device, Write() and Read() to them and Close() it once you are done. See the Examples folder for some sample code.

Plaform quirks

Windows

In Windows you may have to install WinUSB driver in your device using Zadig. Otherwise, UsbBluetooth will detect your device but it may not be able to take control of your device.

Linux

Your Linux user must have permissions to access USB hardware. Here are several options to ensure access:

  • Run as root: Execute the application with elevated privileges using sudo. Note that this may not be ideal for security reasons.

  • Add user to a group: Add your user to the plugdev, usb or uucp group (depending on your distribution). Remeber to reboot or log out and log back in for the changes to take effect. For example:

    sudo usermod -a -G plugdev $USER
    
  • Create a udev rule: Create a custom udev rule to automatically set permissions for USB Bluetooth devices. Create a file like /etc/udev/rules.d/99-usbbluetooth.rules with content similar to:

    SUBSYSTEM=="usb", ATTR{idVendor}=="your_vendor_id", ATTR{idProduct}=="your_product_id", MODE="0666"
    

    Replace your_vendor_id and your_product_id with the actual vendor and product IDs of your device (you can find these using lsusb). Then reload udev rules with sudo udevadm control --reload-rules && sudo udevadm trigger.

History

Package versions < 0.1 were bindings around the original C library. The history for those packages can be found in the usbbluetooth repository in the respective tags.

Package versions >= 0.1 are developed in this repo and based of LibUsbDotNet, the C# LibUSB binding.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.2 127 11/8/2025
0.1.1 169 10/13/2025
0.1.0 175 10/13/2025