Content of att_db

Hello: I am trying to understand the entries that should be defined in the att_db. I am starting with the ble_peripheral_server_bond example.

  • I see that the first item defines the service UUID.
  • The second item is commented as “To BLE Transfer”. Am not sure about this one. Do we need one of these for every characteristic that we can read from the BLE device?
  • Is there any documentation that describes every entry that is needed in the att_db given read and write characteristics in a custom service? I am trying to define my own custom service starting with the example I mentioned, but I am missing this critical information.

@andy1

Question 1: The second item is commented as “To BLE Transfer”. Am not sure about this one. Do we need one of these for every characteristic that we can read from the BLE device?

Answer: Based on this description “we can read from the BLE device”.
I think that your device is central device, is this correct? If so , why are you using ble_peripheral_server_bond for reference?

A. Client side of the API, it provides operation to discover, read and modify peer device attribute database and convey value modification events to registered profiles/applications.

B. Server side of the API, provides procedure to inform profile service about read or modification request of attributes, and for profile to inform peer device that an attribute value changes.

Please reference: ceva document folder – RW-BLE-GATT-IS.pdf

If your device is peripheral device, the “To BLE Transfer” has two options. One is the buffer length is 20 bytes and another is 40 bytes. You can select one of those for central device (phone) to read.
and “To BLE Transfer” also define TX buffer and RX buffer size.

Thank you for using our community forum!