static gattAttribute_t customTransmitProfileAttrTbl[CUSTOMTRANSMIT_NUM_ATTR_SUPPORTED] = {// CustomTransmit Profile Service{{ ATT_BT_UUID_SIZE, primaryServiceUUID }, /* type */GATT_PERMIT_READ,/* permissions */0,/* handle */(uint8 *)&customTransmitProfileService/* pValue */},// Characteristic 1 Declaration{{ ATT_BT_UUID_SIZE, characterUUID },GATT_PERMIT_READ,0,&customTransmitProfileChar1Props},// Characteristic Value 1{{ ATT_BT_UUID_SIZE, customTransmitProfilechar1UUID },GATT_PERMIT_READ | GATT_PERMIT_WRITE,0,customTransmitProfileChar1},// Characteristic 1 configuration{{ ATT_BT_UUID_SIZE, clientCharCfgUUID },GATT_PERMIT_READ | GATT_PERMIT_WRITE,0,(uint8 *)&customTransmitProfileChar1Config},// Characteristic 1 User Description{{ ATT_BT_UUID_SIZE, charUserDescUUID },GATT_PERMIT_READ,0,customTransmitProfileChar1UserDesp}, };
如上是我的service声明,在ios的lightblue上看到的属性只有read和write,没有notify,请问怎样才能在lightblue上看到notify权限呢?
另外write怎样才是write no response?
geniusgogo:
另外我还看到属于权限有两套宏定义,请问这两套宏定义有什么区别和关系?
#define GATT_PROP_BCAST0x01 //!< Permits broadcasts of the Characteristic Value #define GATT_PROP_READ0x02 //!< Permits reads of the Characteristic Value #define GATT_PROP_WRITE_NO_RSP0x04 //!< Permits writes of the Characteristic Value without response #define GATT_PROP_WRITE0x08 //!< Permits writes of the Characteristic Value with response #define GATT_PROP_NOTIFY0x10 //!< Permits notifications of a Characteristic Value without acknowledgement #define GATT_PROP_INDICATE0x20 //!< Permits indications of a Characteristic Value with acknowledgement #define GATT_PROP_AUTHEN0x40 //!< Permits signed writes to the Characteristic Value #define GATT_PROP_EXTENDED0x80 //!< Additional characteristic properties are defined in the Characteristic Extended Properties Descriptor#define GATT_PERMIT_READ0x01 //!< Attribute is Readable #define GATT_PERMIT_WRITE0x02 //!< Attribute is Writable #define GATT_PERMIT_AUTHEN_READ0x04 //!< Read requires Authentication #define GATT_PERMIT_AUTHEN_WRITE0x08 //!< Write requires Authentication #define GATT_PERMIT_AUTHOR_READ0x10 //!< Read requires Authorization #define GATT_PERMIT_AUTHOR_WRITE0x20 //!< Write requires Authorization #define GATT_PERMIT_ENCRYPT_READ0x40 //!< Read requires Encryption #define GATT_PERMIT_ENCRYPT_WRITE0x80 //!< Write requires Encryption
geniusgogo:
回复 甜甜的大香瓜:
谢谢香瓜的回复,已经搞明白了,谢谢!
user5986839:
回复 甜甜的大香瓜:
GATT_PROP_AUTHEN权限的作用是什么?