ThinkMeta.Devices.Bluetooth.Core.Windows 0.2.0

dotnet add package ThinkMeta.Devices.Bluetooth.Core.Windows --version 0.2.0
                    
NuGet\Install-Package ThinkMeta.Devices.Bluetooth.Core.Windows -Version 0.2.0
                    
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="ThinkMeta.Devices.Bluetooth.Core.Windows" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ThinkMeta.Devices.Bluetooth.Core.Windows" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="ThinkMeta.Devices.Bluetooth.Core.Windows" />
                    
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 ThinkMeta.Devices.Bluetooth.Core.Windows --version 0.2.0
                    
#r "nuget: ThinkMeta.Devices.Bluetooth.Core.Windows, 0.2.0"
                    
#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 ThinkMeta.Devices.Bluetooth.Core.Windows@0.2.0
                    
#: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=ThinkMeta.Devices.Bluetooth.Core.Windows&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=ThinkMeta.Devices.Bluetooth.Core.Windows&version=0.2.0
                    
Install as a Cake Tool

ThinkMeta.Devices.Bluetooth

NuGet ThinkMeta.Devices.Bluetooth.Core
NuGet ThinkMeta.Devices.Bluetooth.Fitness
NuGet ThinkMeta.Devices.Bluetooth.HeartRate
NuGet ThinkMeta.Devices.Bluetooth.Core.Windows
NuGet ThinkMeta.Devices.Bluetooth.Fitness.Windows
NuGet ThinkMeta.Devices.Bluetooth.HeartRate.Windows
NuGet ThinkMeta.Devices.Bluetooth.Core.Maui
NuGet ThinkMeta.Devices.Bluetooth.Fitness.Maui
NuGet ThinkMeta.Devices.Bluetooth.HeartRate.Maui

ThinkMeta.Devices.Bluetooth is a .NET library for discovering, connecting to, and interacting with Bluetooth fitness and heart rate devices. It provides high-level APIs for scanning, connecting, and controlling devices such as treadmills (FTMS) and heart rate monitors.

Features

  • Scan for Bluetooth FTMS fitness machines (treadmill, indoor bike, cross trainer, rower, step climber, stair climber)
  • Scan for Bluetooth heart rate monitors
  • Connect to discovered devices
  • Receive real-time data (speed, distance, cadence, power, heart rate, etc.)
  • Control supported fitness machines (set speed, inclination, resistance, etc.)
  • Shared base classes and parsers for cross-platform reuse

Packages

Package Description
ThinkMeta.Devices.Bluetooth.Core Shared base classes (AdvertisementInfoBase, DeviceScannerBase)
ThinkMeta.Devices.Bluetooth.Fitness Shared FTMS data models and parsers (TreadmillData, IndoorBikeData, etc.)
ThinkMeta.Devices.Bluetooth.HeartRate Shared heart rate parsing (HeartRateMeasurementParser)
ThinkMeta.Devices.Bluetooth.Core.Windows Windows BLE scanning and advertisement tracking
ThinkMeta.Devices.Bluetooth.Fitness.Windows Windows FTMS device connection and control
ThinkMeta.Devices.Bluetooth.HeartRate.Windows Windows heart rate monitor connection
ThinkMeta.Devices.Bluetooth.Core.Maui .NET MAUI BLE scanning via Plugin.BLE
ThinkMeta.Devices.Bluetooth.Fitness.Maui .NET MAUI FTMS device connection and control
ThinkMeta.Devices.Bluetooth.HeartRate.Maui .NET MAUI heart rate monitor connection

Getting Started

Install the platform-specific packages for your target. The shared packages are pulled in automatically as transitive dependencies.

Windows

dotnet add package ThinkMeta.Devices.Bluetooth.Fitness.Windows
dotnet add package ThinkMeta.Devices.Bluetooth.HeartRate.Windows

.NET MAUI

dotnet add package ThinkMeta.Devices.Bluetooth.Fitness.Maui
dotnet add package ThinkMeta.Devices.Bluetooth.HeartRate.Maui

Examples

Scan and Control a Treadmill — Windows

using ThinkMeta.Devices.Bluetooth.Fitness.Windows;

var scanner = new FitnessDeviceScanner();
scanner.DeviceDiscovered += device => {
    if (device is FitnessMachineAdvertisementInfo ftms)
        Console.WriteLine($"Found: {ftms.Name} ({ftms.MachineTypes})");
};
scanner.StartScanning();

