ESP32在Arduino上有BLE的例程,可以参考例程写应用。可以看下github上ESP32的Arduino库:
https://github.com/nkolban/ESP32_BLE_Arduino/tree/6bad7b42a96f0aa493323ef4821a8efb0e8815f2