⚠️
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 https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
10 posts / 0 new
Last post
_asmaitha
Offline
Last seen: 9 months 3 weeks ago
Joined: 2020-11-24 05:03
Heart Rate Profile

Hi,

I am using the DA14531 soc for our health monitoring project, the use case is to read data from various sensors and transmit the following parameters over BLE:

1) Heart Rate

2) Sp02

3)BP

4)Body Temperature

I have been able to successfuly create custom service for each of the above mentioned parametres and transmit data over DA14531 but I would now like to use the standard SIG bluetooth profiles to transmit the data.

To the app_peripheral project, a) I have added hrps.c and hrps_task.c to the project, b) i have defined EXCLUDE_DLG_HRPS (0) in user_modules_config.h, c) Lastly i have defined CFG_PRF_HRPS in user_profiles_config.h.

When I flash the code and pair with the app, the heart rate service isn;t visible. Have I missed out on something? I am fairly very new to dialog so please help me out regarding this.

 

PS: If you are wondering why i'm not using the custom services as is, it is because we have an independant app developement team working on an app and insist that we use standard profile/services wherever possible.

Keywords: 
PM_Dialog
Offline
Last seen: 9 months 1 day ago
Staff
Joined: 2018-02-08 11:03
Hi _asmaitha,

Hi _asmaitha,

Thanks for your question online and for your interest in our TINY module solution. The HRPS profile exists in the SDK as a profile ( 6.0.14.1114\sdk\ble_stack\profiles\hrp\hrps ) but the application layer is not implemented, so you should implement it in your side.

I would recommend you first checking the BASS profile and take as a reference. The BASS profile is in sdk\ble_stack\profiles\bas\bass SDK path and the application layer in sdk\app_modules\src\app_bass.

The app_XXX.c and app_XXX_task.c files should include all the implementation and the message handling for the profile level implementation.

For creating those two files is that app_bass.c contains all the initiating functions (void functions that triggers an action) and the app_bass_task.c contains the handler functions that are triggered when the action is over and the application should act accordingly.

Thanks, PM_Dialog

_asmaitha
Offline
Last seen: 9 months 3 weeks ago
Joined: 2020-11-24 05:03
I have also gone through the

I have also gone through the BASS exampe but it uses a timer to update the GATT database every minute rather than waiting for a notify event. Basically what I want is to know how to register the notifiation event that comes from the app side in case of a standard SIG service. 

_asmaitha
Offline
Last seen: 9 months 3 weeks ago
Joined: 2020-11-24 05:03
Hi PM_Dialog

Hi PM_Dialog

I created an app_hrps.c file, I have created the app_hrps_create_db() function by using the device information service as a base and i'm able to view the Heart Rate Service along with my other custom services. Next i would like to pass data to the service i.e when the user presses notify on the app, the service should send HR data.

I have also gone over the "adc_value example" where they have used the notify option using the app_easy_timer(), but that function is only called based on a switch case used in user_peripheral.c. How do i make my current Heart Rate Service to notify my sensor data? 

MHv_Dialog
Offline
Last seen: 1 year 4 months ago
Staff
Joined: 2013-12-06 15:10
Hi,

Hi,

When your application has measured the heart rate, you can populate the GATT database using the hrps_meas_send_req_handler  - the primitive HRPS_MEAS_SEND_REQ. If the client (the phone) has already subscribed to notifications, a notification will be generated automatically. 

/MHv

_asmaitha
Offline
Last seen: 9 months 3 weeks ago
Joined: 2020-11-24 05:03
 Hi MHv_Dialog,

 Hi MHv_Dialog,

Please look at the below screenshot of the app and tell me how i can get just any value to appear when i press the read button on the app(client) side. For example i have disabled all the timers used in BASS example and when i pressed the read option from the client side(app), a default value of zero appears. I can have the code used for the heart rate service creation shared here as well if it isn't against the forum rules. Currently I would be glad if some valeue appears on the value field of heart rate when a read operation is done.

Attachment: 
MHv_Dialog
Offline
Last seen: 1 year 4 months ago
Staff
Joined: 2013-12-06 15:10
Sorry, I am not familiar with

Sorry, I am not familiar with the app you are using. If you could use BLE Scanner for Android or LightBlue for iOS, it would be easy to see how to perform a GATT read.

If you want to have a value provided before you have an actual measurement ready (not sure why you would want this, or if the HR profile specification even allows this), you can do as mentioned in my last reply in you app_hrps_enable() function.

/MHv 

_asmaitha
Offline
Last seen: 9 months 3 weeks ago
Joined: 2020-11-24 05:03
I have tried what you

I have tried what you mentioned eralier to set value after calling the HR enable function. I have added the screenshot below. I am currently using the nRF connect app to scan the BLE services, i have used light blue also but the results are still the same. In the below code snippet, i have tried various other combinations as well in place of the "HRPS_MEAS_SEND_REQ". 

Attachment: 
_asmaitha
Offline
Last seen: 9 months 3 weeks ago
Joined: 2020-11-24 05:03
Hi,

Hi,

Any updates regarding the previous query? I have seen the same pattern on with custom services as well. Till now i have only updated the data using "NOTIFY" and not read. I have created a separate thread for that on the forum but i haven't gotten any response on either one of them.

PM_Dialog
Offline
Last seen: 9 months 1 day ago
Staff
Joined: 2018-02-08 11:03
Hi _asmaitha,

Hi _asmaitha,

Would it be possible to share a sniffer log so that we can understand what is happening over the air? The problem is in the notifications ore when trying to read this characteristic?

Thanks, PM_Dialog