Discussion:
[Shimmer-users] Bluetooth communication slow in combination with android
Simon Schwan
2014-01-27 12:33:43 UTC
Permalink
Hello,

For my bachelor thesis I am developing an Android-App which communicates with the shimmer sensors over bluetooth.
Therefore I need to send the electrocardiographic data from the sensor to the smartphone. Because I do some other calculations at the sensor I am not using an example from the contrib even though i implementations is about the same. One packet contains 8 byte (the two leads from the sensor, two extra byte and a 16bit checksum).

A big difference to the AccelECG example is, that the data has to pass through another module, which gives the data to the bluetooth module. The Bluetooth module has two buffers which will be consecutively filled and send. A buffer can contain several ecg data packets and will send the data as soon as the other buffer was sent.

I am experiencing the problem that the sending seems to be too slow at higher ecg sensor frequencies. It is well working with 100Hz but everything fast the buffer will fill up because the data of the other buffer hasn’t sent already. The Shimmer sensors is not doing any other calculations during sending.

Another weird behavior I have seen is that the android app has to read the data from the input stream in the same clock pulsing as the sensors frequencies. Which means the app has to wait for 10ms (at 100Hz) before calling read at the input stream. Otherwise there will be a lot of corrupt packages received.

Does anyone had the same or a quite similar problem? Does anyone know what I am doing wrong here?

I appreciate your help!

Thank you
Simon

Loading...