Help on designing a BLE project architecture

Hi all,
I want to make my first BLE project with ESP32's on Arduino, but I am not really sure how to design it. I just wanted to make this post to help me get started the right way.

I have 2 sensors that need to talk to each other, both can send packets. One has a UI (LCD and buttons) and I call it the master, while the other is passive and takes settings from the sensor 1 the user can operate.

I want to know what would be the ideal way to design this project, knowing I might also want too add a bluetooth connection with a cellphone. The cellphone would be used to collect data from the sensors system.

Which device(s) would be servers and clients in this situation?
Should the sensor 1 be a client and sensor 2 a server? Can sensor 1 be set as a client for sensor 2, but as a server for the cellphone?
Is it possible at all to have a bluetooth connection between these 3 components at the same time?


Thanks a lot!

Check out the my BLE to WiFi bridge project. It uses Adafruit BLE as a central connecting to a peripheral. Then via ESP8266 WiFi to a mobile.
Also check out my Room Heater controlled by BLE sensor which does a similar thing.
All these projects essentially set up a UART connection and so avoids all the special Characteristics mess.
Unfortunately neither of these use ESP32 as a Central, but my free pfodDesigner app will generate ESP32 UART peripheral code for you
Not sure is you get the ESP32 to both central and peripheral at the same time OR BLE and WiFi at the same time. Your mobile need to talk to the central unit as the peripheral will only accept one connection. The mobile is usually the central connection to a peripheral, see the Nordic nRF UART Android app.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.