I am implementing a central device using the nRF Connect SDK. I want to connect to a peripheral device using direct advertising, but the central device does not seem to recognize the direct advertising. How can I connect to a device using direct advertising?
In the nRF SDK, when receiving direct advertising, there was an event called "White list report", but there is no corresponding callback in the nRF Connect SDK. The source code is as follows, and I have looked at various sample projects for central devices, but they all seem to be similar.
static void scan_init(void) { int err; const struct bt_le_scan_param scan_param = { .interval = SCAN_INTERVAL, // 100msec .interval_coded = 0, .options = BT_LE_SCAN_OPT_FILTER_ACCEPT_LIST | BT_LE_SCAN_OPT_FILTER_DUPLICATE, .timeout = 0, .type = BT_HCI_LE_SCAN_PASSIVE, .window = SCAN_WINDOW, // 50msec .window_coded = 0, }; struct bt_scan_init_param scan_init = { .connect_if_match = false, .conn_param = BT_LE_CONN_PARAM_DEFAULT, .scan_param = &scan_param, }; bt_scan_init(&scan_init); bt_scan_cb_register(&scan_cb); err = bt_scan_filter_add(BT_SCAN_FILTER_TYPE_UUID, BT_UUID_BAS); if (err) { LOG_ERR("Scanning filters cannot be set (err %d)", err); return; } err = bt_scan_filter_enable(BT_SCAN_UUID_FILTER, false); if (err) { LOG_ERR("Filters cannot be turned on (err %d)", err); } }