![]() |
nrfxlib API 3.3.99
|
| uint8_t sdc_hci_cmd_le_periodic_adv_create_sync | ( | const sdc_hci_cmd_le_periodic_adv_create_sync_t * | p_params | ) |
#include <softdevice_controller/include/sdc_hci_cmd_le.h>
LE Periodic Advertising Create Sync.
The description below is extracted from Core_v6.3, Vol 4, Part E, Section 7.8.67
This command is used to synchronize with a single periodic advertising train from an advertiser and begin receiving periodic advertising packets.
This command may be issued whether or not scanning is enabled and scanning may be enabled and disabled (see Section 7.8.65) while this command is pending. However, synchronization can only occur when scanning is enabled. While scanning is disabled, no attempt to synchronize will take place.
The Options parameter is used to determine whether the Periodic Advertiser List is used, whether HCI_LE_Periodic_Advertising_Report events for this periodic advertising train are initially enabled or disabled, and whether duplicate reports are filtered or not. If the Periodic Advertising List is used, then the periodic advertising device to listen to is the first one that sends an AUX_SYNC_IND PDU received successfully by the local device, that is on the list, and that does not have the wrong type of Constant Tone Extension. If the Periodic Advertiser List is not used, then the Advertising_SID, Advertiser Address_Type, and Advertiser Address parameters specify the periodic advertising device to listen to; otherwise they shall be ignored.
The Advertising_SID parameter, if used, specifies the value that shall match the Advertising SID subfield in the ADI field of the received advertisement for it to be used to synchronize.
The Skip parameter specifies the maximum number of consecutive periodic advertising events that the receiver may skip after successfully receiving a periodic advertising packet.
The Sync_Timeout parameter specifies the maximum permitted time between successful receives. If this time is exceeded, synchronization is lost. The Sync_CTE_Type parameter specifies whether to only synchronize to periodic advertising with certain types of Constant Tone Extension (a value of 0 indicates that the presence or absence of a Constant Tone Extension is irrelevant).
If the Controller does not support the Connectionless CTE Receiver feature, then the Host should set Sync_CTE_Type to 0.
If the periodic advertiser changes the type of Constant Tone Extension after the scanner has synchronized with the periodic advertising, the scanner's Link Layer shall remain synchronized.
Irrespective of the value of the Skip parameter, the Controller should stop skipping packets before the Sync_Timeout would be exceeded.
If bit 1 of Options is set to 1 and the Controller supports the Periodic Advertising ADI Support feature, then the Controller shall ignore bit 2.
Errors:
See Section 4.5.2 for a list of error types and descriptions.
Type Condition Error code
MC All the non-reserved bits of Sync_CTE_Type are set to 1. Command Disallowed
(0x0C)
MC Another HCI_LE_Periodic_Advertising_Create_Sync is pending. Command Disallowed
(0x0C)
MC Options bit 0 is set to 0 and Advertising_SID, Connection Already
Advertiser_Address_Type, and Advertiser_Address identify a Exists (0x0B)
periodic advertising train that the Controller is already
synchronized to.
MC The Controller has insufficient resources to handle any more Memory Capacity
periodic advertising trains. Exceeded (0x07)
M Options bit 1 is set to 0, bit 2 is set to 1, and the Controller Unsupported Feature
does not support the Periodic Advertising ADI Support feature. or Parameter Value
(0x11)
MC Options bit 1 is set to 1 and the Controller does not support Connection Failed to
the HCI_LE_Set_Periodic_Advertising_Receive_Enable command. be Established /
Synchronization
Timeout (0x3E)
R Sync_CTE_Type is non-zero and the Controller does not support Unsupported Feature
the Connectionless CTE Receiver feature. If the Controller does or Parameter Value
not return this error, then it should behave as if Sync_CTE_Type (0x11)
is set to zero.
Event(s) generated (unless masked away):
When the HCI_LE_Periodic_Advertising_Create_Sync command has been received, the Controller sends the HCI_Command_Status event to the Host. An HCI_LE_Periodic_Advertising_Sync_Established event shall be generated when the Controller starts receiving periodic advertising packets.
If Sync_CTE_Type is non-zero and the Controller receives periodic advertising that has the wrong type of Constant Tone Extension then:
• If bit 0 of Options is set, then the Controller shall ignore this address and SID and continue to search for other periodic advertisements. • Otherwise, the Controller shall generate an HCI_LE_Periodic_Advertising_Sync_Established event with Status set to Unsupported Remote Feature (0x1A).
When the Controller receives periodic advertising packets then, if reporting is enabled, it sends HCI_LE_Periodic_Advertising_Report events to the Host. If the Controller does not receive a periodic advertising packet within 6 periodic advertising events of first listening, then it shall generate an HCI_LE_Periodic_Advertising_Sync_Established event that should have Status set to Connection Failed to be Established / Synchronization Timeout (0x3E).
Note: The HCI_LE_Periodic_Advertising_Sync_Established event can be sent as a result of synchronization being canceled by an HCI_LE_Periodic_Advertising_Create_Sync_Cancel command.
| [in] | p_params | Input parameters. |
| 0 | if success. |