Other Parts Discussed in Thread: LAUNCHXL-CC2650
Hello,
I updated the SDK from v2.2.2 to v2.2.4 and found that GATT_PERMIT_AUTHEN_WRITE not permitted for RACP characteristic with passkey entry pairing.
It is totally working on v2.2.2 with same phone and same application.
1. RACP characteristic
// 9.Characteristic Declaration
{
{ ATT_BT_UUID_SIZE, characterUUID },
GATT_PERMIT_READ,
0,
&glucoseControlProps
},
// 10.Characteristic Value
{
{ ATT_BT_UUID_SIZE, recordControlPointUUID },
GATT_PERMIT_WRITE,
0x20, //0,
&glucoseControl
},
// 11.Characteristic Configuration
{
{ ATT_BT_UUID_SIZE, clientCharCfgUUID },
GATT_PERMIT_READ | GATT_PERMIT_WRITE
0x21, //0,
(uint8 *)&glucoseControlConfig
}
2. I change the permission for the "10.Characteristic Value" before advertising.
In case of passkey entry, it set as GATT_PERMIT_AUTHEN_WRITE.
if(pairMethod == PAIR_METHOD_PASSKEY || pairMethod == PAIR_METHOD_NUMERIC_COMP)
Glucose_Set_RACP_AUTHEN_Write_Mode(true);
else
Glucose_Set_RACP_AUTHEN_Write_Mode(false);
---------------------------------------------------------------------------
void Glucose_Set_RACP_AUTHEN_Write_Mode(bool mode)
{
if(mode==true)
glucoseAttrTbl[10].permissions=GATT_PERMIT_AUTHEN_WRITE;
else
glucoseAttrTbl[10].permissions=GATT_PERMIT_ENCRYPT_WRITE;
}
---------------------------------------------------------------------------
switch(pairMethod)
{
case PAIR_METHOD_PASSKEY:
pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
scMode = GAPBOND_SECURE_CONNECTION_ALLOW;
ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
mitm = TRUE;
bonding = TRUE;
break;
---------------------------------------------------------------------------
3. When our mobile application request write for the RACP Characteristic after bonded with passkey entry, it's not permitted like below.
This is a btsnoop log from android phone. I attached the log. Could you help me about this?
Thanks,
Calvin