Tool/software: TI-RTOS
Hi everyone!
How to turn off the CCCD reset of the BLE disconnection?
I want to enable the default setting of the CCCD in the peripheral so that the center can transfer data without setting the CCCD.
I use project zero for test, the test target is : after connecting, if button 0 is pressed, central can receive button 0 data without setting CCCD.
I found gattServApp_ResetCharCfg() calls GATTServApp_InitCharCfg() after each disconnection.
I can't find and don't know how to modified the code of gattServApp_ResetCharCfg().
So I changed the code of GATTServApp_InitCharCfg() directly and got the test target.
void GATTServApp_InitCharCfg( uint16 connHandle, gattCharCfg_t *charCfgTbl ) { // Initialize Client Characteristic Configuration attributes if ( connHandle == INVALID_CONNHANDLE ) { uint8 i; for ( i = 0; i < linkDBNumConns; i++ ) { // charCfgTbl[i].connHandle = INVALID_CONNHANDLE; // charCfgTbl[i].value = GATT_CFG_NO_OPERATION; charCfgTbl[i].connHandle = 0; charCfgTbl[i].value = GATT_CLIENT_CFG_NOTIFY; } } // else // { // gattCharCfg_t *pItem = gattServApp_FindCharCfgItem( connHandle, charCfgTbl ); // if ( pItem != NULL ) // { // pItem->connHandle = INVALID_CONNHANDLE; // pItem->value = GATT_CFG_NO_OPERATION; // } // } }
Although it works fine, I just avoided the initialization problem.
(gattServApp_ResetCharCfg() is still working, but GATTServApp_InitCharCfg() is modified as above)
Is there a way to not modify GATTServApp_InitCharCfg() and close the reset?
Can I turn off or modify the code of gattServApp_ResetCharCfg()?