BLE and Classic BT working together

Dear all,
I was curious to verify whether BLE and classic BT would work in parallel on an Android device.
The answer is yes, the two (completely) different Bluetooth systems can do that.
The .aia and the two .ino here below show how an Android device (in my example a Lenovo Pad 8" with Android release 9) can connect two ESP32 boards, one with the BLE and the second with the Classic BT.
Probably nobody will never have the need to perform such a weird connection but "never say never".

The app connects the first ESP32 via BLE in UART mode to exchange characters and the second one in Classic BT, to receive a string every 500 ms, alternated with a frame counter.
Before all, the two BT's shall be both visible to the Android device, and the classic BT shall be paired with, too. To verify that all, I suggest to use the well known ready made app Serial Bluetooth Terminal (by Kay Morich), free from playstore.
Once verified that both boards are visible by / paired with, your android device, the app can then work with both.
In my example the Classic BT board has the BT nickname "ClassicBT", therefore when the listpicker of addresses and names opens, you shall select that name to allow its pairing.
While the Classic BT is then connected automatically, hit the Scan&Connect button to connect the BLE board. Its status is then shown below the Disconnect button.
The picture below shows how the screen looks like, and some details on buttons and labels. By hitting the A,B,C buttons it is produced a sending via BLE to the BLE ESP, which on its turn, sends back the character's echo to the app.

The file below contains the picture.
Image.pdf (172.0 KB)

The .ino of the two ESP32 and the app's .aia, follow:

BLE_uart.ino (4.2 KB)
ESP32_ClassicBT_AI2.ino (1.0 KB)
BLE_Test.aia (257.4 KB)

So, if you were loosing your sleeping with this doubt (can a BLE work in parallel with a Classic BT?), now you can sleep well... :rofl: :rofl: :rofl:
All the best.

crEDITs to @Taifun for his "must have" extension 'TaifunTools' that allows to make the app always stay-on-the-screen (don't go to sleep).

4 Likes