XIAO BLE wont compile ArduinoBLE- Arduino IDE

Ive been trying to set up a sensor with BLE, and from numerous youtube vids and instructionals, it is apparent this is exceptionally basic stuff. However, when i go to compile I get this error.

WARNING: library ArduinoBLE claims to run on samd, megaavr, mbed, apollo3, mbed_nano, mbed_portenta, mbed_nicla architecture(s) and may be incompatible with your current board which runs on nrf52 architecture(s).
C:\Users\erich\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCIUartTransport.cpp:33:2: error: #error “Unsupported board selected!”
33 | #error “Unsupported board selected!”
| ^~~~~
C:\Users\erich\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCIUartTransport.cpp:99:40: error: ‘SerialHCI’ was not declared in this scope; did you mean ‘Serial1’?
99 | HCIUartTransportClass HCIUartTransport(SerialHCI, 912600);
| ^~~~~~~~~
| Serial1
exit status 1
Error compiling for board Seeed XIAO nRF52840.

Editing the file to just let me run it (removing the compatibility check) results in a semi-bricked board. Following Getting Started with Seeed XIAO BLE nRF52840 (Sense) | World Smallest Nordic BLE Module - YouTube primarily, and the Seeed website for background, using ArduinoBLE should be flawless.

Whats my issue? How do i fix it?

Running Windows 10, Arduino IDE 1.8.19 (Windows Store), Latest Arduino Lib (deleted and reinstalled), 1.0.0 board drivers (need deepsleep eventually, and the latest drivers dont fix this…)

Im brand new to this so i dont have too much other clogging/settings/etc.

The code architecture of Arduino BLE is not applicable to XIAO BLE, you should not use the code of Arduino BLE, let alone try to brush the firmware of Arduino BLE, otherwise it is likely to cause XIAO BLE unavailable.

Interesting. I’ve seen YouTube tutorials with the arduino ble, and I got it to work fine with 2.6.1 board drivers.

I cannot get anything with the <ArduinoBLE.h> to compile either and I have the same error as you. The XIAO BLE getting started page shows using the ArduinoBLE library in their example here:

WARNING: library ArduinoBLE claims to run on samd, megaavr, mbed, apollo3, mbed_nano, mbed_portenta, mbed_nicla architecture(s) and may be incompatible with your current board which runs on avr architecture(s).

Apparently after installing the seeed NRF boards, and then closing the Arduino IDE, it completely removed the boards i installed https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json

Not sure why this is happening. After the board disappeared, the Arduino IDE chose some random board that obviously wasn’t compatible. Try checking this or re-installing the seeed NRF52 boards.

I am following the bluetooth getting started doc and hitting the same problem. Total newbie here, and not sure how to “brush the firmware of Arduino BLE”. Is there any doc about this?

WARNING: library ArduinoBLE claims to run on samd, megaavr, mbed, apollo3, mbed_nano, mbed_portenta, mbed_nicla architecture(s) and may be incompatible with your current board which runs on nrf52 architecture(s).
C:\Users\r12f\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCIUartTransport.cpp:33:2: error: #error "Unsupported board selected!"
   33 | #error "Unsupported board selected!"

Did you clear this issue?
I have same problem and cleared.
The reason is board driver versions.
I also did same procedure and installed version 1.0.0.
But another one said 2.6.1.
So I try “Seeed nrf52 mbed enabled boards”.
After that, the board list shows Seeed XIAO BLE nrf52 and compile was done with few minor error!

Hi, there are indeed two Seeed nRF52 cores provided. Here are the difference:
The “Seeed nRF52 mbed-enabled Boards ” supports embedded ML (or edge AI) applications, where you can use them to build TinyML projects, but you can’t use Bluetooth(BLE) function.
The “Seeed nRF52 Boards ” supports BLE(Bluetooth) function, where you can apply ultra low power consumption, but you may not use it to do embedded ML projects.

1 Like

This is very confusing and frustrating. All the tutorials instruct us to use ArduinoBLE library but that’s not compatible. The comment above that the mbed-enabled boards cannot use BLE makes no sense when the board description literally says “Seeed nRF52 mbed-enabled Boards. Boards included in this package: Seeed XIAO BLE - nRF52840, Seeed XIAO BLE Sense - nRF52840” it’s literally right in the name.
Capture

So when treating this as a non-mbed board, meaning a v1.1.0 board, ArduinoBLE is not available, the code does not compile - yet - when treating this as an mbed board, which supposedly does not support BLE, the code that references ArduinoBLE compiles fine. It’s backwards.

For the record, this all works, including the ArduinoBLE library and all the tutorials, if you set up the board as I’ve shown above, that is, as an mbed-enabled board. BLE works fine.

Unfortunately, compiling the standard Blink example against Xiao nRF52840 Sense non-Mbed fails.

Why? The Adafruit_nRFCrypto and Adafruit_TinyUSB_Arduino from /home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/libraries are empty!

I performed a clean install of the package, to no avail.

FQBN: Seeeduino:nrf52:xiaonRF52840Sense
Using board 'xiaonRF52840Sense' from platform in folder: /home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3
Using core 'nRF5' from platform in folder: /home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3

