I am writing a BLE peripheral using the NimBLE API in esp-idf. All the code I can find store values of characteristics in variables, not in anything NimBLE can access.
However, there is the function ble_gatts_chr_updated in https://mynewt.apache.org/latest/network/ble_hs/ble_gatts.html.
I would like to use that but I have no idea how to specify the value I want to send in the notification.
One ESP-IDF example uses ble_gattc_notify_custom
, but that seems wrong as I think the c there stands for client and a peripheral is a server.
Have I misunderstood something, or is NimBLE just broken?