Code: Select all
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_NON_DISCOVERABLE)
Code: Select all
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE)
I'm wondering if this feature isn't implemented yet for some reason, because implementation of esp_bt_gap_set_scan_mode() looks like this:
Code: Select all
static void btc_bt_set_scan_mode(esp_bt_connection_mode_t c_mode, esp_bt_discovery_mode_t d_mode)
{
tBTA_DM_DISC disc_mode;
tBTA_DM_CONN conn_mode;
switch (c_mode) {
case ESP_BT_NON_CONNECTABLE:
conn_mode = BTA_DM_NON_CONN;
break;
case ESP_BT_CONNECTABLE:
conn_mode = BTA_DM_CONN;
break;
default:
BTC_TRACE_WARNING("invalid connection mode (0x%x)", c_mode);
return;
}
switch (d_mode) {
case ESP_BT_NON_DISCOVERABLE:
disc_mode = BTA_DM_NON_DISC;
break;
case ESP_BT_LIMITED_DISCOVERABLE:
disc_mode = BTA_DM_LIMITED_DISC;
break;
case ESP_BT_GENERAL_DISCOVERABLE:
disc_mode = BTA_DM_GENERAL_DISC;
break;
default:
BTC_TRACE_WARNING("invalid discovery mode (0x%x)", d_mode);
return;
}
BTA_DmSetVisibility(disc_mode, conn_mode, BTA_DM_IGNORE, BTA_DM_IGNORE);
return;
}
Thanks,
Dennis