![]() |
nrfxlib API 3.3.99
|
| 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_v6.3, Vol 4, Part E, Section 7.8.97
This 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' framing mode (see [Vol 6] Part G, Section 2) that the Host is requesting for the CIG. The Controller may use any framing mode permitted by [Vol 6] Part G, Table 2.1 but shall set the framing mode of all the CISes in the CIG to the same mode. This overrides any framing mode previously set for the CIG.
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. 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.
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 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 Status is zero, then the Controller shall set each Connection_Handle[i] to the connection handle corresponding to the CIS configuration specified in CIS_ID[i]. 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.
Errors:
See Section 4.5.2 for a list of error types and descriptions.
Type Condition Error code
MC A CIS configuration that is being modified has a Command Disallowed (0x0C)
data path set in the Central to Peripheral
direction and Max_SDU_C_To_P[i] is zero.
MC A CIS configuration that is being modified has a Command Disallowed (0x0C)
data path set in the Peripheral to Central
direction and Max_SDU_P_To_C[i] is zero.
MC The CIG is not in the configurable state. Command Disallowed (0x0C)
MC The resulting configuration would exceed the Memory Capacity Exceeded (0x07)
maximum supported resources in the Controller.
MC The resulting configuration would exceed the Connection Limit Exceeded (0x09)
maximum supported connections in the Controller.
MC In PHY_C_To_P[i] or PHY_P_To_C[i], a bit is set Unsupported Feature or Parameter
for a PHY that the Controller does not support, Value (0x11)
including a bit that is reserved for future use.
MC The Controller does not support asymmetric PHYs Unsupported Feature or Parameter
and PHY_C_To_P[i] is set to a different value than Value (0x11)
PHY_P_To_C[i].
MC The Host specifies an invalid combination of CIS Invalid HCI Command Parameters
parameters. (0x12) (recommended) OR Unsupported
Feature or Parameter Value (0x11)
Event(s) generated (unless masked away):
When the HCI_LE_Set_CIG_Parameters command has completed, an HCI_Command_Complete event shall be generated.
| [in] | p_params | Input parameters. |
| [out] | p_return | Extra return parameters. |
| 0 | if success. |