解释特征属性(iOS和BLE) [英] Interpret Characteristic Properties (iOS and BLE)

查看:96
本文介绍了解释特征属性(iOS和BLE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从iPhone的BLE设备读取特征属性.

I am reading characteristic properties from a BLE device from my iPhone.

但是,我看到的某些属性(例如0xA,0x22)不在Apple提供的枚举列表中.这些属性是两个或多个枚举值的组合吗?还是来自制造商的这些自定义属性?在这方面需要指导.

However, some of the properties I am seeing (like 0xA, 0x22) are not in the enumerated list that Apple provides. Are these properties a combination of 2 or more enumerated values? Or are these custom properties from the manufacturer? Need guidance on this.

推荐答案

您可以在

代表特征可能特性的值.自从 特性可以组合,特性可以具有 设置了多个属性值.

Values representing the possible properties of a characteristic. Since characteristic properties can be combined, a characteristic may have multiple property values set.

换句话说,一个特性可能具有多个特性.例如,这具有合理的意义,即具有可以读取(CBCharacteristicPropertyRead)和写入(CBCharacteristicPropertyWrite)的特征.

In other words, a characteristic may have more than one property. That makes sense as you can, for example, have a characteristic which can be read (CBCharacteristicPropertyRead) and written to (CBCharacteristicPropertyWrite).

在这种情况下,CBCharacteristicproperties的值将是CBCharacteristicPropertyReadCBCharacteristicPropertyWrite的按位或,即0xA.

In this case the value of CBCharacteristic's properties would be the bitwise OR of CBCharacteristicPropertyRead and CBCharacteristicPropertyWrite, which is 0xA.

这篇关于解释特征属性(iOS和BLE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