简体   繁体   中英

How to disconnect bluetooth LE device on Windows 8.1

I'm developing an application with bluetooth low energy under Windows 8.1 and working with microsoft bluetooth le stack. I almost finish with all routines, I implemented: connection, reconnection, detection connection/disconnection notifications, connection state check... but one thing left - disconnection.

So, how to disconnect connected device using C++?

你不能,他们没有在windows sdk中实现这个功能,说维持连接比重新连接更好(在功耗方面)。

  1. Remove all ValueChanged events (-=)
  2. Set all GattCharacteristic to null
  3. Call Dispose on all Gatt Devices Services
  4. Call dispose on the BluetoothLEDevice
  5. Set the BluetoothLEDevice member to null
  6. GC.Collect()
  7. GC.WaitForPendingFinalizers()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM