Xiao nRF52840 Sense bluetooth example not working

Hi all,

I attempted to follow this tutorial with my Xiao nRF52840 Sense, but I am unable to get it working.

First off, the Seeed nRF52 Boards configuration for the Arduino IDE, v. 1.1.3, seems to be broken - I saw some mention of this elsewhere but didn’t explicitly see reference to the following:

  • Inside the package folder, inside libraries (e.g. ~/.arduino15/packages/Seeeduino/hardware/nrf52/1.1.3/libraries/ on linux), the Adafruit_TinyUSB_Library and the Adafruit_nRFCrypto library are empty.
  • Some header files are missing from ../cores/nRF5, among which are Adafruit_USBD_CDC.h, Adafruit_TinyUSB_API.h and Adafruit_USBD_Interface.h but there might be more, these are just the ones I copied from the Tiny USB library to fix the compilation issues with the board software.

Installing the above libraries separately and copying the required headers I managed to get the blink example to work. There’s still an issue though: when I upload the program to the board, the board is no longer recognized by the pc. The only way to see it again is to double tap the reset button and enter the boot loader mode.

I was not able to get the bluetooth example to work at all. The compilation and upload don’t throw any errors but, as above, as soon as the program is uploaded to the board, the board disconnects. I am then unable to find the board with the bluetooth scan or start the serial monitor (for the latter issue, I tried entering the boot loader mode so the board is recognized again by the pc and open the monitor that way, but I’m quite sure this is not the right way, I don’t think the flashed program gets executed in boot loader mode).

Important detail: everything works just fine with the Seeed nrf52 mbed-enabled Boards Library, both the blink, the IMU and the bluetooth examples compile without any issue.

Welcome to the club!

Please have a look at the thread XIAO BLE wont compile ArduinoBLE- Arduino IDE.

There are two packages available for the Xiao nRF52840

1 Like

Thanks @reivilo, marking your reply as solution, although the 1.1.3 issue is still unresolved, i.e. it’s unclear why I would get an unresponsive device despite adding the correct library and headers by hand. Hope someone can comment on that, or that it’ll be resolved in a future release of the Seeed nRF52 Boards.