2

How can I disconnect a Bluetooth device, so that its BluetoothDeviceInfo.Connected is false?

I tried using SetServiceState(BluetoothService.SerialPort, false) but it'll still be connected.

I don't want to use BluetoothSecurity.RemoveDevice because it'll take too long to uninstall and then reinstall the device.

Is it possible? Or is this only availiable at the device side?

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
Arturo Gurrola
  • 279
  • 1
  • 12

1 Answers1

1

I think it is not possible. The problem is that the properties in BluetoothDeviceInfo are set upon discovery. Any changes that happen later aren't notified.

http://www.nudoq.org/#!/Packages/32feet.NET/InTheHand.Net.Personal/BluetoothDeviceInfo

So, if you want the property to be changed, you have to disconnect, perform another discovery and use the new data.

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
xmashallax
  • 1,673
  • 1
  • 17
  • 34