Hi,
First, I understand this are Android questions, but I want to appeal to this very knowledgeable community ;)
I have a BLE application using nrf51822 with SD 110 v7.
I am reading/writing/notifications using characteristics from an Android app successfully using as an example the nordic tools application for android.
I set the MIN_CONN_INTERVAL to 50ms and MAX_CONN_INTERVAL to 60 ms since I need a lot of interactivity from the android app to the nrf5822 app.
I have seen on the android stack that if I send several write characteristics (mConnectedGatt.writeCharacteristic(characteristic);) without waiting for the onCharacteristicWrite callback, the android stack will drop the writes in the middle even when they are without response.
If I wait for the callback, it works perfectly, but the roundtrip takes 110ms, even tough the connection is at 60ms.
I am receiving the notifications from another characteristic at 60ms, so that is working great. If I shut off this notifications I still have the 110ms lag in the write of the other characteristic.
The questions:
-
Why is the callback not returning immediately (after all it is a not reliable write) or at least after 60ms?
-
Who is dropping the packages if I do not wait for the callback? The stack? Am I just rewriting on the last command?
Thanks!