// ... wait for user to pick a device ...
scanner.StopScanning();

// Connect and control
using var treadmill = await FitnessDevice.ConnectAsync(selectedDevice.BluetoothAddress);
treadmill.TreadmillDataChanged += (sender, data) => {
    Console.WriteLine($"Speed: {data.InstantaneousSpeed / 100.0} km/h, Distance: {data.TotalDistance} m");
};
await treadmill.RequestControlAsync();
await treadmill.SetTargetSpeedAsync(1000); // 10.00 km/h

Scan and Control a Treadmill — .NET MAUI

using ThinkMeta.Devices.Bluetooth.Fitness.Maui;

var scanner = new FitnessDeviceScanner();
scanner.DeviceDiscovered += device => {
    if (device is FitnessMachineAdvertisementInfo ftms)
        Console.WriteLine($"Found: {ftms.Name} ({ftms.MachineTypes})");
};
await scanner.StartScanningAsync();

// ... wait for user to pick a device ...
await scanner.StopScanningAsync();

// Connect and control
using var treadmill = await FitnessDevice.ConnectAsync(selectedDevice);
treadmill.TreadmillDataChanged += (sender, data) => {
    Console.WriteLine($"Speed: {data.InstantaneousSpeed / 100.0} km/h, Distance: {data.TotalDistance} m");
};
await treadmill.RequestControlAsync();
await treadmill.SetTargetSpeedAsync(1000); // 10.00 km/h

Scan and Connect to a Heart Rate Monitor — Windows

using ThinkMeta.Devices.Bluetooth.HeartRate.Windows;

var scanner = new HeartRateMonitorDeviceScanner();
scanner.DeviceDiscovered += device => Console.WriteLine($"Found: {device.Name}");
scanner.StartScanning();

// ... wait for user to pick a device ...
scanner.StopScanning();

using var monitor = await HeartRateMonitorDevice.ConnectAsync(selectedDevice.BluetoothAddress);
monitor.HeartRateMeasurementReceived += hr => Console.WriteLine($"Heart Rate: {hr} bpm");

Scan and Connect to a Heart Rate Monitor — .NET MAUI

using ThinkMeta.Devices.Bluetooth.HeartRate.Maui;

var scanner = new HeartRateMonitorDeviceScanner();
scanner.DeviceDiscovered += device => Console.WriteLine($"Found: {device.Name}");
await scanner.StartScanningAsync();

// ... wait for user to pick a device ...
await scanner.StopScanningAsync();

using var monitor = await HeartRateMonitorDevice.ConnectAsync(selectedDevice);
monitor.HeartRateMeasurementReceived += hr => Console.WriteLine($"Heart Rate: {hr} bpm");

Parse FTMS Data Directly (Shared)

The shared data classes include static Parse() methods for decoding raw GATT characteristic bytes without a device connection:

using ThinkMeta.Devices.Bluetooth.Fitness;

byte[] rawBytes = /* characteristic value */;
var treadmill = TreadmillData.Parse(rawBytes);
if (treadmill is not null)
    Console.WriteLine($"Speed: {treadmill.InstantaneousSpeed / 100.0} km/h");

var bike = IndoorBikeData.Parse(rawBytes);
var rower = RowerData.Parse(rawBytes);
var crossTrainer = CrossTrainerData.Parse(rawBytes);

Parse Heart Rate Data Directly (Shared)

using ThinkMeta.Devices.Bluetooth.HeartRate;

byte[] rawBytes = /* characteristic value */;
var heartRate = HeartRateMeasurementParser.Parse(rawBytes);
if (heartRate is not null)
    Console.WriteLine($"Heart Rate: {heartRate} bpm");

Requirements

  • .NET 10 or later
  • Bluetooth adapter supported by your platform
  • .NET MAUI packages require Android, iOS, macOS Catalyst, or Windows

License

See LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net10.0-windows10.0.19041 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on ThinkMeta.Devices.Bluetooth.Core.Windows:

Package Downloads
ThinkMeta.Devices.Bluetooth.Fitness.Windows

Windows-specific classes for scanning and using Bluetooth fitness devices.

ThinkMeta.Devices.Bluetooth.HeartRate.Windows

Windows-specific classes for scanning and using Bluetooth heart rate monitors.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 115 3/24/2026

DeviceScanner now inherits from shared DeviceScannerBase; AdvertisementInfo now inherits from shared AdvertisementInfoBase.