ESP32 Classic Bluetooth Not Discoverable
DodaTech
Updated 2026-06-26
1 min read
In this tutorial, you'll learn about ESP32 Classic Bluetooth Not Discoverable. We cover key concepts, practical examples, and best practices.
The Problem
ESP32 Bluetooth Classic does not appear in device scans or fails to pair with phones.
Quick Fix
Wrong
#include "esp_bt_main.h"
void setup() {
esp_bluedroid_init();
}
Device not visible to phone scans. Bluetooth initializes but no name appears.
Right
#include "esp_bt.h"
#include "esp_bt_main.h"
#include "esp_bt_device.h"
void setup() {
esp_bt_controller_mem_release(ESP_BT_MODE_BTDM);
esp_bt_controller_config_t cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
esp_bt_controller_init(&cfg);
esp_bt_controller_enable(ESP_BT_MODE_CLASSIC_BT);
esp_bluedroid_init();
esp_bluedroid_enable();
esp_bt_dev_set_device_name("ESP32-Classic");
esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);
Serial.println("Bluetooth Classic ready");
}
Bluetooth Classic ready
(Phone scans show "ESP32-Classic" in Bluetooth devices)
Prevention
Release BLE memory first with esp_bt_controller_mem_release(). Initialize BT controller with ESP_BT_MODE_CLASSIC_BT. Set device name before making discoverable. Use both CONNECTABLE and DISCOVERABLE scan modes. Register callback handlers for pairing events.
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
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro