CUSTS1_VAL_NTF_REQ message duplicated

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
marss
Offline
Last seen:8 months 1 week ago
加入:2015-05-08 10:18
CUSTS1_VAL_NTF_REQ message duplicated

I've a problem if I send CUSTS1_VAL_NTF_REQ messages too fast. If I send e.g. 3 different messages (e.g. "A", "B" and "C") the SDK is sending 3 to the central, but the central receives often the following messages "B", "B", "C" or "B", "C", "C". I verified this with a sniffer, but the problem also is visible if I use android as a central or a Rasperry Pi. There is no assert thrown in the SDK or an error thrown on any function.

for(int32_t i = 0; i < 3; i++) {
// setup buffer ...
struct custs1_val_ntf_req *req = KE_MSG_ALLOC_DYN(CUSTS1_VAL_NTF_REQ, TASK_CUSTS1, TASK_APP, custs1_val_ntf_req, length);
req->conhdl = app_env->conhdl;
req->handle = CUST1_IDX_SERIAL_RX_VAL;
req->length = length;
memcpy(req->value, buffer, length);
ke_msg_send(req);
}

Device:
PM_Dialog
Offline
Last seen:1 day 21 hours ago
工作人员
加入:2018-02-08 11:03
Hi marss,

Hi marss,

你将不得不等待for the CUSTS1_VAL_NTF_CFM to arrive before sending the next notification for the same characteristic, if not you will update the value's database with the latter value and when the kernel pushes the notification into the buffer it will push two notifications with the same value, since the values of the notifications are acquired from the database. I suggest you to have a look at the following past thread:

https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/bytes-transfered

Thanks, PM_Dialog

marss
Offline
Last seen:8 months 1 week ago
加入:2015-05-08 10:18
Ok, thanks. Quite sad to have

Ok, thanks. Quite sad to have messages and than still add another layer to handle this case.