Skip to main content
gocchan
Associate III
August 17, 2026
Solved

BLE Default Connection Interval

  • August 17, 2026
  • 6 replies
  • 117 views

I'm developing with an STM32WBA2.
I want to communicate via Bluetooth every 10ms, but where in the source code should I modify the default connection interval?
I couldn't find a relevant item in CubeMX's STM32_WPAN.

Best answer by Dominique FOLLEZOUR

Hi

The connection interval is passed indeed in the create connection procedure which is invoked by the client. 

 

However, at peripheral side you can negotiate back this interval thanks to dedicated API

 

aci_l2cap_connection_parameter_update_req( connection_handle, min_interval, max_interval, slave_latency, supervision_timeout );

 

Here once connection is complete ,you can invoke this procedure with

  • the received connection_handle part of the hci_connection_complete event)
  • min_interval = max_interval = 0x08 = 10ms
  • slave_latency = 0
  • supervision_timeout = 0xC8  (so 2 secs = that’s mean if for some reasons device are no physically no more connected due to range constraints , application will receive disconnect information after 2secs)

 

To play and understand a bit more the BLE concepts, I would recommend playing with STM32CubeWise Bluetooth LE Explorer. You will find instructions how to in this webinar Online workshop: Design power and cost-efficient wireless applications with the new STM32WBA2 MCU - STMicroelectronics

Let us know.

Br

Dom

6 replies

ST Technical Moderator
August 17, 2026

Hello ​@gocchan ,

The default connection interval is defined in app_conf.h.

This ST wiki will help you to define the BLE general parameters: STM32WBA Bluetooth® Low Energy – Power consumption applications - stm32mcu

 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
gocchan
gocchanAuthor
Associate III
August 18, 2026

Hello ​@Imen.D ,

Thank you for your comment.
I checked app_conf.h but couldn't find a definition related to the connection interval (I've attached the file).
I also checked the STM32_WPAN file but couldn't find the symbol CONN_INT (I've attached this as well).
The project I'm currently developing was created using CubeMX 6.18.0 with STM32WBA23KEU7 specified in the MCU/MPU Selector. The CubeIDE version is 2.2.0.
 

 

Visitor II
August 18, 2026

Hi @gocchan, since app_conf.h doesn't have it for STM32WBA, try looking in app_ble.c instead — the connection interval min/max is usually passed as a parameter when the connection request is made (e.g. in the aci_gap_create_connection or hci_le_create_connection call), not defined as a standalone macro. Search for "conn_interval" or "Conn_Interval_Min/Max" in that file. For 10ms you'd want both min and max set to 0x0008 (8 × 1.25ms = 10ms).

Andrew Neil
Super User
August 18, 2026

the connection interval min/max is usually passed as a parameter when the connection request is made

@gocchan Note that this is just a request: there is no guarantee that the Cenrtal will give a particular value - especially if it’s a phone/tablet or similar ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Dominique FOLLEZOUR
ST Employee
August 21, 2026

Hi

The connection interval is passed indeed in the create connection procedure which is invoked by the client. 

 

However, at peripheral side you can negotiate back this interval thanks to dedicated API

 

aci_l2cap_connection_parameter_update_req( connection_handle, min_interval, max_interval, slave_latency, supervision_timeout );

 

Here once connection is complete ,you can invoke this procedure with

  • the received connection_handle part of the hci_connection_complete event)
  • min_interval = max_interval = 0x08 = 10ms
  • slave_latency = 0
  • supervision_timeout = 0xC8  (so 2 secs = that’s mean if for some reasons device are no physically no more connected due to range constraints , application will receive disconnect information after 2secs)

 

To play and understand a bit more the BLE concepts, I would recommend playing with STM32CubeWise Bluetooth LE Explorer. You will find instructions how to in this webinar Online workshop: Design power and cost-efficient wireless applications with the new STM32WBA2 MCU - STMicroelectronics

Let us know.

Br

Dom

gocchan
gocchanAuthor
Associate III
August 25, 2026

We were able to update the connection interval by calling aci_l2cap_connection_parameter_update_req when a connection event was notified.

Thank you.