ESP32 can communicate with other device via Bluetooth using the module HC-06 as slave. This code is written in micropython using the EsPy development environment. (https://github.com/jungervin/EsPy)
You can configuring the module HC-06 by runnig the file BT_setup.py In this progran you can verify that the hardware is working.In this program you can modify parameters such as name, PIN code and communication speed in baudrate.
To pair the module HC-06 to the device run the file BT_hc06.py
You can communicate between 2 controllers using the code example: BT_hc06_READ_DATA.py and BT_hc06_SEND_DATA.py