开始时没有数据流数据enabling notifications

⚠️
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.
4 posts / 0 new
Last post
gme_johannes
Offline
Last seen:2周1天前
Joined:2017-12-22 10:09
开始时没有数据流数据enabling notifications

Hi Dialog support,

We are developping a project based on the IoT sensor SDK (DA14585 IoT Multi Sensor Development, v6.160.4)
如果我们连接到设备和
1. start streaming data (send 0x01 to char uuid 2ea78970-7d44-44bb-b097-26183f402409)
and only after this
2. enable listening to notifications (char uuid 2ea78970-7d44-44bb-b097-26183f402410)
the sensor is not sending any data.

在此之后,即使我们断开连接,我们也不会从设备接收数据,重新连接并切换序列
1. enable listening to notifications and
2. start streaming data.

Is this expected behaviour? How can I get the device to start sending data again?

Thank you
Katharina

Device:
PM_Dialog
Offline
Last seen:22 hours 1 min ago
Staff
Joined:2018-02-08 11:03
Hi gme_johannes,

Hi gme_johannes,

Thanks for your post. Since it is a custom code, could you please describe a bit more what is the issue? If I am not mistaken and according to the title, the device is not sending data only when the notifications are disabled by the peer device. In that case, the notifications should be enabled from the peer device in order to start sending data over the air.

Thanks, PM_Dialog

gme_johannes
Offline
Last seen:2周1天前
Joined:2017-12-22 10:09
Hi PM_Dialog,

Hi PM_Dialog,

Thank you for coming back to us. Yes, I know that notifications have to be enabled in order for notifications to be sent (kind of obvious :)). But only enabling notifications will not start sending data over the air. In order for this to happen, streaming data has to be started too. And here it depends on the sequence in which this is enabled and started:
- First start streaming data and second enable notification _does not_ start sending data.
- First enable notification and second start streaming data _does_ start sending data.

We do enable notifications: The device is not sending data (over the air) when notifications are enabled _after_ we send the command to start streaming data.

Our code is based on IoT MSK v6.160.4. We did not implement any custom code for receiving notifications or for sending the command to start streaming data.
We especially did not change the code responsible for composing and sending out sensor data.

这是在以下文件和函数中实现的:
- file user_dws_reports.c, function bool user_prepare_multi_sensor_report(...)
- file user_dws_reports.c,函数void user_add_multi_sensor_report(...)
- file user_dws_reports.c, function void user_send_multi_sensor_report(...)
- file user_dws_task.c, function user_dws_val_ntf_cfm_handler(...)

When I connect to the serial debug console (to see the results of any archprintfs) I can see the following error message
"ERROR: Drop NTF - Outstanding NTFs" where counter (ntf_sent_cntr) is a number larger than 15 (there's a threshold #define(d) to start printing this error message instead of composing and sending data reports, which is also pre-configured in the above mentioned IoT MSK v6.160.4 and wasn't touched by us).

Every time streaming data is stopped (send command to stop streaming data) and restarted (send command to start streaming data) this counter increases by two (no matter if notifications are enabled or disabled)

This behaviour persists when the device is disconnected from the peer device and reconnected.

The notification-sent-counter, ntf_sent_cntr, is increased in the function
user_send_multi_sensor_report(...)
as well as in
user_send_command_reply(...)(都在file user_dws_reports.c中)
and decreased in the function
user_dws_val_ntf_cfm_handler(文件user_dws_task.c中)

Streaming data is started by sending 0x01 to dws_control_char (uuid 2ea78970-7d44-44bb-b097-26183f402410)
Streaming data is stopped by sending 0x00 to dws_control_char

上述该企业行为尚未由我们改变。所以我的问题重新重新装修:

Is the behaviour, that the device cannot recover from dropped notifications, wanted
(a) even when the device disconnect and reconnects?
(b) when streaming is started _before_ notifications are enabled (it's not occurring when streaming is started _after_ notifications are enable)?

我希望这描述它更清楚。

Thank you
Katharina

juliediane
Offline
Last seen:1 month 3 weeks ago
Joined:2020-10-08 18:34
Thank you for the update and

Thank you for the update and prompt response.I'll keep a close eye on this thread. I'm looking for the same issue. I came across your thread. Thank you for making it.

I'm hoping for a solution.

networthzone.com