nrfxlib API 0.1.0
|
uint8_t sdc_hci_cmd_le_set_scan_enable | ( | const sdc_hci_cmd_le_set_scan_enable_t * | p_params | ) |
#include <softdevice_controller/include/sdc_hci_cmd_le.h>
LE Set Scan Enable.
The description below is extracted from Core_v5.4, Vol 4, Part E, Section 7.8.11
The HCI_LE_Set_Scan_Enable command is used to start and stop scanning for legacy PDUs (but not extended PDUs, even if the device supports extended advertising). Scanning is used to discover advertising devices nearby.
The Filter_Duplicates parameter controls whether the Link Layer should filter out duplicate advertising reports (Filtering_Enabled) to the Host, or if the Link Layer should generate advertising reports for each packet received (Filtering_Disabled). See [Vol 6] Part B, Section 4.4.3.5. If LE_Scan_Enable is set to 0x00 then Filter_Duplicates shall be ignored.
If LE_Scan_Enable is set to 0x01, the scanning parameters' Own_Address_- Type parameter is set to 0x00 or 0x02, 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 LE_Scan_Enable is set to 0x01, the scanning parameters' Own_Address_- Type parameter is set to 0x01 or 0x03, 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 LE_Scan_Enable parameter is set to 0x01 and scanning is already enabled, any change to the Filter_Duplicates setting shall take effect.
Disabling scanning when it is disabled has no effect.
Event(s) generated (unless masked away): When the HCI_LE_Set_Scan_Enable command has completed, an HCI_Command_Complete event shall be generated.
Zero or more HCI_LE_Advertising_Report events are generated by the Controller based on legacy advertising packets received and the duplicate filtering. More than one advertising packet may be reported in each HCI_LE_Advertising_Report event. No report shall be issued for extended advertising PDUs.
When the Scanning_Filter_Policy is set to 0x02 or 0x03 (see Section 7.8.10) and a directed advertisement was received where the advertiser used a resolvable private address which the Controller is unable to resolve, an HCI_LE_Directed_Advertising_Report event shall be generated instead of an HCI_LE_Advertising_Report event.
[in] | p_params | Input parameters. |
0 | if success. |