chore: add granular debug prints around BLE characteristic/descriptor creation to pinpoint crash
This commit is contained in:
@@ -69,18 +69,25 @@ bool BleMidiTransport::begin() {
|
||||
}
|
||||
|
||||
Serial.println("[BLE] Creating characteristic...");
|
||||
Serial.flush();
|
||||
ble_char = ble_service->createCharacteristic(
|
||||
BLE_MIDI_CHAR_UUID,
|
||||
NIMBLE_PROPERTY::READ |
|
||||
NIMBLE_PROPERTY::WRITE_NR |
|
||||
NIMBLE_PROPERTY::NOTIFY
|
||||
);
|
||||
Serial.println("[BLE] characteristic pointer ok");
|
||||
if (!ble_char) {
|
||||
Serial.println("[BLE] FAILED to create characteristic");
|
||||
return false;
|
||||
}
|
||||
Serial.println("[BLE] Creating descriptor...");
|
||||
Serial.flush();
|
||||
ble_char->createDescriptor(BLEUUID((uint16_t)0x2902), NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE);
|
||||
Serial.println("[BLE] Descriptor created");
|
||||
Serial.println("[BLE] Setting callbacks...");
|
||||
ble_char->setCallbacks(new CharCallbacks());
|
||||
Serial.println("[BLE] Callbacks set");
|
||||
|
||||
Serial.println("[BLE] Starting service...");
|
||||
ble_service->start();
|
||||
|
||||
Reference in New Issue
Block a user