How to connect to an ESP32 development board via Bluetooth on Windows 10

When you have an old Windows 10 machine, you can reuse it as an IOT gateway.

Given that your Windows 10 machine has working Bluetooth, you can connect it to an ESP32 development board.

In case you need a reference to connect to an ESP32 development board via Bluetooth on Windows 10, here are the steps to do so.

Setting up your ESP32 development board to accept Bluetooth connections

Before your Windows machine can discover ESP32 Bluetooth, you need to get ESP32 to turn on Bluetooth. In order to do so, upload the following Arduino Sketch to your ESP32 development board:

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

As I had mentioned in the guide on how to get your ESP32 development board to communicate with another device over Bluetooth Serial, this Arduino Sketch will echo back whatever message that it receives from the Bluetooth connection.

After you had uploaded the Arduino Sketch onto your ESP development board, place it near to your Windows machine.

Connecting your Windows 10 machine to your ESP32 development board via Bluetooth

First, find the Bluetooth and other devices settings from the taskbar:
Finding Bluetooth and other devices settings on Windows 10

When you click on Bluetooth and other devices settings, the Bluetooth and other devices settings window will appear:
Bluetooth and other devices settings window on Windows 10

Given that, click on Add Bluetooth and other device. When you had done so, the Add a device window will appear:
Add a device dialog on Windows 10

Given that, click on Bluetooth. Once you do so, you should be able to find ESP32test as one of the Bluetooth device to connect to:
Add a device dialog showing ESP32test as one of the options to connect to

When you click on ESP32test, Windows 10 will pair itself with your ESP32 development board via Bluetooth:
Add a device dialog showing ESP32test being paired successfully on Windows 10

Once you had paired Windows 10 with your ESP32 development board, click on Done to go back to Bluetooth and other devices settings.

Finding the COM port to communicate with your ESP32 development board via Bluetooth Serial

Since the ESP32 development board is running a program with Bluetooth Serial, Windows 10 should define a COM port for applications to communicate with your board.

In order to find the COM port to communicate with your ESP32 development board, scroll down to find the More Bluetooth options link under the Related settings section.
Bluetooth and other devices settings window on Windows 10 with More Bluetooth options highlighted

When you click on the More Bluetooth options link, the Bluetooth Settings window will appear. Given that, click on the COM port tab to find the COM port to communicate with your ESP32 development board:
Bluetooth settings window on Windows 10 showing COM ports assigned to ESP32test Bluetooth connection

As shown above, Windows had defined two COM ports to the ESP32 development board that I had paired with.

In order to communicate with this ESP32 development board via Bluetooth, our application running on Windows 10 will need to use the one labelled as Outgoing under the Direction column.

About Clivant

Clivant a.k.a Chai Heng enjoys composing software and building systems to serve people. He owns techcoil.com and hopes that whatever he had written and built so far had benefited people. All views expressed belongs to him and are not representative of the company that he works/worked for.

Udemy.com Homepage 300x250 Domain names for just 88 cents!

Find a domain starting at $0.88

powered by Namecheap