arduino-BLEPeripheral icon indicating copy to clipboard operation
arduino-BLEPeripheral copied to clipboard

be explicit about compatible architectures

Open gtalusan opened this issue 6 years ago • 7 comments

This library is conflicting with the ESP32's BLE library because of architectures=*. Setting architectures explicitly lets me compile for both nRF52 (RedBear BLE Nano 2) and ESP32.

I'm unsure of the Teensy arch, or if it even uses library.properties, so this may need a bit of guidance.

gtalusan avatar Nov 08 '17 01:11 gtalusan

Hi @gtalusan, what's the specific conflict?

sandeepmistry avatar Nov 13 '17 01:11 sandeepmistry

Hi @sandeepmistry, the ESP32 libraries have their own BLEPeripheral library.

gtalusan avatar Nov 13 '17 02:11 gtalusan

Ok, do you have the output from a compile?

Since this library has already in the library manager for a few years, I suggest you ask them to rename to avoid the conflict.

sandeepmistry avatar Nov 21 '17 22:11 sandeepmistry

Sure, here's the output at this gist.. https://gist.github.com/gtalusan/693b511a5696723d393275e0074e4083

gtalusan avatar Nov 22 '17 06:11 gtalusan

@sandeepmistry , I agree with @gtalusan . This library is specific to certain devices. No reason to block the namespace with names such as BLEPeripheral for other boards.

ayavilevich avatar Nov 23 '17 08:11 ayavilevich

I discussed this one with @cmaglie, the ESP BLE library should have a main include, something like "ESPBLE.h", that is included before the other includes.

Then the Arduino Builder know what specific library folder to use for the other include headers. He tested changing the include order from:

#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEScan.h>
#include <BLEAdvertisedDevice.h>

to

#include <BLEScan.h>
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEAdvertisedDevice.h>

and the Arduino Builder used the correct library.

sandeepmistry avatar Jan 08 '18 00:01 sandeepmistry

genius works can confirm this works for ide version 2.2.1!!!

AdamClarkStandke avatar Nov 11 '23 04:11 AdamClarkStandke