-
-
Notifications
You must be signed in to change notification settings - Fork 283
Description
Currently the connection interval is hard-coded in ble_client.c to a min value of 80ms and a max value of 150ms.
I have found by logging (via PacketLogger) and changing the min and max connection values in ble_client.c that the final interval that gets set seems to always match the max interval of 150ms. This means that the fastest a user can read an analog input or blink an LED for example is at an interval of 150ms which is a bit long.
Is there a specific reason that the connection interval range is set to 80ms - 150ms?
I've tried a much lower range [7.5ms - 30ms] and did not encounter any issues. This would enable me to read or write at a frequency of 30ms (since it seems MAX is always used). I understand this may be too fast (and thus consume too much battery) for some applications, but for others (if battery is less of an issue vs responsiveness of a physical UI) it makes sense to have a faster interval.
What would be ideal is for the user to be able to set the interval range. It could default to 80 / 150 as it currently does, but could be overridden. A set of absolute min / max would still need to be applied behind the scenes but it would at least enable the user to have a choice per their particular application.