1
votes

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. Of course, only smaller data packets over a longer period like Temperature 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.

Sine & Spektrogram Image

Sine & Spektrogram Image

Further measurements show that the errors do not occur sequentially, they can always be found at different times. (The Fifo Implementation must be correct)

Sine & Spektrogram Image 2

Sine & Spektrogram Image 2

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 to send the data directly via L2CAP without GATT/ATT?
  • Are there any more wireless, low power protocols that allow data streaming? (So ​​with acknowledgment like TCP for completeness and chronological correctness)

Best regards, Emin

1
which version of BLE does your device use? - Šatov
You say that data packets are missing. From the figures it seems to me that some chunks of data are sent twice. Also, what is on the lower plot of the figures? - Šatov
What happens if you send all your data via advertisements? You can pack each 20 Bytes block into one advertisement and send them one after another. With your sniffer, you can check if in this case any of the data blocks is lost. If so, the origin is probably not the GATT/ATT layer. - Thern
@ricc BLE Spec. 4.1. Chip: EM9301. The lower plot is a spectrogram of the same plot. I don't think that packets are sent twice. If i repeat all my test exactly like before, my lost packets appear at different places/times. It also happens that my crc is calculated incorrectly, so th e packet is discarded. This can still lead to missing packets. - Mr. Rookie
@ricc My fifo is also so programmed (and tested) that an item can never be read again once it is marked as read. - Mr. Rookie

1 Answers

2
votes
  • What options are there for continuously sending data via the BLE interface?
  • Is it possible to send the data directly via L2CAP without GATT/ATT?

BLE v4.1 introduced LE Connection-Oriented Channels which is a way to send data directly via L2CAP without GATT/ATT (think about network sockets). See also Bluetooth Core Specification Vol. 3 Part A Section 3.4.

The board you are using has a EM9301 BLE chip which seems to support BLE v4.1. However, the mbed library you are using doesn't allow you to use them. See here, you have an interface for connect/disconnect callbacks and GATT characteristics read/write/notification. Nothing about LE Connection-Oriented Channel.