Hi,
I started to learn the API and my goal is to implement a custom heart rate sensor. In the latest SDK rev 3.0.6 I can't see HRPS application folder. Was it implemented? Or this server is different from other services?
Regards, Dmitri.
Mon, 2015-02-23 14:13
#1
HRPS application side

Hi Dmitri:
Profile related files for HRPS can be found under Profiles tab. Application layer files are not part of SDK. You can develop them using sample projects such as proximity reporter as an example.
Thanks,
TR_DIALOG
Hi,
Thanks. I am puzzled then how this profile was tested for BT certification?
Another question: UM-B-003 in section 10 is describing how to create a new profile and referencing "dk_apps\keil_projects\spota\spotar_fh" which is not part of the SDK ether. Could you recommend which source code can be used as an example of 128 bit UUIDS?
Regards, Dmitri.
I will get back to you with some suggestions.
Thanks,
TR_DIALOG
Hi all,
Hi,
I made a working HRPS application using the battery app as a start point.
For anyone interested I can share the recipe.
Regards, Dmitri.
Hi Dmitri,
I'm trying to set up a HRPC application. Could you share your recipe for the HRPS app somehow?
Thanks in advance,
Kajetan
Hi Kajetan,
The way howto set up the profile is similar to described in original manual UM-B-003 for DISS. I took DISS app files dis_app and dis_task_app and fixed them for hrps. A few steps should be done as well beside refactoring:
1.You have to enable the profile in the source tree defining CFG_PRF_HRPS in da14580_config.h
2. In app_api.h add:
#if (BLE_HR_SENSOR)
#include "hrps_task.h"
#include "hrp_common.h"
#include "app_hrps.h"
#endif
3. in the same file add to enum after "/// List of Server Profile to Initialize":
#if (BLE_HR_SENSOR)
APP_HRPS_TASK,
#endif //(BLE_HR_SENSOR)
5. Similar to diss add in you app in connection func:
app_hrps_enable(app_env.conhdl);
which you have to make similar to diss profile
6. in app_db_init_func similar to diss add:
#if (BLE_HR_SENSOR)
case (APP_HRPS_TASK):
{
app_hrps_create_db();
} break;
Something like that.
Regards, Dmitri.
谢谢!
Regards, Kajetan
Hi Dmitri:
Certification for the HRPS profile was obtained by the original stack vendor using different tools.
The proximity reporter_fh project includes the SPOTAR profile.
Thanks,
TR_DIALOG
Thanks,
Dmitri
thanks Dimitri for you last post on March 7th
that matches exactly their recommendation out of user manual B-003
couple additional information I found to take your application to the connected state with a HRP Collector (running on an Android app for example)
in app_task_handlers.h, add the following#if (BLE_HR_SENSOR)
{HRPS_CREATE_DB_CFM, (ke_msg_func_t)hrps_create_db_cfm_handler},
{HRPS_DISABLE_IND, (ke_msg_func_t)hrps_disable_ind_handler},
#endif
otherwise, I found out your application may not even advertise!
regards,
Jamal
now here is a question I am digging in, please comment if you have encountered the same situation
my Android App Collector will connect to the HRPS app running on the Dialog, but will time out for lack of incoming HR measurements!
in hrps_task.c
they provide the measurement message and its handler is already defined per interface spec
{HRPS_MEAS_SEND_REQ, (ke_msg_func_t) hrps_meas_send_req_handler},
however, can't figure out yet how to trigger sending those measurement, even starting with some fake/hardcoded data
any help from the BLE experts is much appreciated
kind regards,
Jamal
the solution to this was to simply add a timer for periodic notify measurement to the collector...