This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello everyone,
I need to know how notification or indication is handled in simpleBLEcentral project. All I have found is this function, GATT_RegisterForInd( simpleBLETaskId ); // Register to receive incoming ATT Indications/Notifications. I have to make use of the data sent through notification.
Can anyone tell me how to access notification data?
Regards,
maharjanbk
Hi Nick,
Thank you for your prompt response.
I could see there is a value assignment statement uint8 valueRead = pMsg->msg.readRsp.value[0]; in the function you described. This is just one byte data but notifications could be several bytes long.
Just wanted to know your opinion, is it that if I am sending multiple byte notification, the size should be fixed and I need to keep track of bytes that I have received?
Please look into my I2C slave on cc2541 post also when you have time.
Regards,
maharjanbk
Hi,
So, you can check the length of the notification with pMsg->msg.handleValueNoti.len and access the data by pMsg->msg.handleValueNoti.value for example. Might be that looping through value[i] until i=len is you solution.
Best Regards
Hi Nick,
Thank you very much for the response. I will try out this suggestion.
Regards,
maharjanbk
hii...
can i register for single characteristic's notification..??? plz tell me which api shud i use??/