1

I am working on a BLE application using ESP32 Arduino Platform and having a concern about having 2 or more Characteristic Properties, and wonder if the statement below is valid and efficient? I've been seeing code samples with 2 properties but not with 3 or 4 properties before. I tried the code, no error, but my Android app has a problem seeing the notification.

pCharacteristic = my_BLE_service->createCharacteristic( UUID_INTENSITY, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE | BLECharacteristic::PROPERTY_NOTIFY );
pCharacteristic->setCallbacks(new MyCallbacks());

pCharacteristic->addDescriptor(new BLE2902());
pCharacteristic->addDescriptor(new BLE2902());
Serial.println(pCharacteristic->getUUID().toString().c_str());

Any thought to improve or make it better?

huynh213
  • 21
  • 2

0 Answers0