BLE RC control with ESP32-C3 Super Mini or Zero. Discover UUID and connect

Hello everyone, I just signed up to the community and have been trying to get my app going as much as I could before looking for help here. As I have arrived at a very complex moment for me, I am looking for help, please.

My intention is an app that is similar to this one:
https://play.google.com/store/apps/details?id=com.the


hlab.pc.rccar&hl=en_US

Which should control two or more ESP32-C3 (zero) or (SuperMini) Development Board.

When I write an .ino code on the ESP32-C3 I must already inform the service and characteristic UUIDs. Considering that the app must control any ESP32-C3 with its previously defined UUIDs, it is necessary for the app to be able to discover and connect to each ESP32-C3 by selecting the discoveries in a list. Function that the app listed above is capable of doing.
See the moment the app discovers the service and characteristic UUIDs (reading and writing) to connect. (attached image).

My intention is that, for example, on the main screen of the app where I will have the steering wheel, the accelerator, and some LEDs, I also want to have some buttons whose functionality is to control more than one ESP32-C3 on the same screen.
RC_BLE_3.aia (5.2 MB)

Suppose that to turn the steering wheel, accelerate and light up some LEDs I have control over ESP32-C3 number 1 inside the toy, and to activate two servo motors that, for example on a track where my RC car is running, I can control the opening of two gates that will be controlled through ESP32-C3 number 2 (example, Buttons image with number 1 and 2).

I'm going to share here my .aia project which so far is incomplete and messy, it has more than one screen, where in the secondary screens and in the configuration button is where I try to adjust the discovery and connection with more than one ESP32-C3 by discovering the UUIDs .

I have other configurations to do in the app, but I came to the conclusion that before continuing to implement features I need to ensure that it is possible to make multiple BLE connections on the same main screen of the app, or even to successfully connect with the ESP32-C3 Super Mini or Zero with any UUIDs written, this being the immediate need for me to continue with this project.

I've read all the posts here in the community that refer to BLE, UUIDs and multiple connections, unfortunately none of them fit this specific functionality that I need.

Thank you for your help with this project, as this functionality will not be restricted to this project. The ESP32-C3 modules (Zero or SuperMini) can be used in various projects, even for home automation. Its limited number of pins can be overcome by implementing multiple ESP32-C3s and being logically controlled by a single application capable of discovering, connecting and managing data sending.

The BLE component should allow for multiple instances just fine. You may run into some issues depending on how many active connections the device's hardware can multiplex at a time. Have you tried doing some simple connection tests with all your devices before investing in building the UI?

Hey dear. Thanks for answering. This is what I'm trying at the moment, but I don't know where to start to get the app to read and connect to the unknown service and characteristc. It finds BLE devices, such as my smartwhatch, but it doesn't find an ESP32-C3 SuperMini with its predefined UUIDs to ask me to connect.

Dear @Messias_Sousa,
a couple of months ago I've written a code to connect an ESP32 (fixed BLE UUID's) to an AI2 app.
You can find everything here annexed. The pdf file explains step by step both codes (ESP and AI2).
Hoping it can help.
BLE_Test.aia (248.8 KB)
BLETestAI2_uart.ino (5.9 KB)
BLE_Test.pdf (462.4 KB)

Ok, I checked your files, thanks for sharing. Unfortunately it's not what I need. Imagine that I have 5 ESP32-C3 modules here, and I am going to record an Arduino sketch on each one. So that there are no connection conflicts, each one will have its service UUID and different characteristics from each other, so what I hope is that a single application can discover and connect to each of the modules, without me needing to have 5 apps with each one having the UUID of each of the modules. My app is a remote control for RC cars, so I need a single app to control as many RC cars as I want, without interference, since the UUIDS will be defined when recording the ESP32-C3, a different UUID for each one.

Ok (probably :grin:) understood !
So you have 5 esp32 on 5 vehicles ? This means you have also 10 hands, 10 eyes 5 brains :rofl: :rofl: :rofl:,
Obviously I'm joking and I wish you success. :muscle: :muscle: :muscle:
Cheers.