Bluetooth LE connection parameters module

Use the Bluetooth® LE connection parameters module for the following purposes:

  • Update the connection parameters after the peripheral discovery.

  • React on connection parameter update requests from the connected peripherals.

  • Increase Bluetooth connection interval for peripherals while USB is suspended to reduce power consumption.

Module Events

Source Module

Input Event

This Module

Output Event

Sink Module

Bluetooth LE discovery module

ble_discovery_complete_event

ble_conn_params

Bluetooth LE state module

ble_peer_conn_params_event

Bluetooth LE advertising module

ble_peer_event

Bluetooth LE state module

Source modules for module_state_event

module_state_event

USB state module

usb_state_event

module_state_event

Sink modules for module_state_event

Note

See the Overview: Firmware architecture for more information about the event-based communication in the nRF Desktop application and about how to read this table.

Configuration

The module requires the basic Bluetooth configuration, as described in Bluetooth in nRF Desktop. Make sure that both CONFIG_DESKTOP_ROLE_HID_DONGLE and CONFIG_DESKTOP_BT_CENTRAL options are enabled. The Bluetooth LE connection parameters module is enabled by the CONFIG_DESKTOP_BLE_CONN_PARAMS_ENABLE option. The option is implied by CONFIG_DESKTOP_BT_CENTRAL together with other features used by a HID dongle that forwards the HID reports received over Bluetooth LE.

Enable CONFIG_DESKTOP_BLE_USB_MANAGED_CI to manage Bluetooth connections’ parameters reacting on the USB state change. The connection intervals for all of the Bluetooth connected peripherals are set to CONFIG_DESKTOP_BLE_USB_MANAGED_CI_VALUE (100 ms by default) while USB is suspended. The connections’ peripheral latencies are set to 0. The connection parameter change is reverted when USB is active. The CONFIG_DESKTOP_BLE_USB_MANAGED_CI is enabled by default.

Implementation details

The Bluetooth LE connection parameters module receives the peripheral’s connection parameters update request as ble_peer_conn_params_event. The module updates only the connection latency. The connection interval and supervision timeout are not changed according to the peripheral’s request.

Note

On the peripheral side, the Bluetooth connection latency is controlled by Bluetooth LE latency module.

LLPM connections

The Low Latency Packet Mode (LLPM) connection parameters are not supported by the standard Bluetooth.

The LLPM connection parameters update requires using vendor-specific HCI commands. Moreover, the peripheral cannot request the LLPM connection parameters using Zephyr Bluetooth® API.

Connection interval update

After the Bluetooth LE discovery module completes the peripheral discovery, the Bluetooth LE connection parameters module updates the connection parameters in the following manner:

  • If the central and the connected peripheral both support the Low Latency Packet Mode (LLPM), the connection interval is set to 1 ms.

  • If neither the central nor the connected peripheral support LLPM, or if only one of them supports it, the interval is set to the following values:

    • 7.5 ms if LLPM is not supported by the central or CONFIG_BT_MAX_CONN is set to value of 1. This is the shortest interval allowed by the standard Bluetooth.

    • 10 ms otherwise. This is required to avoid Bluetooth Link Layer scheduling conflicts that could lead to HID report rate drop.