Report
1 week ago.

SimpleBLE error

Hi,

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 https://os.mbed.com/teams/mbed-x/code/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**) {
    ble.start();
    while (1) {
        ble.waitForEvent();
    }
}

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 day, 18 hours 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).


To post an answer, please log in.