Hi Dialog,
I work with a 20-byte long characteristic through which I need to send a bunch of data (up to 280 bytes). So, my first assumption was to post as many notification messages as needed in the same function without waiting for anything, but it does not work...
My main constraint is to optimizz the throughput and then to send as many data as possible within a connection interval. So I imagine that I can put several notifications in the scheduler queue.
When I post a message ( prf_server_send_event(...) ), do I need to wait a callback before sending the next one (like gattc_cmp_evt_handler() )?
Thanks in advance.
Matt.
Hi. What exactly "does not work" when you send multiple messages at the same time?
We are also doing a similar thing. What happens for us is that the client eventually receives all messages, but everyone contains only the latest data, instead of the data stored in the db at the point in time when the notification request was sent, which is troublesome.
Hi,
"Does not work" means I have the same behaviour you are experiencing. Which is, after thought, consistent.
You notify/indicate only the newest value. So, if you modify 2 times the characteristic value before sending the notification/indication, the packet sent over the air will contain the last modified data.
When you take a look at the source code, you will see that you never specify the data when you post the dedicated message to the stack ( prf_server_send_event(...) ). So, the data will be extracted from the database you previously filled ( attmdb_att_set_value(...) ).
I now use gattc_cmp_evt_handler(...) to know when I can send the next notification. And it works.
Matt
Hi Matthiew ANTOINE
Does it means if I want to send more than one notify in a connect event, I must send a single notify and waiting the ack,and then send the second?
Hello SK Lin,
We have now a sample application and a document available for sending multiple packets during a connection interval,
Please have a look at:http://support.dialog-semiconductor.com/system/files/restricted/UM-B-030...
and in the SDK3.0.4 .\DA14580_SDK_3.0.4.0\dk_apps\keil_projects\throughput_eval
Kind regards
Dialog Support
Hi FVD_Dialog
Thanks for your answer.
我将在深度阅读文档。
Hello Guys,
Concerning the same problem. Where can i get the ACK of the sent packet?
Do you mean the "GATTC_INDICATE" case in gattc_cmp_evt_handler means that the packet has been sent over the air, or that the ACK on the sent packet has been received.
Thanks in advance