espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.2k stars 7.34k forks source link

Document or resolve divergence from ArduinoBLE API #8969

Open rgov opened 8 months ago

rgov commented 8 months ago

Related area

BLE

Is your feature request related to a problem?

The official Arduino library for Bluetooth Low Energy is ArduinoBLE. The ArduinoBLE API is wholly distinct from the Arduino-ESP32 BLE library. Bluetooth code is not portable between ESP32 Arduino Core and Arduino devices.

Describe the solution you'd like

If the goal of Arduino-ESP32 is to allow Arduino code to run on ESP32 devices, it should implement the ArduinoBLE API.

If the intent is not to be compatible with Arduino code, since the BLE library is not really related to Arduino in any way, should it really be part of this project as opposed to a standalone BLE library that can be used with any ESP-IDF project?

The documentation does say, "the Arduino ESP32 supports the following peripherals with Arduino APIs" but on the same page calls them "unique APIs", so it's unclear what the intention is.

I have checked existing list of Feature requests and the Contribution Guide

rgov commented 8 months ago

I ported my Arduino-ESP32 BLE code over to ArduinoBLE on my ESP32-PICO-D4 (M5Stack Atom Lite) and I was surprised to find that it works fine. (However it may not support all ESP32 boards.)

P-R-O-C-H-Y commented 8 months ago

@rgov You can check the External library testing result, to see what SoCs are compiled without errors on the ArduinoBLE library.