Example of BLE (or simple BT) to PC, connected as a Serial COM Port

tomnugget
Posts: 1
Joined: Sat Sep 19, 2020 11:09 pm

Example of BLE (or simple BT) to PC, connected as a Serial COM Port

Postby tomnugget » Sat Sep 19, 2020 11:17 pm

Hi all, I've been fairly lost in searching for a simple example of how to use the ESP32 as a Bluetooth device that can send & receive serial data to/from a computer. I've posted this as a feature request in the ESP-IDF repo but understand it isn't a high priority, so I'm trying my luck here! This example using Arduino works well for me and I imagine is a very common application of ESP32's Bluetooth capability. But is there a similar version for ESP-IDF? Some others online have suggested the gatt_server example, but this looks like you need to specify other devices to connect to specifically I think?

I'm using ESP-IDF v4.1 rc on Windows 64, with a SparkFun ESP32 Thing. After trying a number of examples, I've attempted to port the Arduino's library to ESP-IDF manually and by using a lib-builder.

Have I completely missed an ESP-IDF example/tutorial of how to do this? Or is it possible that a simple example could be added (simpler than Gatt_Server_Service_Table_Example_Walkthrough.md ideally)?

From what I've seen, most examples so far work out-of-the-box when you connect 2 or more ESP32 devices, but not for 1 ESP + Windows PC. The functionality I'm looking for is to be able to connect any PC to the ESP device as an "Outgoing" COM port and be able to send and receive data just like uart_read_bytes and uart_send_bytes works.

Thanks in advance!

Who is online

Users browsing this forum: No registered users and 232 guests