如何从Windows Phone 8.1中发现蓝牙低功耗设备(BLE)

我正在编写一个Silverlight Windows Phone 8.1应用程序,我正在尝试从Windows Phone 8.1连接蓝牙低功耗(BLE)设备,该设备是“心率”,但我没有得到结果。 请参阅下面的代码。

protected async override void OnNavigatedTo(NavigationEventArgs e) { var devices = await DeviceInformation.FindAllAsync(GattDeviceService.GetDeviceSelectorFromUuid (GattServiceUuids.HeartRate)); if (devices.Count > 0) { } } 

我还在appmanifest文件中添加了function。

         

一切似乎都很好,但我没有得到输出。 出了什么问题?

心率传感器必须首先在手机的“设置 – >蓝牙”中配对。