I have a Bluetooth LE device with custom characteristics that send notifications to an android device just fine.
On Windows 8.1 however the notifications are not received. I can open a connection to the device using CreateFile()
, enable notifications using BluetoothGattSetDEscriptorValue()
and register a callback function using BluetoothGattRegisterEvent()
without problems. However the used callback function is never called unless i continuously set a Characteristic value manually to keep the connection alive using something like this:
while(1){
Sleep(1000);
// Write characteristic using BLuetoothGattSetCharacteristicValue()
}
Is it supposed to work like this? How can i get the callback to be called when notifications are enabled without having to manually initiate the connection?