# Esp32 bluetooth com port

**URL:** <https://forum.arduino.cc/t/esp32-bluetooth-com-port/1382526>\
**Category:** General Guidance\
**Created:** [May 18, 2025, 11:55pm UTC](https://forum.arduino.cc/t/esp32-bluetooth-com-port/1382526 "2025-05-18T23:55:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![perigalacticon](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/perigalacticon/32/229047_2.png) [@perigalacticon](https://forum.arduino.cc/u/perigalacticon)\
**Post date:** [May 18, 2025, 11:55pm UTC](https://forum.arduino.cc/t/esp32-bluetooth-com-port/1382526/1 "2025-05-18T23:55:41Z")

</div>

I have a program on my Win10 PC that normally connects to a com port that I select, to receive serial data from an Arduino by usb cable. Can I somehow have an esp32 bluetooth connect to the PC as a com port that I can select in the PC program so it can receive serial data from bluetooth instead of by usb cable? Could you tell me the steps I would need to take to achieve this?

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [May 19, 2025, 5:24am UTC](https://forum.arduino.cc/t/esp32-bluetooth-com-port/1382526/2 "2025-05-19T05:24:05Z")

</div>

if you are using Bluetooth Classic try Examples\>BluetoothSerial\>SerialToSerialBT

when run is should create a Bluetooth device called _ESP32test_  
add the device on the PC and it should create a couple of COM ports

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/4/c/c/4ccb09b60434bfc1f5d2641644c7ed8d73748de5.png)

use a terminal emulator (such as teraterm) to test interaction with the ports

you can implement code using Visual Studio (C#, VB.net), java , Python, etc to communicate with the COM port

if using BLE try Tools\>BLE\>UART

---

<div class="post-metadata">

**Author:** ![vedkhandelwal](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vedkhandelwal/32/1128741_2.png) [@vedkhandelwal](https://forum.arduino.cc/u/vedkhandelwal)\
**Post date:** [June 10, 2025, 10:12pm UTC](https://forum.arduino.cc/t/esp32-bluetooth-com-port/1382526/3 "2025-06-10T22:12:22Z")

</div>

If your ESP32 supports Bluetooth Classic then use the `BluetoothSerial` library.  
Try installing [Bluetooth Serial Terminal app here](https://apps.microsoft.com/detail/9p200dms7mbw?hl=en-US&gl=US). Link is on Microsoft store.  
Anyways, the library supports the same functions as `Serial` however the `begin` function is different from `Serial` library. Its used as the name of bluetooth device such as `begin(/* String */ "ESP-BT-1234");`. This sets the name of the ESP32 device.

I also have Win10 so this app might look like (the red pencil is my sketches.):

 ![image of app](https://europe1.discourse-cdn.com/arduino/original/4X/d/e/e/deec907089c7bdcd1219a2b521b58c3516a3b7bd.png)  
The code I'm showing you is not including **all** functions such as get mac - look for: file \> examples \> BluetoothSerial, click on bluetoothserial then select any project. ---------------------------------------------------------------------------------------------------------------------  
example code:

```arduino
#include "BluetoothSerial.h"

BluetoothSerial SerialBT;

void setup() {
    Serial.begin(115200);
    SerialBT.begin("ESP32_BT"); // Set Bluetooth device name
    Serial.println("Bluetooth Serial Started! Ready to connect...");
}

void loop() {
    if (Serial.available()) {
        char data = Serial.read();
        SerialBT.write(data); // Send data via Bluetooth
    }
    if (SerialBT.available()) {
        char received = SerialBT.read();
        Serial.print("Received: ");
        Serial.println(received);
    }
    delay(20); // Prevent excessive loop iteration
}

```

_I'm new to forums - so sorry for some things...  
If you have any errors please let me know._

---

<div class="post-metadata">

**Author:** ![oldcurmudgeon](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/oldcurmudgeon/32/1280882_2.png) [@oldcurmudgeon](https://forum.arduino.cc/u/oldcurmudgeon)\
**Post date:** [June 11, 2025, 4:22pm UTC](https://forum.arduino.cc/t/esp32-bluetooth-com-port/1382526/4 "2025-06-11T16:22:14Z")

</div>

Be aware that only some of the esp32 variants support Bluetooth classic. Bluetooth 5.0 does not.  
[https://docs.espressif.com/projects/esp-idf/en/v5.0.9/esp32s3/hw-reference/chip-series-comparison.html](https://docs.espressif.com/projects/esp-idf/en/v5.0.9/esp32s3/hw-reference/chip-series-comparison.html)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [December 8, 2025, 4:22pm UTC](https://forum.arduino.cc/t/esp32-bluetooth-com-port/1382526/5 "2025-12-08T16:22:34Z")

</div>

Closed on December 8, 2025, 4:22pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
