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!
Manjaro Linux (Kernel: 5.14.21-2-MANJARO)
What I tried:
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…
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”.
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?
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:
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 v188.8.131.52
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.