PAST Receiver#
PAST Receiver.
Synchronize to periodic advertising trains by receiving Periodic Advertising Synchronization Transfer over a connection.
Enumerations#
Specifies the mode for receiving synchronization transfers over connections.
Specifies the mode for receiving synchronization transfers over periodic advertising trains.
Functions#
Macros#
Enumeration Documentation#
sl_bt_past_receiver_mode_t#
sl_bt_past_receiver_mode_t
Specifies the mode for receiving synchronization transfers over connections.
Enumerator | |
---|---|
sl_bt_past_receiver_mode_ignore | (0x0) No attempt is made to synchronize to a periodic advertising train for which the synchronization information was received. No event will be triggered towards the application. |
sl_bt_past_receiver_mode_synchronize | (0x1) Attempt to synchronize to a periodic advertising train for which the synchronization information was received. When the information is received, an event will be triggered to indicate success or failure and to provide the application with the periodic advertising synchronization handle. |
sl_bt_past_receiver_over_sync_mode_t#
sl_bt_past_receiver_over_sync_mode_t
Specifies the mode for receiving synchronization transfers over periodic advertising trains.
Enumerator | |
---|---|
sl_bt_past_receiver_over_sync_mode_ignore | (0x0) No attempt is made to synchronize to a periodic advertising train that changed parameters (see command sl_bt_pawr_advertiser_change_parameters), or to synchronize to another train for which synchronization information was received (see command sl_bt_advertiser_past_transfer_over_pawr_advertiser). If a parameter change for the current train or the sync info of another train is received on an established sync, the receiving sync will be closed, and the event sl_bt_evt_sync_closed will be triggered. |
sl_bt_past_receiver_over_sync_mode_replace | (0x1) Attempt to maintain synchronization to a periodic advertising train that changed parameters (see command sl_bt_pawr_advertiser_change_parameters), or to synchronize to another train for which synchronization information was received (see command sl_bt_advertiser_past_transfer_over_pawr_advertiser). On successful synchronization, the new train replaces the old train in the same sync object and the event sl_bt_evt_pawr_sync_transfer_received will be triggered with the same handle as the synchronization over which the sync info was received. If synchronization with the new info cannot be obtained, the synchronization to the current train is lost and the event sl_bt_evt_sync_closed will be triggered. |
Function Documentation#
sl_bt_past_receiver_set_default_sync_receive_parameters#
sl_status_t sl_bt_past_receiver_set_default_sync_receive_parameters (uint8_t mode, uint16_t skip, uint16_t timeout, uint8_t reporting_mode)
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | mode | Enum sl_bt_past_receiver_mode_t. The mode to specify how the Bluetooth stack reacts when synchronization information is received over a connection. Values:
Default: sl_bt_past_receiver_mode_ignore (No attempt is made to synchronize) |
uint16_t | [in] | skip | The maximum number of periodic advertising packets that can be skipped after a successful receive.
|
uint16_t | [in] | timeout | The maximum permitted time between successful receives. If this time is exceeded, synchronization is lost. Unit: 10 ms.
|
uint8_t | [in] | reporting_mode | Enum sl_bt_sync_reporting_mode_t. Specifies the initial mode for reporting data received in the periodic advertising train after it has achieved synchronization. Values:
Default: sl_bt_sync_report_all (Data received in periodic advertising trains is reported to the application) |
Set the default parameters for receiving Periodic Advertising Synchronization Transfers (PAST) over connections. The default parameters will be in effect for all subsequent connections, unless overridden by command sl_bt_past_receiver_set_sync_receive_parameters after the connection is opened.
Irrespective of the value of the skip
parameter, the Controller stops skipping packets if the skipping would cause a timeout.
This command sets parameters that do not limit the synchronization based on the CTE type. If the application includes bluetooth_feature_aoa_receiver or bluetooth_feature_aod_receiver component and wants to specify a particular CTE limitation, the application should use the command sl_bt_cte_receiver_set_default_sync_receive_parameters to set the default parameters.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_periodic_sync_transfer_received - Triggered after synchronization transfer has been received for a periodic advertising train that does not have subevents or response slots. The event is triggered when the local device has either successfully synchronized to the train or timed out while attempting to synchronize.
sl_bt_evt_pawr_sync_transfer_received - If the application includes the bluetooth_feature_pawr_sync component, triggered after synchronization transfer is received for a Periodic Advertising with Responses (PAwR) train. The event is triggered when the local device has either successfully synchronized to the train or timed out while attempting to synchronize.
sl_bt_past_receiver_set_sync_receive_parameters#
sl_status_t sl_bt_past_receiver_set_sync_receive_parameters (uint8_t connection, uint8_t mode, uint16_t skip, uint16_t timeout, uint8_t reporting_mode)
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | connection | Connection handle of the connection used to receive the sync transfer |
uint8_t | [in] | mode | Enum sl_bt_past_receiver_mode_t. The mode to specify how the Bluetooth stack reacts when synchronization information is received over a connection. Values:
Default: sl_bt_past_receiver_mode_ignore (Do not attempt to synchronize) |
uint16_t | [in] | skip | The maximum number of periodic advertising packets that can be skipped after a successful receive.
|
uint16_t | [in] | timeout | The maximum permitted time between successful receives. If this time is exceeded, synchronization is lost. Unit: 10 ms.
|
uint8_t | [in] | reporting_mode | Enum sl_bt_sync_reporting_mode_t. Specifies the initial mode for reporting data received in the periodic advertising train after it has achieved synchronization. Values:
Default: sl_bt_sync_report_all (Data received in periodic advertising trains is reported to the application) |
Set the parameters for receiving Periodic Advertising Synchronization Transfers (PAST) over the specified connection. The parameters do not affect periodic advertising trains that the device has already synchronized to.
Irrespective of the value of the skip
parameter, the Controller stops skipping packets if the skipping would cause a timeout.
This command sets parameters that do not limit the synchronization based on the CTE type. If the application includes bluetooth_feature_aoa_receiver or bluetooth_feature_aod_receiver component and wants to specify a particular CTE limitation, the application should use the command sl_bt_cte_receiver_set_sync_receive_parameters to set the parameters.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_periodic_sync_transfer_received - Triggered after synchronization transfer has been received for a periodic advertising train that does not have subevents or response slots. The event is triggered when the local device has either successfully synchronized to the train or timed out while attempting to synchronize.
sl_bt_evt_pawr_sync_transfer_received - If the application includes the bluetooth_feature_pawr_sync component, triggered after synchronization transfer is received for a Periodic Advertising with Responses (PAwR) train. The event is triggered when the local device has either successfully synchronized to the train or timed out while attempting to synchronize.
sl_bt_past_receiver_set_default_sync_receive_over_sync_parameters#
sl_status_t sl_bt_past_receiver_set_default_sync_receive_over_sync_parameters (uint8_t mode, uint16_t skip, uint16_t timeout, uint8_t reporting_mode)
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | mode | Enum sl_bt_past_receiver_over_sync_mode_t. The mode to specify how the Bluetooth stack reacts when synchronization information is received over periodic advertising. Values:
Default: sl_bt_past_receiver_over_sync_mode_ignore (No attempt is made to synchronize) |
uint16_t | [in] | skip | The maximum number of periodic advertising packets that can be skipped after a successful receive.
|
uint16_t | [in] | timeout | The maximum permitted time between successful receives. If this time is exceeded, synchronization is lost. Unit: 10 ms.
|
uint8_t | [in] | reporting_mode | Enum sl_bt_sync_reporting_mode_t. Specifies the initial mode for reporting data received in the periodic advertising train after it has achieved synchronization. Values:
Default: sl_bt_sync_report_all (Data received in periodic advertising trains is reported to the application) |
Set the default parameters for receiving Periodic Advertising Synchronization Transfers (PAST) over periodic advertising trains that the local device has synchronized to. The default parameters will be in effect for all subsequent periodic advertising syncs, unless overridden by command sl_bt_past_receiver_set_sync_receive_over_sync_parameters after the sync is established.
Irrespective of the value of the skip
parameter, the Controller stops skipping packets if the skipping would cause a timeout.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_periodic_sync_transfer_received - Triggered after synchronization transfer has been received for a periodic advertising train that does not have subevents or response slots. The event is triggered when the local device has either successfully synchronized to the train or timed out while attempting to synchronize.
sl_bt_evt_pawr_sync_transfer_received - If the application includes the bluetooth_feature_pawr_sync component, triggered after synchronization transfer is received for a Periodic Advertising with Responses (PAwR) train. The event is triggered when the local device has either successfully synchronized to the train or timed out while attempting to synchronize.
sl_bt_past_receiver_set_sync_receive_over_sync_parameters#
sl_status_t sl_bt_past_receiver_set_sync_receive_over_sync_parameters (uint16_t sync, uint8_t mode, uint16_t skip, uint16_t timeout, uint8_t reporting_mode)
Type | Direction | Argument Name | Description |
---|---|---|---|
uint16_t | [in] | sync | Synchronization handle of the periodic advertising sync used to receive the sync transfer |
uint8_t | [in] | mode | Enum sl_bt_past_receiver_mode_t. The mode to specify how the Bluetooth stack reacts when synchronization information is received over periodic advertising. Values:
Default: sl_bt_past_receiver_mode_ignore (Do not attempt to synchronize) |
uint16_t | [in] | skip | The maximum number of periodic advertising packets that can be skipped after a successful receive.
|
uint16_t | [in] | timeout | The maximum permitted time between successful receives. If this time is exceeded, synchronization is lost. Unit: 10 ms.
|
uint8_t | [in] | reporting_mode | Enum sl_bt_sync_reporting_mode_t. Specifies the initial mode for reporting data received in the periodic advertising train after it has achieved synchronization. Values:
Default: sl_bt_sync_report_all (Data received in periodic advertising trains is reported to the application) |
Set the parameters for receiving Periodic Advertising Synchronization Transfers (PAST) over the specified periodic advertising synchronization.
Irrespective of the value of the skip
parameter, the Controller stops skipping packets if the skipping would cause a timeout.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_periodic_sync_transfer_received - Triggered after synchronization transfer has been received for a periodic advertising train that does not have subevents or response slots. The event is triggered when the local device has either successfully synchronized to the train or timed out while attempting to synchronize.
sl_bt_evt_pawr_sync_transfer_received - If the application includes the bluetooth_feature_pawr_sync component, triggered after synchronization transfer is received for a Periodic Advertising with Responses (PAwR) train. The event is triggered when the local device has either successfully synchronized to the train or timed out while attempting to synchronize.