This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GATT - why Read attribute callback function works only for user defined UUIDs ?



I understand that after calling GATTServApp_RegisterService , the read and write callback functions should be called when a read/ write is performed on the attributes.

However, in the simpleBlePeripheral example, I noticed that the callback function is called only when read/ write is performed on the USER DEFINED UUID's

(For example - simpleProfilechar1UUID). But when a read is performed on standart UUID's such as characterUUID , the callback function is not called. (Though the right values are returned to the client).

Is that the way it is supposed to be ? or something is working wrong in my setup ?

Thanks,

Sasha.

 

  • The reason that the callback is not called is because GATTServApp knows how to handle those types of reads, and does not need to have the profile define it. For writes, the callback will always need to handle the process. Below is a summary of the types that GATTServApp can process reads on its own.

    GATT_PRIMARY_SERVICE_UUID

    GATT_SECONDARY_SERVICE_UUID

    GATT_CHARACTER_UUID

    GATT_INCLUDE_UUID

    GATT_CHAR_EXT_PROPS_UUID

    GATT_CLIENT_CHAR_CFG_UUID (note that this will be changing in our next release; the profile will be required to handle this in the callback)

    GATT_SERV_CHAR_CFG_UUID

    GATT_CHAR_USER_DESC_UUID

    GATT_CHAR_FORMAT_UUID