This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Connection Interval

Hi everyone,

I'm new to working with Bluetooth/

My problem is that the connection interval time sent by the central device does not converge with the time I see using an oscilloscope or a configured timer for 1 ms.
The principle of operation of my program is that the peripheral device sleeps for a certain time and wakes up at a specified interval. The central device at this time is trying to connect to it. Using the timer, I count the time from when the device woke up to the time of the BLE_GAP_EVT_CONNECTED event and to the time of the BLE_GAP_EVT_CONN_PARAM_UPDATE event. The time difference between these events is about 600 ms. I can not understand why such a difference in time. Maybe I did not correctly understand the meaning of the parameters MIN_CONN_INTERVAL and MAX_CONN_INTERVAL? If so, then how can you reduce the time for a full connection, so that the BLE_GAP_EVT_CONN_PARAM_UPDATE event occurs as soon as possible.

To check what the actual value is transmitted by the central device, you can make a breakpoint during the execution of the program at the time of the BLE_GAP_EVT_CONN_PARAM_UPDATE event, which I actually did.

According to the received data, the central device set the value of the maximum and minimum interval of 7.5 ms.In the peripheral device, I have the following parameters:

MIN_CONN_INTERVAL    MSEC_TO_UNITS (7.5, UNIT_1_25_MS)

MAX_CONN_INTERVAL   MSEC_TO_UNITS (30, UNIT_1_25_MS)

SLAVE_LATENCY            1

CONN_SUP_TIMEOUT   MSEC_TO_UNITS (250, UNIT_10_MS)

I also read that the connection interval can vary from 7.5 ms to 4 s, maybe this value is the connection interval for my central device?

Chip: BT840F (analog nRF52840);

SDK: nRF5_SDK_15.2.0;

Softdevice: s132_nrf52_6.1.0_softdevice;

Phone: Xiaomi Redmi 5+.

Thanks in advance for your help.

Parents
  • Hi

    Is seems like you are missing the point here. If you want to reduce the time it takes from connection until you have transferred your data, you will need to enable notifications from the phone as soon as you connect. This has nothing to do with the connection parameters update. You should leave the connection parameter readings be, as this is not the reason you are seeing the delay in data transfer.

    Best regards,

    Simon

  • Hi

    I'm not sure if this is due to when notifications are enabled. After talking with his colleague, he says that he sends a request for notification as soon as the connection is established. In this case, I see the same delay (~ 800 ms) as your example, where I do not even send a request for notification.

    I also noticed this feature. I also used Xiaomi Redmi Note 6 Pro phones (with Bluetooth module 5.0) and Huawei P Smart (with Bluetooth module 4.2). The delay in applying Huawei is ~ 800 ms. Delay when using Xiaomi (with Bluetooth module 5.0) - ~ 1400 ms. Since the phone with Bluetooth module 5.0 I only have this model and other models don't have, then perhaps this is an isolated case. But if not, then module 5.0 has even more delay, with the fact that data transfer is faster.

    In my project it is very critical that so much time is spent on the connection, since Frequent falling asleep is expected. With such a time there will be a great expenditure of energy. The future device will be battery powered.

    Xiaomi Redmi 5+; project: ble_app_cscs; application on Android: nrf Connect.

    Xiaomi Redmi Note 6 Pro; project: ble_app_cscs; application on Android: nrf Connect.

Reply
  • Hi

    I'm not sure if this is due to when notifications are enabled. After talking with his colleague, he says that he sends a request for notification as soon as the connection is established. In this case, I see the same delay (~ 800 ms) as your example, where I do not even send a request for notification.

    I also noticed this feature. I also used Xiaomi Redmi Note 6 Pro phones (with Bluetooth module 5.0) and Huawei P Smart (with Bluetooth module 4.2). The delay in applying Huawei is ~ 800 ms. Delay when using Xiaomi (with Bluetooth module 5.0) - ~ 1400 ms. Since the phone with Bluetooth module 5.0 I only have this model and other models don't have, then perhaps this is an isolated case. But if not, then module 5.0 has even more delay, with the fact that data transfer is faster.

    In my project it is very critical that so much time is spent on the connection, since Frequent falling asleep is expected. With such a time there will be a great expenditure of energy. The future device will be battery powered.

    Xiaomi Redmi 5+; project: ble_app_cscs; application on Android: nrf Connect.

    Xiaomi Redmi Note 6 Pro; project: ble_app_cscs; application on Android: nrf Connect.

Children
No Data
Related