-
-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Description
I can not seem to get any Bluetooth Classic devices to show up. Everything was working fine with the legacy package 32feet.NET. This is on Windows 11, tested on two laptops.
using InTheHand.Net.Bluetooth;
using InTheHand.Net.Sockets;
BluetoothClient bluetoothClient = new();
bluetoothClient.InquiryLength = TimeSpan.FromSeconds(20);
bluetoothClient.Authenticate = false;
bluetoothClient.Encrypt = false;
Console.WriteLine("Start searching");
ListDevices();
ListDevicesAsync();
void ListDevices()
{
BluetoothDeviceInfo[] devices = bluetoothClient.DiscoverDevices().ToArray();
Console.WriteLine($"Devices found: {devices.Length}");
foreach (BluetoothDeviceInfo device in devices)
{
Console.WriteLine(device.DeviceName);
}
}
async void ListDevicesAsync()
{
IAsyncEnumerable<BluetoothDeviceInfo> devices = bluetoothClient.DiscoverDevicesAsync();
await foreach (BluetoothDeviceInfo device in devices)
{
Console.WriteLine(device.DeviceName);
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels