Hello everybody,
I'm just trying to send messages from the Arduino to an Android client via BLE. For this I use the library CurieBLE version 2.0.
To send as many packages as possible, I use notifications. The goal is to generate as much throughput as possible. However, the Arduino always disconnected after a few notifications, if the connection interval is greater than 12. What can be the reason and which class is responsible for the dissconnect?
The code:
BLEFloatCharacteristic valueCharacteristic("19B10000-E8F2-537E-4F6C-D104768A1216", BLERead | BLENotify);
while ((endtime - starttime) <= 5000) // do this loop for up to 1000mS
{
float sensorValue = analogRead(A0); //float = 4 byte
boolean succes = valueCharacteristic.setValue(sensorValue);
endtime = millis();
}