Skip to content

CurieBLE: discovering attributes of connect central fails #382

@sandeepmistry

Description

@sandeepmistry

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());
  }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions