I have a windows 10 UWP app that is able to pair with a bluetooth LE device programmatically. Once the pairing is successful, a connection to the device is also established.
If at some point, the device gets disconnected, I am not able to read any of the GattCharacteristics from the LE device. I'm able to check if the connection is present or not but I'm unable to re-establish the connection.
DeviceInformation deviceInfo = await DeviceInformation.CreateFromIdAsync("deviceId", "additionalProperties", "DeviceInformationKind");
if(deviceInfo.ConnectionStatus != BluetoothConnectionStatus.Connected) { // re-establish the connection }
Thanks.