BLE implementation and BLE concept relation.
Posted: Tue Jul 18, 2023 10:45 am
In BLE there are concepts of profile, service, characteristic, and description.
A profile consists of multiple services,
A Service consists of multiple characteristics,
And each characteristic has some information and descriptions
According to the official examples; (https://github.com/espressif/esp-idf/bl ... through.md and others), there is `esp_gatts_attr_db_t`, and `application id`. What it seems like the application id is meant to allow multiple "profiles" in a device. I got it.
However, what about `esp_gatts_attr_db_t`? Is this meant to represent a service? of a profile?. It seems it could be used to represent a profile since it could have multiple service handles. But is this idiomatic usage? In this case, what order does the list of `esp_gatts_attr_db_t` should be consisted of? Or should one make a list of `esp_gatts_attr_db_t` to represent "a" service, and make a list of list of `esp_gatts_attr_db_t` to represent a profile?
In this case, what is the unit that calls back should be associated with? It seems after the registration, creation, and start of services, the r/w event is dispatched based on the handles. So I guess it could be either per attribute (not likely) or per service (in case attr_db represents profile, multiple services and call back will handle all the tasks related to underlying handles.) or per application or profile?
Is an application meant to represent a profile?
I am so confused about these relationships Please enlighten me.
A profile consists of multiple services,
A Service consists of multiple characteristics,
And each characteristic has some information and descriptions
According to the official examples; (https://github.com/espressif/esp-idf/bl ... through.md and others), there is `esp_gatts_attr_db_t`, and `application id`. What it seems like the application id is meant to allow multiple "profiles" in a device. I got it.
However, what about `esp_gatts_attr_db_t`? Is this meant to represent a service? of a profile?. It seems it could be used to represent a profile since it could have multiple service handles. But is this idiomatic usage? In this case, what order does the list of `esp_gatts_attr_db_t` should be consisted of? Or should one make a list of `esp_gatts_attr_db_t` to represent "a" service, and make a list of list of `esp_gatts_attr_db_t` to represent a profile?
In this case, what is the unit that calls back should be associated with? It seems after the registration, creation, and start of services, the r/w event is dispatched based on the handles. So I guess it could be either per attribute (not likely) or per service (in case attr_db represents profile, multiple services and call back will handle all the tasks related to underlying handles.) or per application or profile?
Is an application meant to represent a profile?
I am so confused about these relationships Please enlighten me.