Skip to content

Bluetooth Classic Research

Bluetooth Classic is the wireless protocol that has been ubiquitous for almost 15 years. Bluetooth headsets, speakers, smartphones, smartwatches and many devices use a Bluetooth radio to communicate. The Bluetooth standard was born out of the need to establish a wireless connection between computers and devices. In the late 1990s, it was clear that computers would need wireless connectivity for a large number of devices.

Bluetooth considerations

Bluetooth Classic is ideal for connecting mobile phones to for example Bluetooth headsets for phone calls.

Bluetooth Low Energy (BLE) is a version of Bluetooth that consumes very little power and is intended for sensors and accessories with low power. This version is ideal for applications that do not require a continuous connection, but do require a long battery life. Bluetooth Low Energy is not suitable for streaming sound.

ESP32

The ESP32 is a budget series of low-power microcontrollers with integrated Wi-Fi and dual-mode Bluetooth. The ESP32 series uses a Tensilica Xtensa LX6 microprocessor in both dual and single core configurations. The ESP32 was created and developed by Espressif Systems, a Shanghai-based Chinese company, and is manufactured by TSMC. It is a successor to the ESP8266 microcontroller. This microcontroller is very popular with hobbyists for developing Internet of things applications. The ESP32 can be used for both Bluetooth Classic and Bluetooth Low Energy which makes it a good option for the desired solution.

PC bluetooth serial connection with ESP32

To test bluetooth communication with ESP32, a program was written in C# which sends commands via a bluetooth serial connection. This test was conducted using the classic bluetooth version which requires the devices to be paired.

Arduino setup

To develop software for the ESP32 with Arduino IDE, a board configuration URL is required. The configuration URL used is the following: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json After configuring the URL, the ESP32 board has to be installed using the built-in board manager in Arduino IDE.

Windows application

The windows application will work as long as .NET framework 6 is installed.

Research value

It is important to research different approaches for the disired solution. While the expected preference is favourable to Bluetooth Low Energy, it is worth it to examine the workings of the solution with Bluetooth Classic because this can give new insights and considerations.

Image title

Usage

As pictured above, the test app has 4 buttons like the mobile app does for demonstration purposes. The application scans the available comports for the host machine. To start sending commands, the Bluetooth COM port has to be selected. Upon selection, the application will open a connection through the selected comport and commands can be sent through Bluetooth to the ESP32. The ESP32 will return the chosen value when it has received it.

Conclusion

There are resources available to easily create a connection with 2 devices via Bluetooth Classic. Bluetooth Classic uses more power than Bluetooth Low Energy and thus may not be the best option. This mainly depends on the size and frequence of the communication between the 2 devices.


Last update: April 20, 2023