BLE and ESP32 just a new test example (send and receive in UART Service)

Dear all,
though the great help of @juan_antonio's examples, in the past days I've been fighting against BLE and ESP32 and I've felt in multiple troubles before having it working (honestly I'm a big supporter of the older and simpler classic BT. but anyway....).
At the end I succeded to make it functioning and, since the spirit of the community is to share knowledge, I'm pleased to post my work.
You'll find annexed the .aia, the .ino and a ,pdf that shows step-by-step what I've done, the HW and SW I've used, and the explanation with plenty of images.
I hope it could be of some help.

BLE_Test.aia (248.8 KB)
BLETestAI2_uart.ino (5.9 KB)
BLE_Test.pdf (502.2 KB)

.

4 Likes

Cannot find the component: Clock_ScanForDevices

You can make your own component by dragging in an extra Clock component in the Designer and renaming it.

Look in the Sensors drawer.

i have already try but i get:
invoke: no method named `KeepScreenOn' in class java.lang.Boolean

That sounds like the kind of thing people do with extensions.

What extensions do you use, and what Companion version do you use?

Built: December 8 2024 Version: code51
Use Companion: Use Companion: 2.73a or 2.73au

and i dont use others extensions out of TaifunTools that you include in your project

and if i put another clock i get message:

Cannot find the component: Clock1

Clock_ScanForDevices is recognized only if i disable TaifunTools and interface start on phone, but i get this message:
Service 6e400001-b5a3-f393-e0a9-e50e24dcca9e, characteristic 6e400003-b5a3-f393-e0a9-e50e24dcca9e are not published by the connected device.

And also .ino file compiled with Espressif 3.1.1 give error in this 2 lines:
std::string rxValue = pCharacteristic->getValue();
std::string myStringForUnit8((char*)&rxValue[0], 1);
error on STD command, so i need use Espressif 2.0.17 with arduino Ide