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
在文件'da14580_config.h'中
。将文件'app_ht.c''app_ht_task.c'添加到Keil IDE中的组“App”中
。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'
。函数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
。函数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
执行以下操作后,当构建项目但失败时,它显示“Task_App_ht”未定义。请您帮我向我的项目添加HTPT配置文件吗?
嗨Rongame,
Please add definition TASK_APP_HT in rwip_config.h in enum KE_TASK_TYPE, and add this head file in your path.
问候!
PY
Thanks very much!
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.
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?
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?
你好 ,
did you figure out what the problem was ?
I'm facing the same issue.
谢谢。
嗨,我不清楚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
Yes, I have be through the documentation.
事实证明我刚刚发现了如何解决它。
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 ?
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?
我评论包含文件'app_display.h'
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?
Hi mansonhui,
您必须添加到您的模板htpc配置文件,然后创建app_htc_task和app_htc以便与配置文件进行交互。您可以检查SDK3中的温度计配置文件的应用程序实现,以了解实现的想法(DA14580_581_583_SDK_3.0.10 \ DK_APPS \ SRC \ MODULES \ APP \ SRC \ APP_PROFILES \ HT)。要在SDK5中添加配置文件,只需在配置文件区域中的user_profiles_config.h中添加所需的配置文件的头文件。检查UM-B-051和UM-B-050 PDF,以便开始使用新的SDK。
Thanks MT_dialog