C# &引用;等待selectedCharacteristic.ReadValueAsync(BluetoothCacheMode.Uncached)&引用;不归还任何东西

C# &引用;等待selectedCharacteristic.ReadValueAsync(BluetoothCacheMode.Uncached)&引用;不归还任何东西,c#,visual-studio,uwp,bluetooth-lowenergy,C#,Visual Studio,Uwp,Bluetooth Lowenergy,这行代码不返回任何结果 GattReadResult result = await selectedCharacteristic.ReadValueAsync(BluetoothCacheMode.Uncached); 我用这种方法找到了服务 GattDeviceServicesResult result = await bluetoothLeDevice.GetGattServicesForUuidAsync(new Guid("00001805-0000-1000-8000-00805F9

这行代码不返回任何结果

GattReadResult result = await selectedCharacteristic.ReadValueAsync(BluetoothCacheMode.Uncached);
我用这种方法找到了服务

GattDeviceServicesResult result = await bluetoothLeDevice.GetGattServicesForUuidAsync(new Guid("00001805-0000-1000-8000-00805F9B34FB"),BluetoothCacheMode.Cached);
而这正是它的特点

 var result = await attributeInfoDisp.service.GetCharacteristicsForUuidAsync(new Guid("00002A2B-0000-1000-8000-00805F9B34FB"), BluetoothCacheMode.Cached);
而这个

var result = await selectedCharacteristic.GetDescriptorsForUuidAsync(new Guid("00002902-0000-1000-8000-00805F9B34FB"), BluetoothCacheMode.Cached);
但是当我试着用

GattReadResult result = await selectedCharacteristic.ReadValueAsync(BluetoothCacheMode.Uncached);
我得到空结果

我怎样才能读懂这些特征呢?
请帮助

您的特征可读吗?由于某些原因,它也可能不适用于BluetoothCacheMode.Uncached。尝试使用BluetoothCacheMode.Cached。

我使用了BluetoothCacheMode.Cached。我正在阅读健康温度计服务及其特性,我已将read属性设置为true和必填,但它仍然显示read Failed您是否设置了应用程序功能?()我已将此代码添加到我的package.appxmanifest中,但仍然不走运,它无法读取温度您的代码看起来是正确的。有两个可能的问题:WinRT API中的bung(估计您使用的是Windows)或设备中的bug。如果你有安卓智能手机,你能在上面运行任何BLE应用程序,并确保它能按预期读取值吗?