蓝牙协议栈中具有通知功能的特征值4的值是一个字节吗?可以是更多字节吗?怎么改?
我尝试修改,但不能实现:
static uint8 simpleProfileChar4[SIMPLEPROFILE_CHAR4_LEN] = {0, 0};
// Characteristic Value 4
{
{ ATT_BT_UUID_SIZE, simpleProfilechar4UUID },
0,
0,
simpleProfileChar4
},
bStatus_t SimpleProfile_SetParameter( uint8 param, uint8 len, void *value )设置参数中进行如下修改
case SIMPLEPROFILE_CHAR4:
if ( len == SIMPLEPROFILE_CHAR4_LEN )
{
VOID osal_memcpy( simpleProfileChar4, value, SIMPLEPROFILE_CHAR4_LEN );
// See if Notification has been enabled
GATTServApp_ProcessCharCfg( simpleProfileChar4Config, simpleProfileChar4, FALSE,
simpleProfileAttrTbl, GATT_NUM_ATTRS( simpleProfileAttrTbl ),
INVALID_TASK_ID );
}
newValue[0] = 0x01;
newValue[1] = 0x02;
SimpleProfile_SetParameter( SIMPLEPROFILE_CHAR4, SIMPLEPROFILE_CHAR4_LEN, newValue);
但特征值4通知时主机只能收到0x01一个字节,请问特征值可以进行两个字节吗?
亲,最多可以写20个字节,好好查看一下程序吧,肯定是配置的问题
祝你好运!