1 year ago.

SimpleBLE error


I'm having troubles with the SimpleBLE library. Every time I try to compile the Project, I'm getting 2 errors:

  • Error: Too few arguments in function call in "main.cpp", Line: 9, Col: 16
  • Error: Class "SimpleBLE" has no member "waitForEvent" in "main.cpp", Line: 11, Col: 14

The project consists of example code from the homepage of SimpleBLE

#include "mbed.h"
#include "SimpleBLE.h"
SimpleBLE ble("DEVICE_NAME"); // second argument is the advertisement interval (default: 1000 ms.)
// variables here!
int main(int, char**) {
    while (1) {

I'm using X-NUCLEO-IDB05A1 so I imported the X-NUCLEO-IDB0XA1 library. mbed, SimpleBLE and BLE_API were imported as well. I'm using the L476RG board.

Am I missing something? Please help

Comment on this question

1 Answer

1 year ago.

Which SimpleBLE revision are you using? If you're on Mbed 2, use 15329a3de04c, not latest.

Alternatively, use SimpleBLE-Example-mbedos5 which compiles fine for L476RG (but have not tested whether it actually works as I don't have the shield with me).

Thank you so much for your answer! The version I'm using is the Mbed 5. Your project " SimpleBLE-Example-mbedos5" seems to work now.

But how do I send and receive messages with the help of this library? In other words I wanna receive some string and react to it by sending back an another string?

posted by B D 20 Feb 2018

To post an answer, please log in.