Skip to content

ESP32 BLE Scan Finds No Devices

DodaTech Updated 2026-06-26 1 min read

In this tutorial, you'll learn about ESP32 BLE Scan Finds No Devices. We cover key concepts, practical examples, and best practices.

The Problem

ESP32 BLE central scan returns 0 results even when BLE devices are nearby.

Quick Fix

Wrong

BLEScan* pScan = BLEDevice::getScan();
pScan->start(10);
Scan results: 0 devices found
BLEScan* pScan = BLEDevice::getScan();
pScan->setActiveScan(true);
pScan->setInterval(100);
pScan->setWindow(99);
BLEScanResults results = pScan->start(10, false);
Serial.printf("Found %d devices
", results.getCount());
for (int i = 0; i < results.getCount(); i++) {
  Serial.printf("%s (%d dBm)
", results.getDevice(i).toString().c_str(), results.getDevice(i).getRSSI());
}
Found 4 devices:
BLE-Sensor (1c:23:45:67:89:ab) -52 dBm
SmartBand (ab:cd:ef:12:34:56) -61 dBm

Prevention

Set active scan to true for complete device information. Configure scan interval (100-1000 ms) and window (less than interval). Pass false for second parameter of start() to block until complete. Register a scan callback for async results. Scan for at least 5 seconds.

DodaTech engineers apply these same patterns when building Doda Browser's networking stack, DodaZIP's firmware packaging pipeline, and Durga Antivirus Pro's sensor communication layer.

FAQ

### What is active vs passive BLE scan?

Active scan sends scan requests to receive scan responses with additional data. Passive scan only listens. Active reveals more device info but uses more power.

How long should a BLE scan last?

Scan for at least 5-10 seconds to reliably find nearby devices. Longer scans find more devices but consume more power.

Can I filter scan results?

Yes. Implement a BLEScanCallbacks class and filter in onResult() by RSSI threshold, advertised service UUID, or device name pattern.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro