TwclGattClientConnection.SetConnectionParams(TwclBluetoothLeConnectionParametersType) Method

Request the connection parameters change to the specified preferred connection parameters.

Namespace: wclBluetooth
public
 function SetConnectionParams(
 const Params: TwclBluetoothLeConnectionParametersType): Integer; overload;

Parameters

Params
Type: TwclBluetoothLeConnectionParametersType

The preferred Bluetooth LE connection parameters type.

Return Value

Type: Integer

If the function succeed the return value is wclErrors.WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.

When performing firmware updates, higher throughput is necessary to complete the operation swiftly for the user. In those scenarios, you should request ppThroughputOptimized connection parameters for the duration of the firmware update. That will reduce the number of concurrent connections to other Bluetooth peripherals, and should be used sparingly.

Conversely, when connecting to multiple LE devices concurrently, you should use ppPowerOptimized. That will increase the acceptable peripheral latency for the connection, reducing the interval at which the LE device must respond to the host OS. That allows the local Bluetooth radio to schedule more connections concurrently, and reduces power usage on both the host OS and on the peripheral device.

If the connection parameters were changed successfully the OnConnectionParamsChanged even fires.

This feature is supported with BLED112 dongle and with Microsoft Bluetooth drivers on Windows 11 and above.