Tool/software: TI-RTOS
Hello,
I had successfully enabled Notification using multirole project.
Profile used : Serial port profile
Setup: Multirole acts as client and Simple ble server acts as peripheral
Procedure followed
1.) Discover the handle 0x2902 by traversing through the attribute table
2.) Write 0x0001 to this handle
I was able to receive the notification from the server in client side
Now to enable indication I followed following procedure
1.) Modified the following line to include indicate property
static uint8 SerialPortServiceDataProps = GATT_PROP_WRITE_NO_RSP | GATT_PROP_NOTIFY | GATT_PROP_READ | GATT_PROP_INDICATE;
2.) Write 0x0002 to the CCCFG handle and receive the indication messages as GATT MSG by providing the filter
ATT_HANDLE_VALUE_IND
3.) But I am not receiving any messages
Also at the server side I have made the following changes in SerialPortService_WriteAttrCB function
else if (pAttr->type.len == ATT_BT_UUID_SIZE )
{
// 16-bit UUID
uint16 uuid = BUILD_UINT16( pAttr->type.uuid[0], pAttr->type.uuid[1]);
switch ( uuid )
{
case GATT_CLIENT_CHAR_CFG_UUID:
status = GATTServApp_ProcessCCCWriteReq( connHandle, pAttr, pValue, len,
offset, GATT_CLIENT_CFG_INDICATE );
break;
default:
status = ATT_ERR_ATTR_NOT_FOUND;
break;
}
}
Can any one tell me the proper procedure to enable indication?