No data when trying to start streaming data before 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 . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
Last seen: 1 year 3 months ago
Joined: 2017-12-22 10:09
No data when trying to start streaming data before enabling notifications

Hi Dialog support,

We are developping a project based on the IoT sensor SDK (DA14585 IoT Multi Sensor Development, v6.160.4)
If we connect to a device and
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.

After this, we continue to not receive data from the device even if we disconnect from it, reconnect to it and switch the sequence to
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

Last seen: 5 months 2 weeks ago
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

Last seen: 1 year 3 months ago
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.

This is implemented in the following files and functions:
- file user_dws_reports.c, function bool user_prepare_multi_sensor_report(...)
- file user_dws_reports.c, function 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 - <counter> 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
as well as in
user_send_command_reply(...) (both in file user_dws_reports.c)
and decreased in the function
user_dws_val_ntf_cfm_handler (in file 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

This entre behaviour described above has not been altered by us. So my question reformulates to:

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)?

I hope this describes it clearer.

Thank you

Last seen: 1 year 4 months 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.