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:
When you click on Bluetooth and other devices settings, the Bluetooth and other devices settings window will appear:
Given that, click on Add Bluetooth and other device. When you had done so, the Add a device window will appear:
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:
When you click on ESP32test, Windows 10 will pair itself with your ESP32 development board via Bluetooth:
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.
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:
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.