Part Number: LAUNCHXL-CC2650
Hi!
I have a ProjectZero-based application. Actually, I'm receiving BLE data by means of 'ProjectZero_taskFxn'. When that happens, I wake-up another task ('task_B') using an event, I process some data and I need to send the result of this process by BLE to the device of which I previously received the first data, which remains connected.
Originally, I tried to 'send' the data from 'task_B' to 'ProjectZero_taskFxn', and from the last one send the data to the BLE device using the function 'DataService_SetParameter(DS_STRING_ID,<sizeOfData>,<ptrToData>). This approach doesn't work for me. I had problems to use properly communication and synchronization mechanisms between tasks. 'task_B' only has to be executed when it is signaled from 'ProjectZero_taskFxn' and after executing once it must be blocked until it is signaled again by 'ProjectZero_taskFxn'. Therefore, what I intend to do is:
while(1){
/* Wait for the event */
events = Event_pend(myEvent, Event_Id_NONE,Event_Id_00,BIOS_WAIT_FOREVER);
/* Process all the events that have occurred */
if (events & Event_Id_00) {
//Do my stuff here
DataService_SetParameter(DS_STRING_ID, sizeof(stringToSendByBLE), stringToSendByBLE);
}
}
My question is what should I do in order to be able to use DataService_SetParameter() function in 'task_B' using the same BLE Stack instantiated in 'ProjectZero_taskFxn'??
I was reading swru393d.pdf and Bluetooth Low Energy Protocol Stack User Guide, but I'm confuse about ICall, GAP and GATT service.
I would appreciate your help!