Send data via BLE to smartphone using BLE_Client example code.

Hi everyone,

I wanted some help on a small task that I am working on. The requirement scenario is such that I have two ESP32 Development Kits about 5 meter apart from each other inside a room. Each development kit has up to 5 sensors attached to it. Both boards are reading data from the sensors. The end requirement is to push the data to smartphone application via BLE.

I came across the BLE_Server and BLE_Client examples in the following library

I uploaded the two examples and found that data can be easily transferred from BLE_Server ESP32 to a BLE_Client ESP32. However, in order to send data to a smartphone application, I believe I will need to reconfigure the ESP32 as Server. If I am correct in this assumption, can someone please guide me how to do it? Is there some reboot methodology that I should follow? Otherwise, what would be the best possible way to achieve my goal?

Any help is highly appreciated.

Warm regards,
Huzaifa Ali