This is an example of using the ESP32 IDF SDK to scan for bluetooth devices, and send notifications to an mqtt topic.
Install platformio to build.