I really don’t know what I’m doing wrong. Tried to get any of the Mbed OS BLE Examples for the NUCLEO-WB55RG Board up and running but failed hard!
My System:
Manjaro Linux (Kernel: 5.14.21-2-MANJARO)
Nucleo-WB55RG
What I tried:
Online Compiler
Compile any of the examples via Online Compiler and Drag and Drop it to the board
→ No BLE Device shows up in LightBlue App?! I have no idea what the Board is doing actually…
Mbed Studio
Cannot import example via “Import Programm”, this error shows up: “Failed to create program mbed-os-example-mbed5-blinky”
Tried importing via Online Compiler: Export (Zip Archiv), Import in Mbed Studio, set Mbed OS path, but the Target option is showing “Loading” all the time, even if I “Fixed All Problems”.
Clion
Next Try in Clion: Export from Compiler → CMake-Gcc-ARM → Import to Clion → Error: “fatal error: mbed_config.h: No such file or directory” while loading CMake Project.
Tried to fix some stuff in CMakeLists.txt next error while building: “error: ‘events’ does not name a type”
Again fixed some stuff in the CMakeLists.txt, which at least made me build the project.
Upload to the board? Somehow I managed to flash it to the board via OpenOCD but nothing happens.
Debug? Does not work: “MCU Communication Failure”
Mbed Cli 1
Tried to flash the Board but the used python side packages throw a shitload of errors again, because deprecated stuff ist used. I have python 3.10.5 installed.
Mbed CLI 2
Again some error: “KeyError: ‘supported_c_libs’”
I don’t get it, but nothing really seams to work! Is there any stable way to test the BLE functionality of the Nucleo-WB55RG Board by installing existing examples, which results in the ability to connect to the board via LightBlue or something similar?
Hi Benjamin,
I use the same board, Nucleo-WB55RG, with the BLE example applications and it works perfectly. My environment is Mbed CLI 1, GCC_ARM. I will also suggest to setup your python environment with a venv. That is what I use. And I compile like so:
When compilation completes, flashing the board is as straightforward
as copying the binary and dropping it on the enumerated USB drive for the
Nucleo-WB55RG.
I fixed the python issues and compiling on my machine is no problem now.
I followed the exact example on git but still when I drag the “BLE_Advertising.bin” File to the board nothing happens. I don’t get it?!
No Messages on Serial Plotter nor any life sign via Light Blue…
Is it normal, that the USB drive disappears for a second and when it reappears the .bin is gone?
My Boards Firmware:
FUS Version v1.2.0
STACK Version v1.14.1.1
Is it my Board (probably) or my binary which is the problem? Any further ideas?
Yes, the sequence that you observed implies the board was successfully flashed and then it reboot to run the BLE application. You will no longer see a .bin there. The act of copy and pasting the .bin simply emulates flashing to the board. So that step is good too.
I believe that BLE application does not actually output anything to the serial so that method will not tell you much. In fact in my copy of the code, I had to add a printf at the beginning in order to confirm that the application is indeed running. See below for that code so you can use it.
Now the next step is to use the BLE app on your phone to scan for the advertisements being broadcast by the board’s radio. You should see a Bluetooth device called “BATTERY”. That is your application, and that confirms that that example is indeed sending out advertisements correctly. Also check for the battery charging level… it should change.
The BLE scanner on your phone to use is nRF Connect for Mobile. Install it from the App Store. That will show you the battery level received in the advertisements for the BATTERY Bluetooth device. A good learning test is to change the code, source/main.cpp line 23 and set it to “NUCLEO-WB55RG”, save, rebuild, reflash, and see if the scanner on your phone discovers that device.
That version, which, if I recall correctly, I certainly modified somewhat and rearranged slightly, worked for me. So since we have the same target MCU, it should work for you as well.
git clone https://github.com/nuertey/Nuertey-BLE_Advertising
cd Nuertey-BLE_Advertising
mbed deploy
rebuild, reflash, retest as before...
Also Benjamin, what is your compiler? And its version? There is one thing we may still have to change to ensure that you do not see that Runtime crash.
Think that’s what my system uses… But still if I use the online compiler, same error.
By now I suspect my Board. But still I can flash the blinky example
Maybe the BLE Stack Version?
And what is the error? Copy and paste it here. It is probably complaining about the C++20 switch due to your GCC version. If that is it, you can simply change that line to C++17
You can ignore the compiler version mismatch one; that is just a warning.
I just pushed up a new version of my_profile.json in my repo to fix your compile error. Pull it down and see if it compiles now. I think “git pull” should update that for you.
I am having a problem compiling the ble example, but i am using MBED cli 2 with mbed-tools. Is there a known issue with FEATURE BLE on a NUCLEO_WB55RG with the CLI 2? I get the same dreaded error:
++ MbedOS Error Info ++
Error Status: 0x80FF0100 Code: 256 Module: 255
Error Message: Fatal Run-time error
Location: 0x800BF85
Error Value: 0x0
Current Thread: main Id: 0x200012A0 Entry: 0x8002F51 StackSize: 0x1000 StackMem: 0x200012E8 SP: 0x20001FAC
For more info, visit: mbedos-error
– MbedOS Error Info –
ERROR booting WB controler