⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程https://www.dialog-seminile.com/support.。我们将在未来几天修复错误/优化搜索和标记。
7个帖子/ 0新
最后一篇
DMueller
离线
Last seen:3年10个月前
加入:2017-04-12 10:04
Timer关于Val1.

Dear MT_dialog,

i use the example program "ble_app_peripheral". Now i want to use the characteristik "val 1" without the activation about the characteristic "Control Point".

1. I made it, that the timer is function independently from the "Control Point". But the value show still, if i send a "0x01" via the characteristic "Control Point". What must i do, that i can use the notification for "val1" without the activiation about "Control Point"?

2.我在函数“user_custs1_adc_val_1_cfg_ind_indler”中启动计时器。似乎,定时器似乎更快,因为计时器启动“user_custs1_ctrl_wr_ind_handler”时。我使用相同的“app_peripheral_ctrl_timer_delay”--delay。什么是原因?

亲切的问候。

设备:
MT_dialog
离线
Last seen:3 months 4 days ago
职员
加入:2015-06-08 11:34
嗨dmueller,

嗨dmueller,

1. I am not sure i understand what you did, but you will have to trigger the timer somehow in order to start counting (that what the control point characteristic does when written, just triggers the timer), where have you placed the triggering of the timer ? If you dont get any notification values then apparently the timer is never triggered. For example if you invoke the timer_used = app_easy_timer(APP_PERIPHERAL_CTRL_TIMER_DELAY, app_adcval1_timer_cb_handler); in the user_custs1_adc_val_1_cfg_ind_handler() as you did in your second question or in the connection callback, the device should update the value according to the timer time out.

2.关于在提到的函数中触发时,您看到定时器运行更快,我没有看到这样的东西,可以使用电源profiler和arch_set_pxact_gpio()(触发电源分布器中的光标)以测量之间的距离不同的定时器超时。

Thanks MT_dialog

DMueller
离线
Last seen:3年10个月前
加入:2017-04-12 10:04
嗨mt_dialog,

嗨mt_dialog,

1.我在函数“user_custs1_adc_val_1_cfg_ind_handler”中启动计时器。计时器有效。如果我在没有通知的情况下读取该值,我就可以看到。如果我开始通知,智能手机显示屏上没有任何内容。首先,如果我在“控制点”中发送“0x01”,则使用通知将更新值。我认为有一个连接携带的通知功能和“控制点” - 特征,但我不知道在哪里。

2. i have a new knowledge: if i use the timer in "user_custs1_ctrl_wr_ind_handler" the value is increase evenly. If i use the timer in "user_custs1_adc_val_1_cfg_ind_handler" three values are fast sending. Then is a little break. Thenn three values are fast sending. etc. Maybe you have a idea, why this happen?
(I have made two videos. These are unfortunately more than 10 MB. But if you give me an e-mail address, i can send you these videos)

亲切的问候。

MT_dialog
离线
Last seen:3 months 4 days ago
职员
加入:2015-06-08 11:34
嗨dmueller,

嗨dmueller,

1)由于您将计时器放在user_custs1_adc_val_1_cfg_ind_handler()函数中,这意味着您不必通过控制点特征触发计时器,但启用通知(从中央)user_custs1_adc_val_1_cfg_ind_handler()将触发,激活计时器开始生成通知。因此,您没有收到通知的事实,但在读取时看到递增到特征,我可以假设您正在激活控制点特性,但您不会在中央启用通知。作为通知的常规交换机实现控制点特性的示例。一旦执行写入控制点,user_custs1_ctrl_wr_ind_handler()函数会被触发,如果该值是正确的!= 0然后启用计时器。轮到轮流上的计时器发送到堆栈的通知命令,并且在排列的连接间隔到达时发送通知。此外,为了获取Central上的通知,您需要从中央启用它们,一旦启用它们,将触发user_custs1_adc_val_1_cfg_ind_handler()。

2)在您的第二个创建中,我只能假设您从控制点触发多个定时器,也可以从user_custs1_adc_val_1_cfg_ind_handler()或甚至更多(如果您重写控制点特性或继续启用禁用通知)和所有这些都在经过它们时,他们向堆栈推出通知。

Thanks MT_dialog

DMueller
离线
Last seen:3年10个月前
加入:2017-04-12 10:04
嗨mt_dialog,

嗨mt_dialog,

1.是的,这是正确的。我不希望通过控制点特征触发计时器。我已经启用了中央的通知。但首先,如果我通过控制点特征发送0x01,我会看到智能手机上的值。我将再次进行一些测试。

我会在计时器之后展示。但我知道,我没有从控制点特征开始计时器。

谢谢你的helb。

亲切的问候。

MT_dialog
离线
Last seen:3 months 4 days ago
职员
加入:2015-06-08 11:34
嗨dmueller,

嗨dmueller,

1.如果不想从控制点特征触发计时器,那么不要在该特征处执行写入,只需将定时器启动函数放在user_custs1_adc_val_1_cfg_ind_handler()函数中,因此通过启用ADC值1特征的通知将发生处理程序并启动将触发通知发送功能的计时器。

2.关于第二种情况,当放置在不同的代码部分时,定时器计数更快,这是唯一的逻辑解释,即您启用超过1个定时器,每个计时器通过相同的通知功能(相同的计时器回调)更新并每次发送更多通知。

Thanks MT_dialog

DMueller
离线
Last seen:3年10个月前
加入:2017-04-12 10:04
嗨mt_dialog,

嗨mt_dialog,

i'm sorry for the late replay.

1.是的,我已经从user_custs1_adc_val_1_cfg_ind_handler()开始计时器。

我现在删除了控制characteristic。现在都是功能。

非常感谢你的帮助。

亲切的问候。