⚠️
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//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
11 posts / 0 new
Last post
herochua617
Offline
Last seen:3年11个月前
加入:2017-01-18 12:46
HRPS profile creation

Hi there,

I am having problem with the hrps profile. I am trying to create a hrps profile so that it can connect with my sensor. I have followed the example in UM-003 for DISS to implement the heart rate profile and I have also read this link about it (https://support.dialog-semicondiondiondum/hrps-applications). Here's in my attachment is the error that I have obtained in Keil MDK. Thanks!

附件:
设备:
LT_Dialog (not verified)
Hi herochua617,

Hi herochua617,
Do you define the structurestruct bass_create_db_cfm.? You need to define one, better with a proper name such asstruct hrps_create_db_cfmfor easy maintenance. As the content of the structure to be defined and the location where the structure to be put to, you can refer to how bass is done.

herochua617
Offline
Last seen:3年11个月前
加入:2017-01-18 12:46
Hi there,

Hi there,

我已经将struct bass_create_db_cfm的定义更改为struct hrps_create_db_cfm,一些错误已经消失。但是,我想向我的剩余错误提出任何建议吗?非常感谢你!我已宣布#include“app_hrps.h”。您可以查看我附加到此消息的附件。

herochua617
Offline
Last seen:3年11个月前
加入:2017-01-18 12:46
Hi there,

Hi there,

我发现我的心率概况无法宣传。我不知道问题在哪里,看起来我已经完成了所有的配置,并且没有从我的编码的Keil MDK检测到错误。我希望你可以看看。我跟着链接https://support.dialog-semicondiondiondum/hrps-applicationsand I have modified the code for app_hrps and app_hrps_task. I only see device information, generic access and generic attribute in the BLE scanner apps and I could not see the Heart Rate Profile. Please help thanks! (ATTACHMENT 4)

LT_Dialog (not verified)
Hi hereochua617,

Hi hereochua617,
can you check if the associated macros are defined properly?

herochua617
Offline
Last seen:3年11个月前
加入:2017-01-18 12:46
Hi LT_Dialog,

Hi LT_Dialog,

我已经比较了app_hrps.c and app_hrps_task.c with the app_diss.c and the app_diss_task.c respectively and I have erased the #if HRPS_DISABLED and #if HRPS_IDLE || BLE_HR_SENSOR. I have no error in Keil MDK. I have found that I need to define UUID is it? or it has been done in the hrps.c and hrps_task.c. Besides that, I do not need to follow the sample128 example right since sample128 is for making new profile and since the hrps profile is already exist in the source file. However, I still wondering where is the problem will be. I cannot see the profile of Heart Rate being showed up in the BLE scanner apps. Thanks, By the way, do I need to change this (attachment 5) in order to make it advertise?

附件:
MT_dialog
Offline
Last seen:2个月2周前
工作人员
加入:2015-06-08 11:34
Hi herochua617,

Hi herochua617,

SDK中的心率概况仅具有配置文件的实现,而不是应用程序将如何处理它(例如vis vis clast配置文件的应用程序,除了vist.c和dist_task.c之外的vis visl配置文件。文件它还可用的文件App_diss.c和app_diss_task.c文件,这些文件提供了应用程序来处理配置文件本身的功能性)。因此,为了使用HRP配置文件,您必须创建这些文件并处理配置文件将与您的应用程序交换的消息。请在软件实施部分看看常见问题解答的支持网站上,有几个常见问题解答的常见问题解释了配置文件的这一方面,而且HRP也是一个标准的配置文件,与16位UUID,它与128bit无关例子。假设您已经完成了(我的意思是创建了Create _.... C文件的内心级别配置文件)如果您的设备无法通告,那么我假设数据库创建的错误是错误的。例如,允许在创建数据库时立即拍摄普通的配置文件Act_Create_DB_Req_Handler()应执行并发送您的应用程序应该处理的消息vist_create_db_cfm。app_diss_task.c文件应该处理该消息和vist_create_db_cfm_handler,在该函数已执行并初始化数据库之后,它应该发送app_module_init_cmp_evt以便设备继续下一个配置文件或启动广告过程。如果未处理配置文件的完成消息,则设备将无法进行到广告过程或启动您的下一个配置文件,如果有一个。

谢谢MT_dialog

herochua617
Offline
Last seen:3年11个月前
加入:2017-01-18 12:46
Hi there,

Hi there,

我初始化了所有处理程序。自从我提到app_diss_task.c,我不知道我在哪里出错。请参阅附件6.但是我发现存在一个正在出现的问题。当我将我的代码加载到开发套件中,一旦将电路板插入PC,就可以加载到开发套件的代码,但无法宣传心率配置文件,并且只有设备信息服务就在有通用访问和属性。但是,我发现当我试图通过在keil mdk中的调试键时尝试加载代码时,我发现电路板与PC之间的链接突然关闭,这是什么原因,这发生了可能是我的心率服务不是广告的原因。非常感谢MT_Dialog。

herochua617
Offline
Last seen:3年11个月前
加入:2017-01-18 12:46
Hi there,

Hi there,

我现在能够看到个人资料。但是,当我打开通知时,它似乎没有提供任何值。您是否在处理程序中看到了任何问题?或app_hrps.c?我需要设置一个计时器吗?并且由于我不使用SDK 5,而且我没有app_easy_timer,所以什么是实现计时器回调函数的最简单的Wat?我想在SDK 5中的自定义配置文件中创建一个循环,其中有一个函数调用app_adcvall_timer_cb_handler()。如何在SDK 3中实施同样的事情?谢谢

MT_dialog
Offline
Last seen:2个月2周前
工作人员
加入:2015-06-08 11:34
Hi herochua617,

Hi herochua617,

You will have to debug this in order to check the reason why the device doens't get to the advertising procedure (place break point to the functions that the code should go through and check if the proper functions are triggered) as soon as the database initialization finishes, what i can comment on the attachment that you have posted is that, in the hrps_create_db_cfm_handler() function you send a HRPS_CREATE_DB_CFM message and a APP_MODULE_INIT_CMP_EVT. The HRPS_CREATE_DB_CFM message is send by the hrps_create_db_req_handler() in the hrps_task.c file and the APP_MODULE_INIT_CMP_EVT message only should be send from the hrps_create_db_cfm_handler() in order to declare that the database is initilized, so that the device will proceed to the initialization of the database or start advertising. Regarding the loosing connection between the Jlink and the PC, i suppose that you are using an SDK older than 5.0.4 and you are using sleep. So either move to the 5.0.4 SDK or remove the sleep from the project if you would like to debug while your fw executes.

Are you sending anything from the application in order to see data on the other side ? please have a look at the RW BLE Heart Rate Profile (HRP) Interface specification, in the Profiles & API Documents in order to see how to use the profile properly. Also regarding the timers in SDK3 and general the SDK3 documentation you can have a look at the Documents section, in the Discontinued documents, SDK3 documents.

谢谢MT_dialog

herochua617
Offline
Last seen:3年11个月前
加入:2017-01-18 12:46
Hi there.

Hi there.

感谢您的答复。我有另一个问题,但与这个论坛主题并不是很有关系,所以我已经在一个新的主题中问道。请跟进此链接(https://support.dialog-semicondiondiondum/forums/post/dialog-smartbond-bl ...). Thank you very much.