Bluetooth not working with Windows 10 and not working with Android

I'm trying to use ESP32 to send receive/send data (RFCOMM) through bluetooth to Windows 10, I've already tried with both classic and BLE bluetooth, but despite what I do, Windows 10 won't recognize ESP32 as a Bluetooth device.

This is what I see when I go to the bluetooth and other devices settings in Windows 10:

If I try to add a bluetooth device, it won't detect anything, even if I press the reset button in ESP32. All I can see from ESP32 is that "Silicon Labs CP201x USB to UART Bridge (COM 7)" COM 7 port is working. I also noticed that COM1 port isn't working, it just displays in Arduino IDE, but it won't connect.

I can see that port COM 7 is working because I'm able to upload the code to the ESP32, but then when I test the bluetooth from the Serial Monitor, the Android device won't pair at all, this is all I get from the Serial Monitor:

ets Jun 8 2016 00:22:57

configsip: 0, SPIWP:0xee
mode:DIO, clock div:1
ho 0 tail 12 room 4
ho 0 tail 12 room 4
entry 0x400806b8
Waiting a client connection to notify...

I've also installed the drivers CH34x_Install_Windows_v3_4 and CP210x_Universal_Windows_Driver, also tried CH341SER, CP210x_Windows_Drivers_with_Serial_Enumeration and CP210x_Windows_Drivers, still the same results.

All I need to do is to connect a bluetooth controller to Windows 10 through ESP32, that's all. That shouldn't be that hard, right?

This is the board I'm using:

Please post the sketch that you are using

Right away sir. I've tested 3 types so far.

Classic bluetooth (Bluetooth to serial):

//This example code is in the Public Domain (or CC0 licensed, at your option.)
//By Evandro Copercini - 2018
//This example creates a bridge between Serial and Classical Bluetooth (SPP)
//and also demonstrate that SerialBT have the same functionalities of a normal Serial

#include "BluetoothSerial.h"

#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it

BluetoothSerial SerialBT;

void setup() {
  SerialBT.begin("ESP32test"); //Bluetooth device name
  Serial.println("The device started, now you can pair it with bluetooth!");

void loop() {
  if (Serial.available()) {
  if (SerialBT.available()) {

Classic Bluetooth, from techcoil blog:

#include "BluetoothSerial.h"
BluetoothSerial SerialBT;
void setup()
void loop()
  String inputFromOtherSide;
  if (SerialBT.available()) {
    inputFromOtherSide = SerialBT.readString();
    SerialBT.println("You had entered: ");

This one will refuse connection right away, from android, using BLE UART:

    Based on Neil Kolban example for IDF:
    Ported to Arduino ESP32 by Evandro Copercini

   Create a BLE server that, once we receive a connection, will send periodic notifications.
   The service advertises itself as: 6E400001-B5A3-F393-E0A9-E50E24DCCA9E
   Has a characteristic of: 6E400002-B5A3-F393-E0A9-E50E24DCCA9E - used for receiving data with "WRITE" 
   Has a characteristic of: 6E400003-B5A3-F393-E0A9-E50E24DCCA9E - used to send data with  "NOTIFY"

   The design of creating the BLE server is:
   1. Create a BLE Server
   2. Create a BLE Service
   3. Create a BLE Characteristic on the Service
   4. Create a BLE Descriptor on the characteristic
   5. Start the service.
   6. Start advertising.

   In this example rxValue is the data received (only accessible inside that function).
   And txValue is the data to be sent, in this example just a byte incremented every second. 
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>

BLEServer *pServer = NULL;
BLECharacteristic * pTxCharacteristic;
bool deviceConnected = false;
bool oldDeviceConnected = false;
uint8_t txValue = 0;

// See the following for generating UUIDs:

#define SERVICE_UUID           "6E400001-B5A3-F393-E0A9-E50E24DCCA9E" // UART service UUID
#define CHARACTERISTIC_UUID_RX "6E400002-B5A3-F393-E0A9-E50E24DCCA9E"
#define CHARACTERISTIC_UUID_TX "6E400003-B5A3-F393-E0A9-E50E24DCCA9E"

class MyServerCallbacks: public BLEServerCallbacks {
    void onConnect(BLEServer* pServer) {
      deviceConnected = true;

    void onDisconnect(BLEServer* pServer) {
      deviceConnected = false;

class MyCallbacks: public BLECharacteristicCallbacks {
    void onWrite(BLECharacteristic *pCharacteristic) {
      std::string rxValue = pCharacteristic->getValue();

      if (rxValue.length() > 0) {
        Serial.print("Received Value: ");
        for (int i = 0; i < rxValue.length(); i++)


void setup() {

  // Create the BLE Device
  BLEDevice::init("UART Service");

  // Create the BLE Server
  pServer = BLEDevice::createServer();
  pServer->setCallbacks(new MyServerCallbacks());

  // Create the BLE Service
  BLEService *pService = pServer->createService(SERVICE_UUID);

  // Create a BLE Characteristic
  pTxCharacteristic = pService->createCharacteristic(
  pTxCharacteristic->addDescriptor(new BLE2902());

  BLECharacteristic * pRxCharacteristic = pService->createCharacteristic(

  pRxCharacteristic->setCallbacks(new MyCallbacks());

  // Start the service

  // Start advertising
  Serial.println("Waiting a client connection to notify...");

void loop() {

    if (deviceConnected) {
        pTxCharacteristic->setValue(&txValue, 1);
		delay(10); // bluetooth stack will go into congestion, if too many packets are sent

    // disconnecting
    if (!deviceConnected && oldDeviceConnected) {
        delay(500); // give the bluetooth stack the chance to get things ready
        pServer->startAdvertising(); // restart advertising
        Serial.println("start advertising");
        oldDeviceConnected = deviceConnected;
    // connecting
    if (deviceConnected && !oldDeviceConnected) {
		// do stuff here on connecting
        oldDeviceConnected = deviceConnected;

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

Sorry, I'm having trouble formatting code here.

The easiest way is to right click in the IDE, select Copy for Forum and paste it here in a post. The code tags will be added by the IDE

My guess is that you need to start bluetooth (classic) server by adding this line to your setup code:


"nameofyourchoice" will appear as a possible connection choice in your Windows.