Part Number: CC2652R
I'm working with a customer who wants to stream data from a GATT server (peripheral) to a GATT client (central). It happens to be a DMM project with 15.4, but that is not very relevant to this discussion (at this time), other than the fact that some connection events will be missed, due to 15.4 communication having priority. The BLE connection parameters are intentionally chosen to deal with this fact.
We are presently using SDK 3.10, but will be eventually moving to SDK 4.20 or later.
I've setup a demo that streams data using indications. With indications "enabled":
- Server set the data stream characteristic.
- Indication is sent to client on next connection event.
- ATT_HANDLE_VALUE_IND is delivered to client.
- ATT_HandleValueCfm() is triggered.
- Clientl sends acknowledgement on next connection event.
- ATT_HANDLE_VALUE_CFM is delivered to server.
- Repeat from step 1.
By following this sequence, I can see in my example that an indication is sent on every other connection event, and an acknowledgment is sent on the connection events between those that carry the indications. This is the behavior I expect. The potential issue that I see is that only every other connection event sends any substantial data. Therefore, we are looking at ways to increase the amount of data that can be sent.
I've read through the following guide that provides some tips on increasing throughput: https://www.novelbits.io/bluetooth-5-speed-maximum-throughput/. I have some questions.
First off, my understanding is that both indications and notifications are acknowledged at the link layer (please confirm), and only indications actually deliver acknowledgments to the application layer. As long as the connection remains active, and there are successful connection events occurring, the server can make a reasonable assumption that notifications are making their way to the client.
- If multiple notifications (no application layer acknowledgement) are triggered by the server application does the order of reception on the client (ATT_HANDLE_VALUE_NOTI) get preserved in the presence of link layer retries?
- Can the return value of GATTServApp_ProcessCharCfg() be used on the server to determine if the server application needs to "back-off" so that previously queued notifications can be sent?
- Is there a way to notify the server application when a previously queued notification has actually been sent? The idea would be to limit the number of notifications that are "in flight" at any given time and preserve some BLE stack buffer bandwidth for other activities.
- Can more than one indication (different characteristics) be sent per connection event. I understand this to be possible with notifications on both the same and different characteristics because of the lack of application level acknowledgment (please confirm).
Thanks,
Stuart