Peripheral (LED) advertise()...
BLEService ledService("19B10000-E8F2-537E-4F6C-D104768A1214"); // BLE LED Service
BLEByteCharacteristic switchCharacteristic_RX("19B10001-E8F2-537E-4F6C-D104768A1214", BLERead | BLEWrite);
BLECharCharacteristic switchCharacteristic_TX("19B10002-E8F2-537E-4F6C-D104768A1214", BLERead | BLENotify | BLEIndicate| BLEBroadcast);
Central
// retrieve the LED characteristic
...
Serial.println("Peripheral does have LED characteristic_TX!");
c_TX.setEventHandler(BLEWritten| BLENotify, rec_Written_Hnd);
void rec_Written_Hnd(BLEDevice d, BLECharacteristic c_TX) {
Serial.print("Characteristic event, written: ");
Serial.println("Characteristic received: len=" +
String(c_TX.valueLength()));
const unsigned char* uc = c_TX.value();
Serial.println(*uc);
}
callback function never triggered
Thanks