esp32-snippets icon indicating copy to clipboard operation
esp32-snippets copied to clipboard

Standard BLE on ESP32 can only support 4 notifications on 4 characteristics

Open dirkenstein opened this issue 1 year ago • 0 comments

I am building a BLE HID keyboard/mouse client. It is trying to talk to a Rii mini keyboard v3.

Ideally this would have 5 notifications for battery + 4 HID report characteristic instances (keyboard, media keys, mouse, and something under report ID 6 which is not in the HID map, but i suspect are the remote contol keys).

It looks like the default ESP32 IDF only supports maximum 4 notifications, so using this keyboard simultaneouly with any other device is not really going to work.

The issue is that addtional notifications appear to fail silently. it is capable of logging an error, based on the BLERemoteCharacteristic.cpp code, though i never saw it in serial debug, but registerForNotify() itself cannot return errors.

Is there any chance of upping CONFIG_BT_ACL_CONNECTIONS from 4 to something like 8 in the esp32 sdkconfig? I can do it manually using the esp builder scripts from expressif but it's quite fiddly and the silent failure isn't really helpful. Also, i have no idea if the memory/cpu usage effects of increasing this are sufficient to make it undesirable.

Tested on Wemos LOLIN32 Lite (ESP32-WROOM).

dirkenstein avatar Feb 28 '24 18:02 dirkenstein