1 year ago
#198081
John May
Windows C# BLE connection stays open after process is killed
folks. I've got a BLE connection to a device, and I've discovered the services, characteristics, and descriptors, and I've registered for indications. All works fine.
BUT
While I'm receiving me indication values, one per second... if I KILL the client process - it's a console app so I just close it - the connection stays open. I know it's still open because the remote is my own device, and I can see the status on a serial monitor.
Win BLE provides no way to force close, even if I were to use DeviceWatcher to go find the connected device. Which I wouldn't want to do anyway, since I'm using the advertisement API and not DeviceWatcher.
I shouldn't need to force close anyway, because the process is gone.
I need to close this connection, or have it successfully close on its own. Any ideas?
c#
windows
bluetooth-lowenergy
gatt
0 Answers
Your Answer