ArduinoBLE for Nicla Sense ME

I get a warning and a lot error messages:

Arduino: 1.8.15 (Windows 10), Board: "Nicla Sense ME"

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

Where can I find the right BLE library?

arm-none-eabi-g++: error: sketch\sketch_nov09b.ino.cpp: No such file or directory

arm-none-eabi-g++: warning: '-x c++' after last input file has no effect

arm-none-eabi-g++: fatal error: no input files

compilation terminated.

Multiple libraries were found for "ArduinoBLE.h"

Used: D:\ArduinoSketches\libraries\ArduinoBLE

Not used: D:\ArduinoSketches\libraries\arduino_933146

exit status 1

Error compiling for board Nicla Sense ME.

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

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:45:13: error: 'vendor' in namespace 'ble' does not name a type

extern ble::vendor::cordio::CordioHCIDriver& ble_cordio_get_hci_driver();

         ^~~~~~

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp: In static member function 'static ble::CordioHCIDriver& ble::vendor::cordio::CordioHCIHook::getDriver()':

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:52:22: error: 'ble_cordio_get_hci_driver' was not declared in this scope

           return ble_cordio_get_hci_driver();

                  ^~~~~~~~~~~~~~~~~~~~~~~~~

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp: In static member function 'static ble::CordioHCITransportDriver& ble::vendor::cordio::CordioHCIHook::getTransportDriver()':

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:56:34: error: 'ble::CordioHCITransportDriver& ble::CordioHCIDriver::_transport_driver' is private within this context

           return getDriver()._transport_driver;

                              ^~~~~~~~~~~~~~~~~

In file included from D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:23:0:

C:\Users\info\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\2.9.9\cores\arduino/mbed/connectivity/FEATURE_BLE/include/ble/driver/CordioHCIDriver.h:230:31: note: declared private here

 CordioHCITransportDriver& _transport_driver;

                           ^~~~~~~~~~~~~~~~~

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp: In static member function 'static void ble::vendor::cordio::CordioHCIHook::setDataReceivedHandler(void ()(uint8_t, uint8_t))':

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:60:36: error: 'static void ble::CordioHCITransportDriver::set_data_received_handler(ble::CordioHCITransportDriver::data_received_handler_t)' is private within this context

           getTransportDriver().set_data_received_handler(handler);

                                ^~~~~~~~~~~~~~~~~~~~~~~~~

In file included from D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:22:0:

C:\Users\info\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\2.9.9\cores\arduino/mbed/connectivity/FEATURE_BLE/include/ble/driver/CordioHCITransportDriver.h:77:17: note: declared private here

 static void set_data_received_handler(data_received_handler_t handler);

             ^~~~~~~~~~~~~~~~~~~~~~~~~

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:60:69: error: 'static void ble::CordioHCITransportDriver::set_data_received_handler(ble::CordioHCITransportDriver::data_received_handler_t)' is private within this context

           getTransportDriver().set_data_received_handler(handler);

                                                                 ^

In file included from D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:22:0:

C:\Users\info\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\2.9.9\cores\arduino/mbed/connectivity/FEATURE_BLE/include/ble/driver/CordioHCITransportDriver.h:77:17: note: declared private here

 static void set_data_received_handler(data_received_handler_t handler);

             ^~~~~~~~~~~~~~~~~~~~~~~~~

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp: At global scope:

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:73:36: error: variable or field 'init_wsf' declared void

void init_wsf(ble::vendor::cordio::buf_pool_desc_t& buf_pool_desc) {

                                ^~~~~~~~~~~~~~~

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:73:36: error: 'buf_pool_desc_t' is not a member of 'ble::vendor::cordio'

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:73:36: note: suggested alternative:

In file included from D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:23:0:

C:\Users\info\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\2.9.9\cores\arduino/mbed/connectivity/FEATURE_BLE/include/ble/driver/CordioHCIDriver.h:36:8: note: 'ble::buf_pool_desc_t'

struct buf_pool_desc_t {

    ^~~~~~~~~~~~~~~

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:73:53: error: 'buf_pool_desc' was not declared in this scope

void init_wsf(ble::vendor::cordio::buf_pool_desc_t& buf_pool_desc) {

                                                 ^~~~~~~~~~~~~

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:73:53: note: suggested alternative: 'os_pool_def'

void init_wsf(ble::vendor::cordio::buf_pool_desc_t& buf_pool_desc) {

                                                 ^~~~~~~~~~~~~

                                                 os_pool_def

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp: In member function 'virtual int HCICordioTransportClass::begin()':

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:182:24: error: 'buf_pool_desc_t' is not a member of 'ble::vendor::cordio'

ble::vendor::cordio::buf_pool_desc_t bufPoolDesc = CordioHCIHook::getDriver().get_buffer_pool_description();

                    ^~~~~~~~~~~~~~~

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:182:24: note: suggested alternative:

In file included from D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:23:0:

C:\Users\info\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\2.9.9\cores\arduino/mbed/connectivity/FEATURE_BLE/include/ble/driver/CordioHCIDriver.h:36:8: note: 'ble::buf_pool_desc_t'

struct buf_pool_desc_t {

    ^~~~~~~~~~~~~~~

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:183:12: error: 'bufPoolDesc' was not declared in this scope

init_wsf(bufPoolDesc);

        ^~~~~~~~~~~

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:183:12: note: suggested alternative: 'osPoolDef'

init_wsf(bufPoolDesc);

        ^~~~~~~~~~~

        osPoolDef

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:183:3: error: 'init_wsf' was not declared in this scope

init_wsf(bufPoolDesc);

^~~~~~~~

D:\ArduinoSketches\libraries\ArduinoBLE\src\utility\HCICordioTransport.cpp:183:3: note: suggested alternative: 'wait_ns'

init_wsf(bufPoolDesc);

^~~~~~~~

wait_ns

Multiple libraries were found for "ArduinoBLE.h"

Used: D:\ArduinoSketches\libraries\ArduinoBLE

Not used: D:\ArduinoSketches\libraries\arduino_933146

exit status 1

Error compiling for board Nicla Sense ME.

Hi @ckuehnel

You can ignore this. The warning is only because the library's metadata didn't specify compatibility with the architecture of the Nicla, but it is the right library. This metadata deficiency has already been resolved, but there just hasn't been a release since that time. So it will no longer be displayed after the next release comes out.

From this error, I can see you are using a very outdated version of the ArduinoBLE library.

It looks like maybe you tried to update it but the update failed leaving the library in this temporary "arduino_933146" folder:

Please try this:

  1. Delete this folder from your computer:
    D:\ArduinoSketches\libraries\ArduinoBLE
    
    :warning: Please be very careful when deleting files from your computer. When in doubt, back up!
  2. Delete this folder from your computer:
    D:\ArduinoSketches\libraries\arduino_933146
    
  3. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE menus.
  4. Wait for the update to finish.
  5. In the "Filter your search" field, type arduinoble.
  6. Press Enter.
  7. Scroll down through the list of libraries until you see "ArduinoBLE by Arduino". Click on it.
  8. Click the Install button.
  9. Wait for the installation to finish.
  10. Click the Close button.

Now try compiling your sketch again. You will still get that architecture warning, but hopefully the errors will be fixed.

Hi @in0

Thanks for fast feedback. I sounds understandable.
I try this tommorow.

Best regards, Claus

Hi @in0

It works now.
Thanks for support.

Claus

You're welcome. I'm very glad to hear it is working now!
Enjoy that shiny new Nicla Sense ME!