BLE 4.2 Bandwidth test

4 posts / 0 new
Last post
Dheeraj
Offline
Last seen: 4 days 13 hours ago
Joined: 2016-07-19 21:30
BLE 4.2 Bandwidth test

Hello Team !!

I have a query to ask regarding Bluetooth 4.2 of DA14681.

Bluetooth 4.2 Bandwidth Test :
--------------------------------------------
* We are sending the bigger packets ( 247 bytes per packet ) data rate over the ble to android phone. We are getting 5.3KBytes/sec as per now , Can you please tell me what is the maximum bandwidth supported by DA14681. Please i need some more inputs to increase my bandwidth.

Device: 
SDK: 
MT_dialog
Online
Last seen: 3 min 23 sec ago
Staff
Joined: 2015-06-08 11:34
Hi Dheeraj,

Hi Dheeraj,

We are currently investigating this, there is no estimation for Android phones, i can mention that the maximum rate that we have achieved so far is about 80kB/s but both devices are 68x Dev Kit and not a phone, operating with an MTU of 247 and with data length extention feature, a connection interval of 30ms, a connection event length of 3.75ms and the 68x clocked in 96MHz. In the case of a different device android or iOS the expected throughput is expected to be much lower than that since the parameters that are crusial in achieving a high throughput are not acceptable by the Master of the connection, and this is still under investigation.

Regarding improving throughput on your system, the parameters that you can experiment with the length of the PDU, the MTU size and the connection interval that the current connection uses (smaller connections will definitely help the data throughput).

Thanks MT_dialog

jairo.borba
Offline
Last seen: 2 days 17 hours ago
Joined: 2017-07-15 01:27
Hi MT_dialog,

Hi MT_dialog,

We are currently sending audio stream to Android phones. The UART is set to 230kbps. (DA14681, CPU Clocked to 96MHz).
So the data comes from UART and then forwarded to Android through BLE4.2.

The best performance we could reach so far is 8K Bytes / sec. That is still low for our application.
We are using the following function to send 32KBytes of data to android:
ble_error_t ble_gatts_send_event(uint16_t conn_idx, uint16_t handle, gatt_event_t type,
uint16_t length, const void *value);

When calling that function in a loop (with bunches of 247 Bytes), the BLE disconnects after a few calls.

1. Is that function the proper one to send those 32K Bytes of data ?
2.Is that function asynchronous ? If so, Does the SDK provides a callback or some event to advice when it is ready send the next bunch of data ?

Regards !

MT_dialog
Online
Last seen: 3 min 23 sec ago
Staff
Joined: 2015-06-08 11:34
Hi jairo.borba,

Hi jairo.borba,

Yes, this is a proper function in order to send data over BLE via notifications or indications, but having this in a while loop and keep on sending notifications one after the other isn't such a good idea. Although i dont exactly get what you mean with the asynchronous, the function will just place the notification in a low layer buffer and send the data upon the next connection event. Yes the ble_gatts_send_event() returns an event when the notification has entered the events buffer and you should get a BLE_EVT_GATTS_EVENT_SENT message in the application layer. So you should always get the completion message and then place additional data in the buffer, if not the device will store the messages that do not enter the buffer, and eventually, when the allocated messages do not fit your allocated memory you will run out of heap and your f/w will assert.

Thanks MT_dialog