loading library from /home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/libraries/Adafruit_TinyUSB_Arduino: invalid library: no header files found
loading library from /home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/libraries/Adafruit_nRFCrypto: invalid library: no header files found
loading library from /home/USER/Projets/Arduino/libraries/Adafruit_GC9A01A: invalid library: no header files found
Detecting libraries used...
/home/USER/.arduino15/packages/Seeeduino/tools/arm-none-eabi-gcc/9-2019q4/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -c -g -Werror=return-type -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=64000000 -DARDUINO=10607 -DARDUINO_Seeed_XIAO_nRF52840_Sense -DARDUINO_ARCH_NRF52 "-DARDUINO_BSP_VERSION=\"1.1.3\"" -DNRF52840_XXAA -DUSBCON -DUSE_TINYUSB -DUSB_VID=0x2886 -DUSB_PID=0x8045 "-DUSB_MANUFACTURER=\"Seeed\"" "-DUSB_PRODUCT=\"XIAO nRF52840 Sense\"" -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DDX_CC_TEE -DLFS_NAME_MAX=64 -Ofast -DCFG_DEBUG=0 -DCFG_LOGGER=0 -DCFG_SYSVIEW=0 -I/home/USER/.arduino15/packages/Seeeduino/tools/CMSIS/5.7.0/CMSIS/Core/Include/ -I/home/USER/.arduino15/packages/Seeeduino/tools/CMSIS/5.7.0/CMSIS/DSP/Include/ -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/nordic -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/nordic/nrfx -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/nordic/nrfx/hal -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/nordic/nrfx/mdk -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/nordic/nrfx/soc -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/nordic/nrfx/drivers/include -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/nordic/nrfx/drivers/src -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/nordic/softdevice/s140_nrf52_7.3.0_API/include -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/nordic/softdevice/s140_nrf52_7.3.0_API/include/nrf52 -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/freertos/Source/include -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/freertos/config -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/freertos/portable/GCC/nrf52 -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/freertos/portable/CMSIS/nrf52 -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/sysview/SEGGER -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/sysview/Config -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/libraries/Adafruit_TinyUSB_Arduino/src/arduino -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5 -I/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/variants/Seeed_XIAO_nRF52840_Sense /home/USER/.var/app/cc.arduino.IDE2/cache/arduino/sketches/0DE58B663941714D8C6B882C4A3F4CA4/sketch/Blink.ino.cpp -o /dev/null
Alternatives for Adafruit_USBD_CDC.h: []
ResolveLibrary(Adafruit_USBD_CDC.h)
  -> candidates: []
In file included from /home/USER/.var/app/cc.arduino.IDE2/cache/arduino/sketches/0DE58B663941714D8C6B882C4A3F4CA4/sketch/Blink.ino.cpp:1:
/home/USER/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/cores/nRF5/Arduino.h:65:10: fatal error: Adafruit_USBD_CDC.h: No such file or directory
   65 | #include "Adafruit_USBD_CDC.h"
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

exit status 1

Compilation error: exit status 1
1 Like

Hi reivilo,
The following link may be helpful.
There is a problem with 1.1.3. I recommend using 1.1.1 for the time being.
"Seeed nRF52 Boards" update to 1.1.3 causes compile error

1 Like

To the Seeed team:

If release 1.1.3 does not work as expected, please remove it from GitHub - Seeed-Studio/Adafruit_nRF52_Arduino: Arduino Core for Seeed nRF52 Boards and from the boards manager of the Arduino IDE.

Thank you.

1 Like

We are sorry for the unpleasant experience. Currently, you can follow the post provided by @msfujino to resolve the issue.
Our team is working diligently to fix these problems, and a brand new version that functions properly will be released as soon as possible. Thank you for your understanding and cooperation :smiley:

When will the issue be resolved?
The blinking example over BLE still does not work/compile on nrf52840 without embedded ML. It’s so frustrating there’s some weird random keyboard example provided, but no way to control a build-in led.

Hello @pryw
Maybe you should try Seeed nRF52 Boards 1.1.8 version. It’s actually OK


I have the same versions, the code:

#include <ArduinoBLE.h>

BLEService ledService("19B10000-E8F2-537E-4F6C-D104768A1214"); // Bluetooth® Low Energy LED Service

// Bluetooth® Low Energy LED Switch Characteristic - custom 128-bit UUID, read and writable by central
BLEByteCharacteristic switchCharacteristic("19B10001-E8F2-537E-4F6C-D104768A1214", BLERead | BLEWrite);

const int ledPin = LED_BUILTIN; // pin to use for the LED

void setup() {
  Serial.begin(9600);
  while (!Serial);

  // set LED pin to output mode
  pinMode(ledPin, OUTPUT);

etc.

Does not compile for Seeed nRF52 (no embedded ml) .

WARNING: library ArduinoBLE claims to run on samd, megaavr, mbed, apollo3, mbed_nano, mbed_portenta, mbed_nicla, esp32, mbed_giga, renesas, renesas_portenta, mbed_opta, renesas_uno architecture(s) and may be incompatible with your current board which runs on nrf52 architecture(s).

Is there any analogous tutorial for Adafruit Bluefruit?

If you don’t bring the above in the light-up program, can it work?

I was able to successfully compile the program shown below without warning (from the Adafruit Bluefruit nrf52 libraries). If you still can’t compile it, we recommend that you uninstall and reinstall the 1.1.8 version of the library