hi,各位大牛!
请问一下,在定义Profile Attributes的时候为什么把handle都设置为0,client发送数据的时候handle该如何确定。
/*********************************************************************
* Profile Attributes - Table
*/
static gattAttribute_t accelAttrTbl[SERVAPP_NUM_ATTR_SUPPORTED] =
{
// Accelerometer Service
{
{ ATT_BT_UUID_SIZE, primaryServiceUUID }, /* type */
GATT_PERMIT_READ, /* permissions */
0, /* handle */
(uint8 *)&accelService /* pValue */
},
// Accel Enabler Characteristic Declaration
{
{ ATT_BT_UUID_SIZE, characterUUID },
GATT_PERMIT_READ,
0,
&accelEnabledCharProps
},
.......
}
在Btools工具中,为什么Characteristic Read时需要填入Characteristic UUID,而Characteristic Write时需要填入Attribute Handle,该Attribute Handle怎么确定,在定义Profile Attributes时Handle都设为了0. Characteristic UUID和Attribute Handle都是标示属性的吗,两者有什么不同?