Hi,
Based on the sample128 example you provide, I am building my own proprietary profile. When it comes to using the function attmdb_add_service(), some doubts arise...
Let's stick to the current example. There are 2 128-bit UUID characteristics (one RW, one RW+ntf).
In sample128_task.c, there is a function called _create_db_req_handler() where the database is filled. Here is my understanding concerning the way attmdb_add_service() is used:
- nb_att_16 = 4 (am I right in the following description?)
_ 1*Primary service declaration (UUID16 = 0x2800)
_ 2*Characteristic declarations (UUID16 = 0x2803)
_ 1*Client Characteristic configuration (UUID16 = 0x2902)
- nb_att_32 = 0
- nb_att_128 = 2
_ 2 UUID128 characteristics
Why nb_att_128 = 2 while there are 3 UUID128 items (2 characteristics and the service itself)?
Concerning the way a service is implemented, why did you chose attmdb_add_service() function for sample128? Almost all available profiles are based on attm_svc_create_db(). Is there a way easier than the other one?
Thanks,
Matt
Hello Matt,
Yes, the other method is easier, which most already implemented services utilize. However, I don't think you cannot have 128-bit services with the easier method, at least with easy modifications (based on my findings).
Still, I think it is better to use the easier method for creating services.
Hi, VesaN, could please explain more details of attm_svc_create_db() method here?
Hi summer20100514,
this is the description found in attm_db.h:
Thanks!
I have read this before, but thank you all the same.