How to assign a callback to a BLE service's characteristic in ESP-iDF
Posted: Tue Jan 10, 2023 10:21 am
I'm not using nimBLE but in nimBLE I can use ble_gatt_chr_def struct which has ble_gatt_access_fn *access_cb that gets executed when the characteristic is read or written to. In Arduino I can do
What's the equivalent for IDF? I'm using the gatt_server_service_table example from idf tags 4.4.3.
Code: Select all
foo_char->addDescriptor(new BLE2902());
foo_char->setCallbacks(new foo_charCallbacks());