I have an ESP32 that works very well acting as a BLE keyboard for an app running on an Android tablet. Now I need this ESP32 to act simultaneously as a BLE server with a custom service to another ESP32 acting as client.
So after the bleKeyboard.begin(); I can add pServer2 = BLEDevice::createServer(); to create the server for that custom service, and the keyboard still works fine.
But as soon as I add the line pService2 = pServer2->createService(SERVICE_UUID); the keyboard stops sending keystrokes.
Why would this added line break the BLE keyboard service?