本文介绍了微软iot核心覆盆子pi - 血压的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 亲爱的先生们, 我正在尝试阅读服务血压(0x1810)的特征性血压测量值(0x2A35),但它给了我关注异常: 指定的登录会话没有用户会话密钥。 请检查我的代码下面,当我执行以下命令时发生错误: var t2 = await characteristic.WriteClientCharacteristicConfigurationDescriptorAsync( GattClientCharacteristicConfigurationDescriptorValue.Indicate); IReadOnlyList< gattcharacteristic> characteristicList; characteristicList = gattService.GetCharacteristics( new Guid(UUID_CHARACTERISTIC_BLOOD_PRESSURE_MEASUREMENT)); if (characteristicList == null )返回; if (characteristicList.Count < = 0 )返回; GattCharacteristic特征= characteristicList [ 0 ]; if (!characteristic.CharacteristicProperties.HasFlag(GattCharacteristicProperties.Indicate)) return ; characteristic.ProtectionLevel = GattProtectionLevel.Plain; arrayCharacteristics [INDEX_BLOOD_PRESSURE] =特征; characteristic.ValueChanged + = bloodPressure_ValueChanged; var t1 = await characteristic.ReadClientCharacteristicConfigurationDescriptorAsync(); var t2 = await characteristic.WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacteristicConfigurationDescriptorValue.Indicate); var t3 = await characteristic.ReadClientCharacteristicConfigurationDescriptorAsync(); b $ b 我做错了什么?消息的含义是什么? 非常感谢。解决方案 如果此服务是API或者Web服务,此消息告诉您没有密钥来访问该服务。 您可以尝试进入服务网站并要求API键 Dear Sirs,i'm trying to read characteristic Blood Pressure Measurement (0x2A35) of the service Blood Pressure (0x1810) but it give me the follow exception: There is no user session key for the specified logon session.Please check my code below, that error occurs when i do the follow command:var t2 = await characteristic.WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacteristicConfigurationDescriptorValue.Indicate);IReadOnlyList<gattcharacteristic> characteristicList;characteristicList = gattService.GetCharacteristics(new Guid(UUID_CHARACTERISTIC_BLOOD_PRESSURE_MEASUREMENT));if (characteristicList == null) return;if (characteristicList.Count <= 0) return;GattCharacteristic characteristic = characteristicList[0];if (!characteristic.CharacteristicProperties.HasFlag(GattCharacteristicProperties.Indicate)) return;characteristic.ProtectionLevel = GattProtectionLevel.Plain;arrayCharacteristics[INDEX_BLOOD_PRESSURE] = characteristic;characteristic.ValueChanged += bloodPressure_ValueChanged;var t1 = await characteristic.ReadClientCharacteristicConfigurationDescriptorAsync();var t2 = await characteristic.WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacteristicConfigurationDescriptorValue.Indicate);var t3 = await characteristic.ReadClientCharacteristicConfigurationDescriptorAsync();What i'm doing wrong? What the message means?Thank you a lot. 解决方案 if this service was an API or Web Service, this message is telling that you don't have a key to access the service.you can try enter in the service website and ask for an API key 这篇关于微软iot核心覆盆子pi - 血压的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-15 10:37