There is an architecture for the Arduino IDE called "esp32". This library adds BLE support. Please add it to the library manager list. Url: https://github.com/nkolban/ESP32_BLE_Arduino