This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

GATT service bt_gatt_notify argument const structbt_gatt_attr*attr

Hello,


I'm making an own service with a notify.

When I look at the bas service there is the following line to trigger the notifty:

rc = bt_gatt_notify(NULL, &bas.attrs[1], &level, sizeof(level));

Because I have serveral characteristics and the notify is not on the top.

The index of [1] should not be okay.

How can I determine the attribute index of my service?

Is there a easier way to join this, because when I add some attributes the index could change.


Greetings,

Peter

Parents Reply Children
No Data
Related