   Serial.println(notification.catergoryCount);
   Serial.print("\tNotification UID: ");
   Serial.println(notification.notificationUid);
-  
+
 //  BLEUtil::printBuffer(characteristic.value(), characteristic.valueLength());
 }
 
 void ancsDataSourceCharacteristicCharacteristicValueUpdated(BLECentral& central, BLERemoteCharacteristic& characteristic) {
   Serial.print(F("ANCS Data Source Value Updated: "));
-  
+
   BLEUtil::printBuffer(characteristic.value(), characteristic.valueLength());
 }
 

BLEPeripheral                    blePeripheral                            = BLEPeripheral(BLE_REQ, BLE_RDY, BLE_RST);
BLEBondStore                     bleBondStore;

// local services
BLEService                       batteryService                           = BLEService("180f");

// local characteristics
BLEUnsignedCharCharacteristic    batteryLevelCharacteristic               = BLEUnsignedCharCharacteristic("2a19", BLERead);

// remote services
BLERemoteService                 ancsService                              = BLERemoteService("7905f431b5ce4e99a40f4b1e122d00d0");
                                                                                              
// remote characteristics
BLERemoteCharacteristic          ancsNotificationSourceCharacteristic     = BLERemoteCharacteristic("9fbf120d630142d98c5825e699a21dbd", BLENotify);
BLERemoteCharacteristic          ancsControlPointCharacteristic           = BLERemoteCharacteristic("69d1d8f345e149a898219bbdfdaad9d9", BLEWrite);

  // central disconnected event handler
  Serial.print(F("Disconnected event, central: "));
  Serial.println(central.address());
}

void blePeripheralBondedHandler(BLECentral& central) {
  // central bonded event handler
  Serial.print(F("Remote bonded event, central: "));
  Serial.println(central.address());

  if (ancsNotificationSourceCharacteristic.canSubscribe()) {
    ancsNotificationSourceCharacteristic.subscribe();
  }
}

void blePeripheralRemoteServicesDiscoveredHandler(BLECentral& central) {
  // central remote services discovered event handler
  Serial.print(F("Remote services discovered event, central: "));
  Serial.println(central.address());

  if (ancsNotificationSourceCharacteristic.canSubscribe()) {
    ancsNotificationSourceCharacteristic.subscribe();
  }
}

enum AncsNotificationEventId {
