This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BLE Gatt Read Characteristic Slow Or Normal?

FormerMember
FormerMember

I am using read characteristic to read data from from a characteristic. The characteristics range from 2 bytes to 32 bytes in length. The time to read the data using IOS, Android or Linux, varies from 100ms to 400ms. Even for 2 bytes the timing is quite variable, 80ms to 350ms.

I guess this could be an issue at the receiver end or perhaps normal behaviour.

I have read around and it seems I should be able tune the timing using

sd_ble_gap_ppcp_set(....

And alter parameters such as

min_conn_interval max_conn_interval slave_latency conn_sup_timeout

I believe the minal connection time is limited to 7.5ms. I have tried various settings, without any significant change in performance.

I'm curious, is this kind of timing to be expected.

Parents
  • You could try to send some Connection Parameter Update requests with lower and lower parameters and see what your peer accepts. The numerous threads on DevZone about throughput should be mentioning the minimum connection parameters for various smart phone centrals, here is one of these. It mentions that the latest iOS (at that point) did not allow anything below 30ms, but there is an exception here for device that have a HID profile.

Reply
  • You could try to send some Connection Parameter Update requests with lower and lower parameters and see what your peer accepts. The numerous threads on DevZone about throughput should be mentioning the minimum connection parameters for various smart phone centrals, here is one of these. It mentions that the latest iOS (at that point) did not allow anything below 30ms, but there is an exception here for device that have a HID profile.

Children
  • FormerMember
    0 FormerMember in reply to Ulrich Myhre

    On the BLE_GAP_EVT_CONNECTED: I set the parameters using sd_ble_gap_conn_param_update. For experimental purposes, I used a min interval of 12ms and a max interval of 25 ms. The results were much better, however the reception time difference between packets varied from 16 to 38ms(Android).

    I tried 3 settings to match different sensor sample rates on the BLE device.

    40 Hz (20ms) 50 Hz (25ms) 100 Hz (10ms)

    Over a period of a minute or more, the reception rate at the Android end matched the sensor sample rate. To achieved the increased rates I simply reduced the connection interval. All in all satisfactory results. Over periods of 8 hours or more, the behavious remained the same.

Related