Merge pull request #4 from comoc/add-cccd-2902

add BLE2902
(to accept notify registration at the client.)
This commit is contained in:
lathoub 2018-12-23 13:39:42 +01:00 committed by GitHub
commit d36f526949
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -202,6 +202,9 @@ bool BleMidiInterface::begin(const char* deviceName)
BLECharacteristic::PROPERTY_NOTIFY | BLECharacteristic::PROPERTY_NOTIFY |
BLECharacteristic::PROPERTY_WRITE_NR BLECharacteristic::PROPERTY_WRITE_NR
); );
// Add CCCD 0x2902 to allow notify
_characteristic->addDescriptor(new BLE2902());
_characteristic->setCallbacks(new MyCharacteristicCallbacks(this)); _characteristic->setCallbacks(new MyCharacteristicCallbacks(this));
// Start the service // Start the service
service->start(); service->start();