ricardoquesada / bluepad32

Bluetooth gamepad, mouse and keyboard support for ESP32 and PicoW
https://bluepad32.readthedocs.io/
Other
503 stars 53 forks source link

Migrate BT service from hardcoded in .gatt file to a dynamic one #109

Open ricardoquesada opened 1 week ago

ricardoquesada commented 1 week ago

It should be possible for add new characteristics in runtime.

Perhaps the .gatt can be still used , in addition to the runtime feature... or perhaps not.

Look at Arduino wrapper for BTstack which contains code that register service / characteristics in runtime. https://github.com/bluekitchen/btstack/blob/2b49e57bd1fae85ac32ac1f41cdb7c794de335f6/port/arduino/BTstack.cpp

or it could be used using: https://github.com/bluekitchen/btstack/blob/master/src/ble/att_db_util.h

Discussion here: https://discord.com/channels/775177861665521725/1242138144745324584