How best to implement bulk data transport

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
legic_1490776
Level 5
Level 5
25 likes received 10 likes received First like received

For our application we want to be able to download a larger amount of data from the tag upon request (>>22 bytes).

Is there a suggested best approach to doing this?

We're looking at designing the protocol based on the tag sending 4 notifications per connection event, with acks returned in a writable characteristic.

For this purpose it would be great to be gain more insight on how notifications work within the stack.

How large is the queue of unsent notifications in the stack?  Is there any way to find out how many unsent notifications are currently pending?  What happens if there is no room in the queue?


Is there any way to receive a callback to trigger after a notify is sent?

Is there any way to receive a callback when a connection event is over?


0 Likes
1 Solution

> Any idea whether there's a callback after a connection interval completes?

Not in SDK 1.1.0. There is an optional API available with SDK 2.0 where you can register a callback that will be invoked either right before or right after the connection event. However, this is not available in SDK 1.1.0.

> In that case we might be able to queue up 4 more notify packets so they are ready to go on the next interval.

When a slave, there is no guarantee that the master will poll multiple times in a connection interval, even when the MD bit in the header of the notification packet is set because the master could have other tasks (scans/advertisements/other connections - classic or low energy). So the best way is to check with the stack using blecm_getAvailableTxBuffers().

> However perhaps the example from the 2.0 SDK might still work if it does not rely on new API calls.

Yes, you should be able to port most of the speed_test sample app to SDK 1.1.0, except the part where it stuffs the notifications with using ulp_getRand(), which is not available in SDK 1.1.0. But you should be able to generate some other sequence of data in its place.

View solution in original post

6 Replies