Hello,
I have some questions to the use of the functions GATT_Indication() / GATT_Notification(): How are they supposed to be used? In the SimpleBLEPeripheral, they are only called, from a write operation to the CCCD of the characteristic. How are they to be used from a _not_ BLE context. Lets say I have a key and want to notify the key-pressed-state. From that context I do not have any connection, nor do I know if there is a device connected.
First parameter: connHandle - connection to use:
Do I have to get all connections on my own, iterate over all connections, check the corresponding CCCDs and than call GATT_Indication() / GATT_Notification() if the client is subscribed? How do to iterate over the connections?
Second parameter: pInd - pointer to indication to be sent:
The struct contains a pointer to uint8_t denoting the changed data. How am I'm supposed to tell the api the length of the data? Or is the pointer indeed a pointer to a struct containing data and length (or length and data)?
Sorry, but I can't find that information from the documentation (SW Developers Guide), nor from the function prototype documentation.
BTW: The BLE Software Developers Guide, is stating that a part of the second parameter to GATT_Indication() / GATT_Notification() have to be dynamically allocated. May we could have that part of the documentation in the header too?
Kind regards,
Torsten