nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ sdc_hci_cmd_le_subrate_request()

uint8_t sdc_hci_cmd_le_subrate_request ( const sdc_hci_cmd_le_subrate_request_t * p_params)

#include <softdevice_controller/include/sdc_hci_cmd_le.h>

LE Subrate Request.

The description below is extracted from Core_v6.0, Vol 4, Part E, Section 7.8.124

The HCI_LE_Subrate_Request command is used by a Central or a Peripheral to request a change to the subrating factor and/or other parameters (see [Vol 6] Part B, Section 4.5.1) applied to an existing connection using the Connection Subrate Update procedure.

The Subrate_Min and Subrate_Max parameters specify the range of acceptable subrating factors being requested.

The Max_Latency parameter specifies the maximum Peripheral latency in units of subrated connection events. The same maximum shall apply irrespective of the subrating factor actually chosen.

The Continuation_Number parameter specifies the number of underlying connection intervals to remain active after a packet (other than an empty packet) is transmitted or received.

The Supervision_Timeout parameter specifies the link supervision timeout for the connection. The Supervision_Timeout, in milliseconds, shall be greater than 2 × current connection interval × Subrate_Max × (Max_Latency + 1).

If this command is issued on the Central, the following rules shall apply when the Controller initiates the Connection Subrate Update procedure (see [Vol 6] Part B, Section 5.1.19):

• The Peripheral latency shall be less than or equal to Max_Latency. • The subrate factor shall be between Subrate_Min and Subrate_Max. • The continuation number shall be equal to the lesser of Continuation_Number and (subrate factor - 1). • The connection supervision timeout shall be equal to Supervision_Timeout.

If this command is issued on the Central, it also sets the acceptable parameters for requests from the Peripheral (see [Vol 6] Part B, Section 5.1.20). The acceptable parameters set by this command override those provided via the HCI_LE_Set_Default_Subrate command or any values set by previous uses of this command on the same connection.

If this command is issued on the Central before the devices have performed the Feature Exchange procedure, then the Controller shall complete that procedure before initiating the Connection Subrate Update procedure.

If this command is issued on the Peripheral, the following rules shall apply when the Controller initiates the Connection Subrate Request procedure:

• The Peripheral latency shall be less than or equal to Max_Latency. • The minimum and maximum subrate factors shall be between Subrate_Min and Subrate_Max. • The continuation number shall be equal to the lesser of Continuation_Number and (maximum subrate factor - 1). • The connection supervision timeout shall be equal to Supervision_Timeout.

If the Connection_Handle parameter does not identify a current ACL connection, the Controller shall return the error code Unknown Connection Identifier (0x02).

If the Host issues this command with parameters such that Subrate_Max × (Max_Latency + 1) is greater than 500 or the current connection interval × Subrate_Max × (Max_Latency + 1) is greater than or equal to half the Supervision_Timeout parameter, the Controller shall return the error code Invalid HCI Command Parameters (0x12).

If the Host issues this command with Subrate_Max less than Subrate_Min, the Controller shall return the error code Invalid HCI Command Parameters (0x12).

If the Host issues this command with Continuation_Number greater than or equal to Subrate_Max, then the Controller shall return the error code Invalid HCI Command Parameters (0x12).

If the Central's Host issues this command when the Connection Subrating (Host Support) bit is not set in the Peripheral's FeatureSet, the Controller shall return the error code Unsupported Remote Feature (0x1A).

Event(s) generated (unless masked away): When the Controller receives the HCI_LE_Subrate_Request command, the Controller sends the HCI_Command_Status event to the Host. An HCI_LE_Subrate_Change event shall be generated when the Connection Subrate Update procedure has completed.

Parameters
[in]p_paramsInput parameters.
Return values
0if success.
Returns
Returns value between 0x01-0xFF in case of error. See Vol 2, Part D, Error for a list of error codes and descriptions.