-
-
Notifications
You must be signed in to change notification settings - Fork 283
Closed
Description
When running the following sketch, and connecting from LightBlue on my Mac, discovering attributes of the connected central fails:
#include <CurieBLE.h>
void setup() {
Serial.begin(9600);
while(!Serial);
BLE.begin();
BLE.advertise();
}
void loop() {
BLEDevice central = BLE.central();
if (central) {
Serial.print("Central connected: ");
Serial.println(central.address());
if (central.discoverAttributes()) {
Serial.println("Discovered attributes");
} else {
Serial.println("Discovering attributes failed!");
}
while(central.connected()) {
}
Serial.print("Central disconnected: ");
Serial.println(central.address());
}
}