Skip to content

Commit 2faa76c

Browse files
committed
Update BluetoothSerial.cpp
1 parent a1fbf53 commit 2faa76c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/BluetoothSerial/src/BluetoothSerial.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ BTScanResults* BluetoothSerial::discover(int timeoutMs) {
953953
disconnect();
954954
log_i("discovering");
955955
// will resolve name to address first - it may take a while
956-
esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE);
956+
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
957957
if (esp_bt_gap_start_discovery(ESP_BT_INQ_MODE_GENERAL_INQUIRY, timeout, 0) == ESP_OK) {
958958
waitForDiscovered(timeoutMs);
959959
esp_bt_gap_cancel_discovery();
@@ -978,7 +978,7 @@ bool BluetoothSerial::discoverAsync(BTAdvertisedDeviceCb cb, int timeoutMs) {
978978
advertisedDeviceCb = cb;
979979
log_i("discovering");
980980
// will resolve name to address first - it may take a while
981-
esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE);
981+
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
982982
if (timeout > 0)
983983
return esp_bt_gap_start_discovery(ESP_BT_INQ_MODE_GENERAL_INQUIRY, timeout, 0) == ESP_OK;
984984
else return esp_bt_gap_start_discovery(ESP_BT_INQ_MODE_GENERAL_INQUIRY, ESP_BT_GAP_MAX_INQ_LEN, 0) == ESP_OK;

0 commit comments

Comments
 (0)