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?
嗨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
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?
Hi ,
did you figure out what the problem was ?
I'm facing the same issue.
Thanks.
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
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 ?
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?
I comment the include file '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,
你必须增加你的模板部分概要文件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