Open vikramtamboli opened 1 year ago
same for me getting the device name and connect works fine ans i get data over BT
private BluetoothDeviceInfo getBTDevice(string BTDeviceName)
{
//BluetoothDeviceInfo _btDevice = null;
// Device Search Startet
foreach (BluetoothDeviceInfo bdi in BTClient.DiscoverDevices())
{
System.Diagnostics.Debug.WriteLine(bdi.DeviceName + " " + bdi.DeviceAddress);
if (bdi.DeviceName == BTDeviceName)
{
_btDevice = bdi;
BTClient.Connect(_btDevice.DeviceAddress, BluetoothService.SerialPort);
break;
}
}
return _btDevice;
}
Bute when I close the connection
BTClient.close(); // or BTClient.Dispose();
BTClient.Connect(BTDevice.DeviceAddress, BluetoothService.SerialPort);
The reconnection doesnt work. BTClient.Connected is always false.
best regards Chris
When I connect to the device then disconnect then again try to reconnect I am unable to do so it throws an exception cannot connect to disposed object
this i am able to reproduce always on windows 11 machine
also, this issue was not present in v4.0.24.525