sandeepmistry / arduino-BLEPeripheral

An Arduino library for creating custom BLE peripherals with Nordic Semiconductor's nRF8001 or nR51822.
MIT License
462 stars 179 forks source link

be explicit about compatible architectures #200

Open gtalusan opened 6 years ago

gtalusan commented 6 years ago

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.

sandeepmistry commented 6 years ago

Hi @gtalusan, what's the specific conflict?

gtalusan commented 6 years ago

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

sandeepmistry commented 6 years ago

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.

gtalusan commented 6 years ago

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

ayavilevich commented 6 years ago

@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.

sandeepmistry commented 6 years ago

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.

AdamClarkStandke commented 8 months ago

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