nrfxlib API 0.1.0
Loading...
Searching...
No Matches

◆ sdc_hci_cmd_le_set_cig_params()

uint8_t sdc_hci_cmd_le_set_cig_params ( const sdc_hci_cmd_le_set_cig_params_t p_params,
sdc_hci_cmd_le_set_cig_params_return_t p_return 
)

#include <softdevice_controller/include/sdc_hci_cmd_le.h>

LE Set CIG Parameters.

The description below is extracted from Core_v5.4, Vol 4, Part E, Section 7.8.97

The HCI_LE_Set_CIG_Parameters command is used by a Central'’s Host to create a CIG and to set the parameters of one or more CISes that are associated with a CIG in the Controller.

The CIG_ID parameter identifies a CIG. This parameter is allocated by the Central's Host and passed to the Peripheral's Host through the Link Layers during the process of creating a CIS. If the CIG_ID does not exist, then the Controller shall first create a new CIG. Once the CIG is created (whether through this command or previously), the Controller shall modify or add CIS configurations in the CIG that is identified by the CIG_ID and update all the parameters that apply to the CIG.

The SDU_Interval_C_To_P parameter specifies the time interval between the start of consecutive SDUs from the Central's Host for all the CISes in the CIG. This parameter shall be ignored for all CISes that are unidirectional from Peripheral to Central.

The SDU_Interval_P_To_C parameter specifies the time interval between the start of consecutive SDUs from the Peripheral's Host for all the CISes in the CIG. This parameter shall be ignored for all CISes that are unidirectional from Central to Peripheral. The Worst_Case_SCA parameter shall be the worst-case sleep clock accuracy of all the Peripherals that will participate in the CIG. The Host should get the sleep clock accuracy from all the Peripherals before issuing this command. If the Host cannot get the sleep clock accuracy from all the Peripherals, it shall set the Worst_Case_SCA parameter to zero.

Note: The Worst_Case_SCA parameter can be used by the Link Layer to better allow for clock drift when scheduling the CISes in the CIG. For example, if a CIS has more than two subevents, the Link Layer of the Central can set the timing of the subevents such that the worst case drift in the Peripheral's clock will not exceed 2 × Sub_Interval. This prevents the Peripheral from synchronizing its timing to the wrong subevent (adjacent subevents cannot be on the same channel).

The Packing parameter indicates the preferred method of arranging subevents of multiple CISes. The subevents can be arranged in Sequential or Interleaved arrangement (see [Vol 6] Part B, Section 4.5.14.2). This is a recommendation to the Controller which the Controller may ignore. This parameter shall be ignored when there is only one CIS in the CIG.

The Framing parameter indicates the format of the CIS Data PDUs of the specified CISes. If the Framing parameter is set to 1 then the CIS Data PDUs of the specified CISes shall be framed. If the Framing parameter is set to 0 the CIS Data PDUs of a given CIS may be either unframed or framed (determined separately for each specified CIS) (see [Vol 6] Part G, Section 1).

The Max_Transport_Latency_C_To_P parameter contains the maximum transport latency from the Central to the Peripheral, in milliseconds, as described in [Vol 6] Part G, Section 3.2.1 and [Vol 6] Part G, Section 3.2.2. This parameter shall be ignored for all CISes that are unidirectional from Peripheral to Central.

The Max_Transport_Latency_P_To_C parameter contains the maximum transport latency from the Peripheral to the Central, in milliseconds, as described in [Vol 6] Part G, Section 3.2.1 and [Vol 6] Part G, Section 3.2.2. This parameter shall be ignored for all CISes that are unidirectional from Central to Peripheral.

The CIS_Count parameter indicates the number of CIS configurations being modified or added by this command. The Controller shall set the CIS_Count return parameter equal to this.

The CIS_ID[i] parameter identifies a CIS and is set by the Central’s Host and passed to the Peripheral’s Host through the Link Layers during the process of establishing a CIS.

