nrfxlib API 2.8.99
|
uint8_t sdc_hci_cmd_le_ext_create_conn_v2 | ( | const sdc_hci_cmd_le_ext_create_conn_v2_t * | p_params | ) |
#include <softdevice_controller/include/sdc_hci_cmd_le.h>
LE Extended Create Connection [v2].
The description below is extracted from Core_v6.0, Vol 4, Part E, Section 7.8.66
The HCI_LE_Extended_Create_Connection command is used to create an ACL connection, with the local device in the Central role, to a connectable advertiser. The command is also used to create an ACL connection between a periodic advertiser and a synchronized device.
If a connection is created with the local device in the Peripheral role while this command is pending, then this command remains pending.
The Advertising_Handle parameter is used to identify the periodic advertising train.
The Subevent parameter is used to identify the subevent where a connection request shall be initiated from a periodic advertising train. The Host may use this subevent whether or not the Controller has requested data for it using the HCI_LE_Periodic_Advertising_Subevent_Data_Request event.
The Advertising_Handle and Subevent parameters shall be set to 0xFF if these parameters are not used. If the Host sets one but not both of these to 0xFF, then the Controller shall return an error which should use the error code Invalid HCI Command Parameters (0x12).
If the Advertising_Handle and Subevent parameters are set to values other than 0xFF, then the Initiator_Filter_Policy, Scan_Interval[i], and Scan_Window[i] parameters shall be ignored.
The Initiator_Filter_Policy parameter is used to determine whether the Filter Accept List is used and whether to process decision PDUs and other advertising PDUs. If the Filter Accept List is not used, the Peer_Address_Type and the Peer_Address parameters specify the address type and address of the advertising device to connect to for advertisements not using decision PDUs. If Initiator_Filter_Policy is set to 0x03, then devices on the Filter Accept List shall still be processed using the decision instructions (see Section 7.8.145).
The Own_Address_Type parameter indicates the type of address being used in the connection request packets.
The Peer_Address_Type parameter indicates the type of address used in the connectable advertisement sent by the peer.
The Peer_Address parameter indicates the Peer’s Public Device Address, Random (static) Device Address, Non-Resolvable Private Address, or Resolvable Private Address depending on the Peer_Address_Type parameter.
The Initiating_PHYs parameter indicates the PHY(s) on which the advertising packets should be received on the primary advertising physical channel and the PHYs for which connection parameters have been specified. The Host may enable one or more initiating PHYs. If the Host specifies a PHY that is not supported by the Controller, including a bit that is reserved for future use, the latter should return the error code Unsupported Feature or Parameter Value (0x11). If the Host sets Advertising_Handle to a value other than 0xFF and does not include the PHY used for the specified periodic advertising train in Initiating_PHYs, the Controller shall return an error which should use the error code Invalid HCI Command Parameters (0x12). The array elements of the arrayed parameters are ordered in the same order as the set bits in the Initiating_PHYs parameter, starting from bit 0. The number of array elements is determined by the number of bits set in the Initiating_PHYs parameter. When a connectable advertisement is received and a connection request is sent on one PHY, scanning on any other PHYs is terminated.
The Scan_Interval[i] and Scan_Window[i] parameters are recommendations from the Host on how long (Scan_Window[i]) and how frequently (Scan_Interval[i]) the Controller should scan (see [Vol 6] Part B, Section 4.5.3); however the frequency and length of the scan is implementation specific. If the requested scan cannot be supported by the implementation, the Controller shall return the error code Invalid HCI Command Parameters (0x12). If bit 1 is set in Initiating_PHYs, the values for the LE 2M PHY shall be ignored.
The Connection_Interval_Min[i] and Connection_Interval_Max[i] parameters define the minimum and maximum allowed connection interval. The Connection_Interval_Min[i] parameter shall not be greater than the Connection_Interval_Max[i] parameter. The Max_Latency[i] parameter defines the maximum allowed Peripheral latency (see [Vol 6] Part B, Section 4.5.1).
The Supervision_Timeout[i] parameter defines the link supervision timeout for the connection. The Supervision_Timeout[i] in milliseconds shall be larger than (1 + Max_Latency[i]) × Connection_Interval_Max[i] × 2, where Connection_Interval_Max[i] is given in milliseconds (see [Vol 6] Part B, Section 4.5.2).
The Min_CE_Length[i] and Max_CE_Length[i] parameters provide the Controller with the expected minimum and maximum length of the connection events. The Min_CE_Length[i] parameter shall be less than or equal to the Max_CE_Length[i] parameter. The Controller is not required to use these values.
Where the connection is made on a PHY whose bit is not set in the Initiating_PHYs parameter, the Controller shall use the Connection_Interval_Min[i], Connection_Interval_Max[i], Max_Latency[i], Supervision_Timeout[i], Min_CE_Length[i], and Max_CE_Length[i] parameters for an implementation-chosen PHY whose bit is set in the Initiating_PHYs parameter.
If the Host issues this command when another HCI_LE_Extended_Create_Connection command is pending in the Controller, the Controller shall return the error code Command Disallowed (0x0C).
If the local device is already connected to the same device address as the advertiser (including two different Resolvable Private Addresses that resolve to the same IRK), then the Controller shall return an error which should use the error code Connection Already Exists (0x0B).
If the Own_Address_Type parameter is set to 0x00 and the device does not have a public address, the Controller should return an error code which should be Invalid HCI Command Parameters (0x12).
If the Own_Address_Type parameter is set to 0x01 and the random address for the device has not been initialized using the HCI_LE_Set_Random_Address command, the Controller shall return the error code Invalid HCI Command Parameters (0x12).
If the Own_Address_Type parameter is set to 0x02, the Initiator_Filter_Policy parameter is set to 0x00, the Controller's resolving list did not contain a matching entry, and the device does not have a public address, the Controller should return an error code which should be Invalid HCI Command Parameters (0x12).
If the Own_Address_Type parameter is set to 0x02, the Initiator_Filter_Policy parameter is not set to 0x00, and the device does not have a public address, the Controller should return an error code which should be Invalid HCI Command Parameters (0x12).
If the Own_Address_Type parameter is set to 0x03, the Initiator_Filter_Policy parameter is set to 0x00, the Controller's resolving list did not contain a matching entry, and the random address for the device has not been initialized using the HCI_LE_Set_Random_Address command, the Controller shall return the error code Invalid HCI Command Parameters (0x12).
If the Own_Address_Type parameter is set to 0x03, the Initiator_Filter_Policy parameter is not set to 0x00, and the random address for the device has not been initialized using the HCI_LE_Set_Random_Address command, the Controller shall return the error code Invalid HCI Command Parameters (0x12).
If the Initiating_PHYs parameter does not have at least one bit set for a PHY allowed for scanning on the primary advertising physical channel, the Controller shall return the error code Invalid HCI Command Parameters (0x12).
If the Host issues this command and the Controller has insufficient resources to handle any more connections, the Controller shall return the error code Connection Rejected due to Limited Resources (0x0D).
If the Controller does not support the Decision-Based Advertising Filtering feature and the Host issues this command with Initiator_Filter_Policy set to a value other than 0x00 or 0x01, the Controller shall return an error code which should be Unsupported Feature or Parameter Value (0x11).
Missing parameters: When a version of this command is issued that does not include all the parameters, the following values shall be used for any missing parameters: Parameter Value Advertising_Handle 0xFF Subevent 0xFF
Event(s) generated (unless masked away): When the Controller receives the HCI_LE_Extended_Create_Connection command, the Controller sends the HCI_Command_Status event to the Host. An HCI_LE_Enhanced_Connection_Complete event shall be generated when a connection is created because of this command or the connection creation procedure is cancelled; until the event is generated, the command is considered pending. If a connection creation is discarded, then the error code Connection Failed to be Established / Synchronization Timeout (0x3E) shall be used. If a connection is created, this event shall be immediately followed by an HCI_LE_Channel_Selection_Algorithm event.
[in] | p_params | Input parameters. |
0 | if success. |