can't not find the 'TASK_APP_HT' in HTPT profile

13 posts / 0 new
Last post
Rongame
Offline
Last seen:6 years 2 months ago
加入:2014-12-17 05:26
can't not find the 'TASK_APP_HT' in HTPT profile

SDK version : 3.0.6
Chipset : da14580

I need to get the health's temperature, so I add the Health Thermometer Profile Thermometer profile, and do the test base on the ak_apps\keil_projects\template\template_fh\fh_project_template.uvproj.

To add the HTPT profile as these steps:
. #define CFG_PRF_HTPT 1
#define CFG_APP_HT
in file 'da14580_config.h'

. add the file 'app_ht.c' 'app_ht_task.c' into group 'app' in keil IDE
. add '..\..\..\src\modules\app\src\app_profiles\ht' into project's include paths
. add the follow directives into file 'app_template_proj.h'
#if (BLE_HT_THERMOM)
#include "app_ht.h"
#include "app_ht_task.h"
#endif

. add directives into file 'app_template_proj.c'

. function bool app_db_init_func(void)
#if (BLE_HT_THERMOM)
case (APP_HT_TASK):
{
app_ht_create_db_send();
} break;
#endif //BLE_USER_PROF_SERVER

. function void app_init_func(void)
#if (BLE_HT_THERMOM)
app_ht_init();
#endif

. function void app_connection_func(struct gapc_connection_req_ind const *param)
#if BLE_HT_THERMOM
app_ht_enable_prf(app_env.conhdl);
#endif //BLE_HT_THERMOM

After doing these, when build the project but fail , and it shows the 'TASK_APP_HT' is undefined. Would you please help me to add the HTPT profile to my project?

PY_Dialog
Offline
Last seen:2 years 10 months ago
工作人员
加入:2014-08-25 09:59
嗨Rongame,

嗨Rongame,

Please add definition TASK_APP_HT in rwip_config.h in enum KE_TASK_TYPE, and add this head file in your path.

Regards!
PY

Rongame
Offline
Last seen:6 years 2 months ago
加入:2014-12-17 05:26
Thanks very much!

Thanks very much!

cmnguyen
Offline
Last seen:5 years 1 week ago
加入:2015-04-14 20:40
So far, I set up the

So far, I set up the communication but when I use the ConnectionManager to read out the payload, I was not unable to ready the temperature value from the UUID 0x2A1C and 0x2A1D. The measurement type in UUID 0x2a1d and measurement interval 0x2a21 always read 01 and 00 no matter what I changed in the code. If you have any suggestion, I really appreciate. Thanks.

Rongame
Offline
Last seen:6 years 2 months ago
加入:2014-12-17 05:26
It's OK for the build the

It's OK for the build the project. But after run this project, I found the UUID 0x2A1C (Temperature Measurement) & UUID 0x2A1E (intermediate temperture) can't not be read. But the UUID 0x2A1D, 0x2A21 is OK. Why?

cmnguyen
Offline
Last seen:5 years 1 week ago
加入:2015-04-14 20:40
Do you know how to fix the

Do you know how to fix the issue. I face the same thing. The bug really pissed me off since I got lost to dig out the code. Just want to know whether you find the solution?

mboudreault
Offline
Last seen:11 months 2 weeks ago
加入:2015-05-22 14:10
Hi ,

Hi ,

did you figure out what the problem was ?
I'm facing the same issue.

Thanks.

JE_Dialog
Offline
Last seen:1 month 5 days ago
工作人员
加入:2013-12-05 14:02
Hi There, I wasn't clear

Hi There, I wasn't clear which part of the thread you were responding to : have you seen AN-B-029 whch is a new step by step guide to creating custom profile - its also a good general debug guide to understand how the SDK works in relation to the UUIDs. BR JE_Dialog

mboudreault
Offline
Last seen:11 months 2 weeks ago
加入:2015-05-22 14:10
Yes, I have be through the

Yes, I have be through the documentation.
Turns out I just found out how to fix it.

The APP_HTPT relies on a timer instance to generate its random data. I initially though this timer would be started when the profile is initialized. Itb is not. The only place where the timer is initiate is inside the htpt_meas_intv_chg_ind_handler. This function manages changes on the measurement interval (intv) characteristic. Therefore, in order to start the timer (while keeping the original HTPT structure), we need to overwrite the interval characteristic (done by the client, eg. phone).

Once this is done, the profile will start pumping data in the database. I still wasn't able to read the values, though. I had to enable the "indicate" property of the Temperature measurement characteristic.

That did it for me. I periodically received data from the HT profile.

Hope this may help someone.

PS : Does any of this make sense to you, JE ?

wuzesheng
Offline
Last seen:5 years 4 months ago
加入:2014-11-14 11:24
I ran the same program, and

I ran the same program, and got a error like this:
. . \ \…\ src\modules\app\src\app_profiles\ht\app_ht_task.c(35): error: #5: cannot open source input file "app_display.h": No such file or directory

and I can't find a file named 'app_display.h' under the SDK directory, how to fix this?

mansonhui
Offline
Last seen:1 year 5 months ago
加入:2014-07-15 10:33
I comment the include file

I comment the include file 'app_display.h'

mansonhui
Offline
Last seen:1 year 5 months ago
加入:2014-07-15 10:33
I want to develop a BLE

I want to develop a BLE health thermometer,using standard HTP profile, My SDK is SDK5.0.2.1,but How to begin my design?

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi mansonhui,

Hi mansonhui,

你必须增加你的模板部分概要文件and then create the the app_htc_task and app_htc in order to interact with the profile. You can check the app implementation of the thermometer profile in the SDK3 in order to get an idea about the implementation (DA14580_581_583_SDK_3.0.10\dk_apps\src\modules\app\src\app_profiles\ht). To add the profile in SDK5 you just have to add the header file of the profile you need in the user_profiles_config.h in the profiles area. Check the UM-B-051 and the UM-B-050 pdf in order to get started with the new SDK.

Thanks MT_dialog