The Max_SDU_C_To_P[i] parameter identifies the maximum size of an SDU from the Central’s Host. If the CIS is unidirectional from Peripheral to Central, this parameter shall be set to 0. If a CIS configuration that is being modified has a data path set in the Central to Peripheral direction and the Host has specified that Max_SDU_C_To_P[i] shall be set to zero, the Controller shall return the error code Command Disallowed (0x0C).

The Max_SDU_P_To_C[i] parameter identifies the maximum size of an SDU from the Peripheral's Host. If the CIS is unidirectional from Central to Peripheral, this parameter shall be set to 0. If a CIS configuration that is being modified has a data path set in the Peripheral to Central direction and the Host has specified that Max_SDU_P_To_C[i] shall be set to zero, the Controller shall return the error code Command Disallowed (0x0C).

The PHY_C_To_P[i] parameter identifies which PHY to use for transmission from the Central to the Peripheral. The Host shall set at least one bit in this parameter and the Controller shall pick a PHY from the bits that are set.

The PHY_P_To_C[i] parameter identifies which PHY to use for transmission from the Peripheral to the Central. The Host shall set at least one bit in this parameter and the Controller shall pick a PHY from the bits that are set.

The RTN_C_To_P[i] (Retransmission Number) parameter contains the number of times that a CIS Data PDU should be retransmitted from the Central to Peripheral before being acknowledged or flushed (irrespective of which CIS events the retransmission opportunities occur in). If the CIS is unidirectional from Peripheral to Central, this parameter shall be ignored. Otherwise, this parameter is a recommendation to the Controller which the Controller may ignore.

The RTN_P_To_C[i] parameter contains the number of times that a CIS Data PDU should be retransmitted from the Peripheral to Central before being acknowledged or flushed (irrespective of which CIS events the retransmission opportunities occur in). If the CIS is unidirectional from Central to Peripheral, this parameter shall be ignored. Otherwise, this parameter is a recommendation to the Controller which the Controller may ignore.

In each direction, if the Controller satisfies the recommendation, then every PDU will have at least RTN+1 opportunities for transmission (assuming that the initial transmission of that PDU happens at the earliest allowed subevent). The RTN value indicates that the Host is recommending that the Controller selects a combination of CIS parameters that satisfy the inequality:

NSE * FT - NSE ÷ BN * ( BN - 1 ) ≥ RTN + 1

If the Status return parameter is non-zero, then the state of the CIG and its CIS configurations shall not be changed by the command. If the CIG did not already exist, it shall not be created.

If the Status return parameter is zero, then the Controller shall set the Connection_Handle arrayed return parameter to the connection handle(s) corresponding to the CIS configurations specified in the CIS_IDs command parameter, in the same order. If the same CIS_ID is being reconfigured, the same connection handle shall be returned. The connection handle of a CIS shall refer to the CIS when it exists and to the configuration of the CIS stored in a CIG when the CIG exists but the CIS with that CIS_ID does not.

If the Host issues this command when the CIG is not in the configurable state, the Controller shall return the error code Command Disallowed (0x0C).

If the Host attempts to create a CIG or set parameters that exceed the maximum supported resources in the Controller, the Controller shall return the error code Memory Capacity Exceeded (0x07).

If the Host attempts to set CIS parameters that exceed the maximum supported connections in the Controller, the Controller shall return the error code Connection Limit Exceeded (0x09).

If the Host sets, in the PHY_C_To_P[i] or PHY_P_To_C[i] parameters, a bit for a PHY that the Controller does not support, including a bit that is reserved for future use, the Controller shall return the error code Unsupported Feature or Parameter Value (0x11).

If the Controller does not support asymmetric PHYs and the Host sets PHY_C_To_P[i] to a different value than PHY_P_To_C[i], the Controller shall return the error code Unsupported Feature or Parameter Value (0x11).

If the Host specifies an invalid combination of CIS parameters, the Controller shall return the error code Invalid HCI Command Parameters (0x12) or the error code Unsupported Feature or Parameter Value (0x11); it should return the error code Invalid HCI Command Parameters (0x12).

Event(s) generated (unless masked away): When the HCI_LE_Set_CIG_Parameters command has completed, an HCI_Command_Complete event shall be generated.

Parameters
[in]p_paramsInput parameters.
[out]p_returnExtra return 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.