This project has moved. For the latest updates, please go here.

How to make BluetoothDeviceInfo.Connected false?

Topics: Bluetooth - Microsoft
Nov 27, 2012 at 6:11 PM
Edited Nov 30, 2012 at 3:26 PM

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?



If it is really connected, can I just get the stream to Write/Read to/from it? I mean, can I get the underlying socket?

Dec 8, 2012 at 3:48 PM

I don't know of a native API to do that. The stacks presumable just close the connection after idle time -- after there are no upper-layer connections.

What platform are you targetting? Desktop Windows with the Microsoft stack?

Dec 10, 2012 at 4:01 PM

Nevermind, it was more a problem of architecture than anything