bluetooth - Connect to BLE peripheral on Windows 10 -


i try connect ble peripheral. first, watch advertisements:

watcher = new bluetoothleadvertisementwatcher { scanningmode = bluetoothlescanningmode.active }; watcher.received += watcheronreceived; watcher.start(); 

and in watcheronreceived callback try create bluetoothledevice

public async void watcheronreceived(bluetoothleadvertisementwatcher sender, bluetoothleadvertisementreceivedeventargs btadv) {      bluetoothledevice bledevice = await bluetoothledevice.frombluetoothaddressasync(btadv.bluetoothaddress); } 

however, bledevice == null in watcheronreceived callback. why , how fix it? proper way of creating ble device in uwp application? need connect device, discover gatt services , characteristics, enable notifications on of them , read/write of them.

the answer question simple - not use ble on windows 10. api doesn't work or behaves randomly , totally undocumented. talking iot being next industrial revolution , microsoft not having working ble api after 6 year ble exists.


Comments