This Bare Metal Program uses C programming language that enables a custom designed STM32F4 to communicate with the BLE of ESP32. This code contains BLE algorithm for wake up,scanning and filtering.
UART Communication knowledge
Array
Understand those, and you can use this anyway you want.