training_02_custom_profile_example problem

4 posts / 0 new
Last post
RandyYu
Offline
Last seen:2 years 11 months ago
加入:2015-01-28 08:49
training_02_custom_profile_example problem

when I flow the training_02_custom_profile_example sheet to learn the sdk 5.0.3,there has a error after compile "identifier "att_decl_char" is undefined and identifier "att_decl_cfg" is undefined identifier "att_decl_user_desc" is undefined " ect,training_02_custom_profile_example does not define this.
Thanks

Device:
MT_dialog
Offline
Last seen:3 months 1 week ago
Staff
加入:2015-06-08 11:34
Hi RandyYu,

Hi RandyYu,

I ve went through the tutorial starting by the ble_app_profile project, i didn't run into the mention, have you been trying with the template project ? If that is the case the need to add those definitions, you can take as an example the ble_app_profile, you need to add the following lines:

static const uint16_t att_decl_svc = ATT_DECL_PRIMARY_SERVICE;
静态常量uint16_t att_decl_char = ATT_DECL_CHARACTERISTIC;
static const uint16_t att_decl_cfg = ATT_DESC_CLIENT_CHAR_CFG;
static const uint16_t att_decl_user_desc = ATT_DESC_CHAR_USER_DESCRIPTION;

Thanks MT_dialog

JBaczuk
Offline
Last seen:1 year 9 months ago
加入:2014-12-31 23:41
The documentation for this

The documentation for this tutorial says to use the ble_app_peripheral project. The documentation says to add code into the user_custs1_impl.h file, but this file does not exist in the ble_app_profile project. I'm confused about which project to use.

MT_dialog
Offline
Last seen:3 months 1 week ago
Staff
加入:2015-06-08 11:34
Hi JBaczuk,

Hi JBaczuk,

For the 5.0.3 SDK that the tutorial is based, the ble_app_peripheral project has an implementation for the profiles supported, so the user_custs1_impl.h file is a custom file and not a file of the SDK. On the ble_app_profile project there is no implementation for the characteristics, all the functionallity of the project is to expose the characteristics of the custom service and nothing more. That means that you are going to be able to connect and see the services and characteristics of the custom service, but with the ble_app_profile, you are not going to be able to interact with those characteristics but with the ble_app_peripheral you are going to be able to do so. On what project you should use that depends on your goal, if you have experience on how to create callbacks when the user interacts with the service and you need a clean custom implementation then you could use the ble_app_profile but if you are just starting to get familiar with the custom service, then you should spend some time with the ble_app_peripheral in order to learn.

Thanks MT_dialog