Bluetooth Low Energy (a.k.a Bluetooth LE, BTLE, Bluetooth Smart)

Data Streaming via BLE

12 Nov 2017

Hello Community,

I am currently evaluating the board of Maxim Integrated MAXREFDES100#. As part of my thesis, I would like to examine whether there is the possibility of using BLE for data streaming.

The supplied software is fully functional and can already transfer data:

Import programHSP_RPC_GUI

MAX32620HSP (MAXREFDES100) RPC Example for Graphical User Interface

Of course, only smaller data packets over a longer period like Temperatur or precalculated Heart Rate values. I am aware that BLE is not suitable and has not been designed to transmit data continuously. Nevertheless, I would like to try to transfer the ECG raw data also via the BLE interface. So that I can check whether my data has been arrived completely and correctly in time (prerequisite for ECG data), I have developed the following test setup:

Currently, I store data of a sine wave to a large FIFO and transfer 20-byte sine packets to a characteristic. So far everything works wonderfully. Using an Android device and a BLE sniffer I catch the data packets and check if the sine has any interruptions. The following graphic is taken from a longer measurement: (I have tested my FIFO and the sine datas are complete without any inerruption): This is a capture of my Android and my BLE Sniffer: Data packets are missing.


Further measurements show that the errors do not occur sequentially, they can always be found at different times.


Since my phone and my Adafruit BLE sniffer have identical errors in the same place, the data packages on the board-side must be corrupt. I suspect they are lost at some protocol level (GAP maybe?). Interestingly, errors affect at least 200 following bytes (256 bytes data are a complete sine). This means that at least 10 data packets each 20 Bytes would have to be in order to get such a graphic.

- What options are there for continuously sending data via the BLE interface? - Is it possible with the BLE_API to send the data directly via L2CAP without GATT/ATT? - Are there any more protocoll-levels that allow data streaming? (So ​​with acknowledgment like TCP for completeness and chronological correctness)

Excuse my bad English and best regards, Emin

30 Nov 2017

Hello, I also tried to send "a lots" of data like you using GATT notifications.

The most important thing is the connection interval of the BLE connection between your Android device and the Embedded device. connection interval can be set between 7.5 ms and 4 s. If you want the best performance you must set it as low as possible (so 7.5 ms. But on IOS you can't set it under 20ms from what i've read))

To do this, once connected, call this function:


void updateConnectionParams()
    BLE &ble = BLE::Instance();
    if (ble.getGapState().connected) {
        gap_params.connectionSupervisionTimeout = 500;
        gap_params.minConnectionInterval = 6; // It is unit of 1.25 ms
        gap_params.maxConnectionInterval = 6;
        gap_params.slaveLatency = 0;

        LOG("Request a connection params update!\n");
        if (, &gap_params) != BLE_ERROR_NONE) {
            LOG("Error sending the request!\n");

Hope this help ;)