March 16, 2023, 12:29am
Set the mbed-os version to 5.15.0 in the project,
The path inside mbed-os is features/FEATURE_BLE/ble/gap/Events.h.
In this Events.h, there is a function called getRssi().
I want to use this function to receive and output the Rssi value.
But I don’t know how to use that function in main.
Including it in the default gives me the following error:
I don’t know what to do.
And when I click Events.h, I get an error like this.
March 16, 2023, 5:50am
no one can help when you stop communicate
How to use getRssi() - Keil Studio - Arm Mbed OS support forum
Usually is good to share necessary steps how to reproduce your issue. For exaple
Now is your turn…
BTW some times is good ignore reported errors from clang and try to compilation instead.
March 21, 2023, 12:17am
Oh sorry I tried to build but it kept failing.
features/FEATURE_BLE/ble/gap/Events.h in mbed-os.
I didn’t know how to include Events.h in this path.
After several attempts, I included in this way, but a red line appeared.
When I ignored it and built it, the problem was that there was a red line in ble/blecommon.h in the Events.h code.
ble/blecommon.h is in this path.
The header file is in that path, but I don’t know why there is a red line in the code
March 21, 2023, 6:09am
this is not what I wanted, you write ± still same thing.
Look to this example
mbed-os-example-ble-GAP - Demonstration of the GAP profile. It shows advert… | Mbed
there the main include just these files
and on the line 431 is event.getRssi() called.
So delete your include of
features/FEATURE_BLE/ble/gap/Events.h and use something of this.
Ofc mbed_app.json need to modified -
mbed-os-example-ble-GAP - Demonstration of the GAP profile. It shows advert… | Mbed, something like