Hi,
I'm using the TI BLE Stack v1.3.1 running on the SmartRF05 eval board with the CC2540EM board attached. I started with the SimpleBLEPeripheral demo project but have since modified it to match my application's needs.
I am trying to dynamically add and remove services from the CC2540 (application level authentication is used to determine what services to register).
I've used the API functions GATTServApp_FindAttr(...) to get the handle of the service that I want to remove, and GATTServApp_DeregisterService(..) to remove it. The deregister function call seemed to work (returned success and BTool does not see the service that was removed when doing service and characteristic discovery).
What I'm not sure about is how to free the service attribute list returned from the call to GATTServApp_DeregisterService(...) - since the declaration of this API function says it is caller's responsibility to free the service attribute list. I passed in the address of a pointer to a gattAttribute_t structure and after the deregister function returns, it does point to the service's attribute table that was registered. But I'm pretty sure this returned pointer isn't the correct pointer that would be passed to osal_mem_free(...).
How do I free the returned attribute table?
Thanks in advance,
Mike