3

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?

Vidya Sagar
  • 1,699
  • 3
  • 17
  • 28
Sisco
  • 71
  • 6
  • Another day without succes, i thought maybe it was because a console application does not have a message loop so i tried using a GUI application with the same result... I am starting to think that this is not posible using the bluetooth low energy functions described here: https://msdn.microsoft.com/en-us/library/windows/hardware/hh450825%28v=vs.85%29.aspx – Sisco Jul 02 '15 at 13:25
  • Are you sure you enabled it the right way? Can you post the code calling `BluetoothGattSetDEscriptorValue`? – UnTraDe Feb 28 '16 at 12:49
  • 1
    Super late but whatever.... The problem was caused by running windows in a virtual machine. – Sisco Aug 19 '16 at 09:59

0 Answers0