⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
moritz.schnaufer
Offline
Last seen:2 years 2 months ago
加入:2018-12-04 07:06
Add Characteristic

Hey,
I tried your tutorial:"Create A Custom Profile Characteristic"But when I tried to create a new characteristic I noticed, that most of the steps has been done already and that is step 13 my code has an error. There is no att_decl_user_desc. I added it to my code like this:
static const uint16_t att_decl_user_desc = ATT_DESC_CHAR_USER_DESCRIPTION;

但当我试着俄文n my code the Debugger always stops in the nmi_handler.c in this line:
__asm("BKPT #0\n");
It says that when you reach this point it's due to a Watch Dog timeout

I have done it step by step and thought that I have done everything like it's supposed to be and don't know what to do anymore. I checked it multiple times and everytime it's behaving the same.

I'm using:
DA14585
SDK 6.0.10.511
ble_app_profile

Thank you for your help in advance.

Device:
PM_Dialog
Offline
Last seen:1 day 10 hours ago
Staff
加入:2018-02-08 11:03
Hi moritz.schnaufer,

Hi moritz.schnaufer,

I followed step by step the tutorial and I am not able to replicate your issue. Could you please make sure that you follow exactly the steps described in this tutorial? What do you mean that you have added this into your code? The att_decl_user_desc is already added into the user_custs1_def.c. Also, the step 13, is quite different from the code snippet that you have posted. Can you please clarify which your problem is in order to try to replicate it and provide you the correct guidelines?

Thanks, PM_Dialog

moritz.schnaufer
Offline
Last seen:2 years 2 months ago
加入:2018-12-04 07:06
Hey,

Hey,

thank you for the response. The Problem I have and tried to describe is:
I followed the tutorial step by step and was not able to create a new characteristic without fixing the att_decl_user_desc. I tried to fix this with the code snippet (this one:static const uint16_t att_decl_user_desc = ATT_DESC_CHAR_USER_DESCRIPTION;) I wrote. After I fixed the code I was not able to work with the board because it allways jumped into the nmi_handler.c .

I have to say, that I'm a bit confused. You said that the att_decl_user_desc is already defined but the compiler is in my case unable to find it. In my clean verison of the SDK the att_decl_user_desc is not defined. Am I using the wrong SDK?

My Goal is to create a characteristic

My approach is:
I deleted the old project and whole SDK and extracted it again from your Zip-File. I followed all the steps till (including) 12. To this point I don't have any errors just some warnings but they are just for unused references. At this point I don't care about them. But when I do the step 13 (from slide 25) the compiler is not creating the target and I get 3 errors.

Build Output:
compiling user_custs1_def.c...
..\src\custom_profile\user_custs1_def.c(307): error: #20: identifier "att_decl_user_desc" is undefined
[CUST1_IDX_YOUR_CONTROL_POINT_USER_DESC] = {(uint8_t*)&att_decl_user_desc,ATT_UUID_16_LEN,PERM(RD,ENABLE),
..\src\custom_profile\user_custs1_def.c(307): error: #44: expression must have pointer type
[CUST1_IDX_YOUR_CONTROL_POINT_USER_DESC] = {(uint8_t*)&att_decl_user_desc,ATT_UUID_16_LEN,PERM(RD,ENABLE),
..\src\custom_profile\user_custs1_def.c(308): error: #20: identifier "CUST1_YOUR_CONTROL_POINT_USER_DESC" is undefined
sizeof(CUST1_YOUR_CONTROL_POINT_USER_DESC)-1,sizeof(CUST1_YOUR_CONTROL_POINT_USER_DESC)-1,CUST1_YOUR_CONTROL_POINT_USER_DESC},

I wanted to fix this error in my previous description with:static const uint16_t att_decl_user_desc = ATT_DESC_CHAR_USER_DESCRIPTION;

PM_Dialog
Offline
Last seen:1 day 10 hours ago
Staff
加入:2018-02-08 11:03
Hi moritz.schnaufer,

Hi moritz.schnaufer,

Please find attached the steps in order to create a new characteristic. I tested in the default ble_app_profile example of the DA14585_SDK_6.0.10.511_0 and I was able to create a new characteristic. Please try these steps and let me know.

Thanks, PM_Dialog

Attachment:
moritz.schnaufer
Offline
Last seen:2 years 2 months ago
加入:2018-12-04 07:06
Hey,

Hey,

Tahnk you for the help. I was able to fix my problem

PM_Dialog
Offline
Last seen:1 day 10 hours ago
Staff
加入:2018-02-08 11:03
Hi moritz.schnaufer,

Hi moritz.schnaufer,

Glad that you figured your issue out and thanks for accepting my answer.

Thanks, PM_Dialog