lancaster-university / microbit-v2-samples

CODAL build tools and sample programs for the micro:bit v2.x
MIT License
68 stars 88 forks source link

BLE advertising correct and connection does not work #22

Closed semakers closed 3 years ago

semakers commented 3 years ago

I am trying to use the example of ble test, this is my code in main.c

#include "MicroBit.h"
#include "samples/Tests.h"

MicroBit uBit;

int main()
{
    uBit.init();
    uBit.bleManager.init("example", uBit.getSerial(), uBit.messageBus,uBit.storage, true);
    uBit.bleManager.advertise();
    ble_test();
}

The advertising happens correctly, but the connection is not specified and therefore I cannot see the services and characteristics of my micro: bit v2.

It's a mistake? or am I doing something wrong in my code?

semakers commented 3 years ago

I realized that I was misusing the example of ble, sorry for stealing your time with my problem