Hi,
I am running the typical usage example from the BLE_GROUP library as per this article.
Namely, on the central device:
#include "BLE_Group.h"
BLE_Group *group;
void callbackFunc(const char *event, const char *data)
{
Log.info("Event: %s, Data: %s", event, data);
}
void setup() {
group = new BLE_Group_Central(1); // The parameter is the groupID
group->subscribe("test", callbackFunc);
}
void loop() {
group->publish("test-central", "Some data");
}
and on the peripheral:
#include "BLE_Group.h"
BLE_Group *group;
void callbackFunc(const char *event, const char *data)
{
Log.info("Event: %s, Data: %s", event, data);
}
void setup() {
group = new BLE_Group_Peripheral(1); // The parameter is the groupID
group->subscribe("test", callbackFunc);
}
void loop() {
group->publish("test-periph", "Some Data");
}
I flash this to two argons, but nothing happens.
Things I’ve tried:
-
I’ve added Ble.on() in setup() in the hopes this turns on BLE, nothing.
-
I’ve changed groupID in both (same value=2), nothing
-
I’ve added:
SYSTEM_THREAD(ENABLED);
SerialLogHandler logHandler(LOG_LEVEL_ALL);
nothing.
- I’ve added a small delay plus an info statement in the loop: that’s the only thing I observe in the serial monitor of either.
void loop()
{
group->publish("test-central", "Some data");
Log.info("looping in central");
delay(1000);
}
-
I’ve tried a DeviceOs 3.1 Boron and no success there either
-
I’ve tried another DeviceOs 3.1 Argon and … nothing
I’m using DeviceOs 3.1 on all devices.
I know the devices’ BLE work because I tried this Body temp thermomenter example and I’m able to connect to each one of them from my phone with the NRF Toolbox app.
I read (maybe) all hits from the search on ble_group on the community forum, nothing conclusive.
How can I troubleshoot this?
Thanks!
FYI: @mariano