BluetoothLE.Server.Linux 1.0.0

dotnet add package BluetoothLE.Server.Linux --version 1.0.0
NuGet\Install-Package BluetoothLE.Server.Linux -Version 1.0.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="BluetoothLE.Server.Linux" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BluetoothLE.Server.Linux --version 1.0.0
#r "nuget: BluetoothLE.Server.Linux, 1.0.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.
// Install BluetoothLE.Server.Linux as a Cake Addin
#addin nuget:?package=BluetoothLE.Server.Linux&version=1.0.0

// Install BluetoothLE.Server.Linux as a Cake Tool
#tool nuget:?package=BluetoothLE.Server.Linux&version=1.0.0

.NET BLE Server

Main Pipeline MIT License NuGet

.NET BLE Server is a library to support creation of BLE peripherals on Linux using .NET Core.

Under the hood the library uses BlueZ. The provided API aims to preserve the object structure of BlueZ whilst minimizing the aspects of the D-Bus communication.

Examples

using (var serverContext = new ServerContext())
{
    var advertisementProperties = new AdvertisementProperties
    {
        Type = "peripheral",
        ServiceUUIDs = new[] { "12345678-1234-5678-1234-56789abcdef0"},
        LocalName = "A",
        Appearance = (ushort)Convert.ToUInt32("0x0080", 16),
        Discoverable = true,
        IncludeTxPower = true,
    };

    await new AdvertisingManager(serverContext).CreateAdvertisement(advertisementProperties);
}

Simple GATT Application

using (var serverContext = new ServerContext())
{
    var gattServiceDescription = new GattServiceDescription
    {
        UUID = "12345678-1234-5678-1234-56789abcdef0",
        Primary = true
    };

    var gattCharacteristicDescription = new GattCharacteristicDescription
    {
        UUID = "12345678-1234-5678-1234-56789abcdef1",
        Flags = CharacteristicFlags.Read | CharacteristicFlags.Write | CharacteristicFlags.WritableAuxiliaries | CharacteristicFlags.Notify
    };
    var gattDescriptorDescription = new GattDescriptorDescription
    {
        Value = new[] {(byte) 't'},
        UUID = "12345678-1234-5678-1234-56789abcdef2",
        Flags = new[] {"read", "write"}
    };
    var gab = new GattApplicationBuilder();
    gab
        .AddService(gattServiceDescription)
        .WithCharacteristic(gattCharacteristicDescription, new[] {gattDescriptorDescription});

    await new GattApplicationManager(serverContext).RegisterGattApplication(gab.BuildServiceDescriptions());
}

Useful references

Resource Link
BlueZ GATT API documentation https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/gatt-api.txt
Presentation BLE on Linux https://elinux.org/images/3/32/Doing_Bluetooth_Low_Energy_on_Linux.pdf
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
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
1.0.0 583 11/23/2023