<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36790/very-high-response-times-of-reliable-unicast-messages</link><description>I adapted the light switch demo of the nRF5 SDK for Mesh for sending a series of reliable on/off messages sequentially from an nRF52840 Preview DK to 20 Thingy:52 servers via send_reliable_message(). In this scenario I measure in most cases response times</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Nov 2018 13:13:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36790/very-high-response-times-of-reliable-unicast-messages" /><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/159569?ContentTypeID=1</link><pubDate>Thu, 29 Nov 2018 13:13:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:189d90d1-3671-4019-8f0d-50806857fb8c</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Revisiting this one, after a (way too long) silence from my side.&lt;/p&gt;
&lt;p&gt;I do have a couple of suggestions.&lt;/p&gt;
&lt;p&gt;The first one is to update to a newer release of the nRF5 SDK for Mesh. We have experienced that especially with the proxy feature enabled you may experience packet loss because of the parameters chosen for advertising and connections. If I recall correctly then default settings were changed slightly for the current release (v2.2.0) and from what I understand there will be further improvements for next release.&lt;/p&gt;
&lt;p&gt;The time between retransmits depend on TTL. A shorter TTL setting means shorter time between retransmits. The values that you have experienced for the delay correspond to a relatively high TTL setting.&lt;/p&gt;
&lt;p&gt;You could also experiment with the ACCESS_RELIABLE_INTERVAL_DEFAULT setting, which is also proportional to the time between retransmissions. There is also the ACCESS_RELIABLE_BACK_OFF_FACTOR which makes each consecutive retransmission delay more than the previous, with that factor. Defaults to 2, which means you see a doubling in delay for each retransmission.&lt;/p&gt;
&lt;p&gt;And of course, if you have found out anything in your end then please feel free to share your findings.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/147027?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2018 15:15:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32820f08-b3eb-40c2-8e19-5932a0556e0f</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you. That it is in fact a doubling is very interesting, and it supports the hypothesis. I will try once more to reproduce, and check to see if changing parameters may improve the situation.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/146632?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 07:32:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ba20167-dead-4b38-a053-ddb3452a2206</guid><dc:creator>Armin</dc:creator><description>&lt;p&gt;Regarding advertising interval I did not change that parameter against what is preset in your examples. I even don&amp;#39;t know where this is defined, so if I shall increase it as you recommended please let me know in which file it is exactly defined so that I can find it.&lt;/p&gt;
&lt;p&gt;Yes, the projects are those which are mentioned by you before. Look:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1535699279326v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;For reproduction you should take the original Nordic examples and override the sources in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;\nRF5_SDK_for_Mesh\examples\light_switch\proxy_client\include&lt;/li&gt;
&lt;li&gt;\nRF5_SDK_for_Mesh\examples\light_switch\proxy_client\src&lt;/li&gt;
&lt;li&gt;\nRF5_SDK_for_Mesh\models\generic_on_off\include&lt;/li&gt;
&lt;li&gt;\nRF5_SDK_for_Mesh\models\generic_on_off\src&lt;/li&gt;
&lt;li&gt;\nRF5_SDK_for_Mesh\examples\light_switch\include&lt;/li&gt;
&lt;li&gt;\nRF5_SDK_for_Mesh\examples\light_switch\thingy_provisioning_demo_generic_OnOff_BLINK\include&lt;/li&gt;
&lt;li&gt;\nRF5_SDK_for_Mesh\examples\light_switch\thingy_provisioning_demo_generic_OnOff_BLINK\src&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Regarding the delays I made a mistake in my description: it is actually always a double amount of the previous number starting with 5 as you mentioned above, i.e. 5, 10, 20, etc. and not just a multiply of 5. Sorry for that. In fact, if I understood it right, this confirms your hypothesis of lost acknowledges.&lt;/p&gt;
&lt;p&gt;However, the question remains why there are messages lost. Maybe the behavior improves when the advertising interval time is increased. So either you test it on your own or you help me finding the code where the parameter is defined so I can test it. But this may take some days as I&amp;#39;m currently quite busy with other work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/145984?ContentTypeID=1</link><pubDate>Mon, 27 Aug 2018 15:34:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4b1ee28-9e18-4777-8361-4111ac2e6966</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Regarding the delays that you see, you mentioned they all are a multiple of 5 seconds. Can you confirm that you see all of the multiples of 5, and that it is not a series where each number is the double amount of the previous number, as in 5, 10, 20, etc?&lt;/p&gt;
&lt;p&gt;One hypothesis is that while the message is sent and received, the acknowledgement is lost, which means the message is resent until an acknowledgement is correctly received (or a timeout). But the behavior for resending messages is that the time between retries is doubled every time, and that does not correspond to delays increasing linearly.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/145721?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 17:07:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e32ae128-c3e4-4346-ab10-3c81a236d8d6</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We are very sorry for the delays over the past days. I have been looking at this issue today.&lt;/p&gt;
&lt;p&gt;I think that your reported 10 ms advertising interval is way too short for letting the Mesh stack run properly. Did you test increasing it?&lt;/p&gt;
&lt;p&gt;It would be great if we could build and reproduce this issue locally, but it seems many of the files that are needed to build the project are still missing... Usually we ask for a minimal example showing the erroneous behavior. It may be an option to strip some of the unneeded functionality away from the project instead. Or, we would need all the included c and h files for building the projects.&lt;/p&gt;
&lt;p&gt;If I have understood things correctly, the projects are:&lt;/p&gt;
&lt;p&gt;For nRF52840 DK: examples\light_switch\proxy_client\light_switch_proxy_client_nrf52840_xxAA_s140_6_0_0.emProject&lt;/p&gt;
&lt;p&gt;For the Thingy:52s: examples\light_switch\thingy_provisioning_demo_generic_OnOff_BLINK\light_switch_proxy_server_nrf52832_xxAA_s132_6_0_0.emProject&lt;/p&gt;
&lt;p&gt;Can you confirm or correct that?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/145500?ContentTypeID=1</link><pubDate>Thu, 23 Aug 2018 11:46:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e39be9a-80a9-4d92-8173-c7ea7ef175cc</guid><dc:creator>Armin</dc:creator><description>&lt;p&gt;Yes, according to the RELEASE_NOTES.md we use&lt;/p&gt;
&lt;div style="background-color:#1e1e1e;color:#d4d4d4;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#569cd6;font-weight:bold;"&gt;BLE Mesh v2.0.1&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/145483?ContentTypeID=1</link><pubDate>Thu, 23 Aug 2018 11:15:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2307e9b9-a498-4487-81a3-4b5a6b18e7d0</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Hi Armin,&lt;/p&gt;
&lt;p&gt;Very sorry for the delayed response. Hung has been on vacation for the past two weeks &amp;amp; it seems we forgot to follow up on this case. I am very sorry about that. Hung will be back on Monday, but I will try my best to help you out &amp;amp; hopefully we can figure out the issue before he is back. Are you using mesh sdk v2.0.1?&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/145447?ContentTypeID=1</link><pubDate>Thu, 23 Aug 2018 08:40:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c18ec37-38a5-47a9-a2d3-52e837021b37</guid><dc:creator>Armin</dc:creator><description>&lt;p&gt;Did you make some progress in your investigations for this issue?&lt;/p&gt;
&lt;p&gt;Regarding your questions:&lt;/p&gt;
&lt;p&gt;1. I use the generic on off model provided in the thingy example.&lt;/p&gt;
&lt;p&gt;2. I use that model on the server as well.&lt;/p&gt;
&lt;p&gt;I tried to attach the whole affected SDK as you requested. However, although I stripped off all binaries, builds and documentation the .zip still has 53 MB. Obviously this is too big for your upload infrastructure as uploading fails with an error as follows:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/upload_5F00_error.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Alternatively here is at least the .zip with the whole light switch projects:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/light_5F00_switch.zip"&gt;/cfs-file/__key/communityserver-discussions-components-files/4/light_5F00_switch.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/141675?ContentTypeID=1</link><pubDate>Fri, 27 Jul 2018 12:21:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:201740ac-55e2-4555-8b2f-3b6d628d46ea</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Armin,&lt;/p&gt;
&lt;p&gt;I can see that you use generic_on_off instead of simple_on_off as in our example. Did you use the generic on off model provided in our thingy example or your own implementation of the model ? You use that model on the server as well ? I would need to zip your whole light switch projects (because there is some definition in the common header files) or better just zip the whole SDK. You may want to delete the compiled binary to reduce the size of the .zip.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/141497?ContentTypeID=1</link><pubDate>Thu, 26 Jul 2018 10:32:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a650a3f9-df37-4a03-a99f-e54f26024c6b</guid><dc:creator>Armin</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/proxy_5F00_client.zip"&gt;devzone.nordicsemi.com/.../proxy_5F00_client.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/141480?ContentTypeID=1</link><pubDate>Thu, 26 Jul 2018 09:16:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21272bd7-fabb-4a0e-bc60-5f9d92780f73</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;(Sorry for the delay in the response, we are on the peak of summer vacation in Norway)&lt;/p&gt;
&lt;p&gt;10ms is very short interval. This will largely affect the mesh operation. It must be something wrong here. We will do some investigation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes you can post a full file, by using Insert -&amp;gt; Insert Image/video/file , then you can attach the file. We prefer to have the full project. Just in case any setting in the compiler option was wrong.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/141367?ContentTypeID=1</link><pubDate>Wed, 25 Jul 2018 14:47:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40bb916a-7c7a-45aa-b0f4-dab51048fb4b</guid><dc:creator>Armin</dc:creator><description>&lt;p&gt;According to nRFConnect App advertising intervals are significantly different between client and server:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Server (Thingy:52): &lt;strong&gt;500ms&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Client (nRF52840 Preview DK): &lt;strong&gt;10ms&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Is it possible to attach a complete sourcecode file here? I won&amp;#39;t prefer pasting my complete main.c here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/141350?ContentTypeID=1</link><pubDate>Wed, 25 Jul 2018 14:04:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0180b523-168f-4b89-838b-1e55fcf827ce</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;yes, please attach the code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can use a phone to see the advertising interval (nRFConnect app)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/141285?ContentTypeID=1</link><pubDate>Wed, 25 Jul 2018 09:11:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a96f9ff-0c35-4afa-9dad-4a7d18ff1c73</guid><dc:creator>Armin</dc:creator><description>&lt;p&gt;It makes no difference whether the Smartphone is connected or not.&lt;/p&gt;
&lt;p&gt;You mention you have to check the advertising interval. Please tell me exactly which parameter I shall provide to you in case.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sending multiple reliable unicast messages to multiple nodes. After each send I wait for the reply, wait an additional time (200ms) and then send the next.&lt;/p&gt;
&lt;p&gt;I could attach the source here if it helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/141271?ContentTypeID=1</link><pubDate>Wed, 25 Jul 2018 08:09:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8ba6d67-09d4-490f-b65f-5c161f7f3eba</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Armin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I guess the proxy feature could be the cause here. When you see the issue, was it with the phone connected or not ? If it&amp;#39;s connected to the phone, we need to check the actual connection interval.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If it&amp;#39;s not connected to the phone, we need to check the advertising interval of the client and also the advertising interval of other server nodes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We want to test and reproduce the issue here. How did you test ? Did you simply just send reliable message to one single node or to multiple nodes (with multiple messages) ? You mentioned you can see it once in about 20 trials ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/141175?ContentTypeID=1</link><pubDate>Tue, 24 Jul 2018 14:04:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e02e4af-66a6-4c20-97f2-b8132e07a3e3</guid><dc:creator>Armin</dc:creator><description>&lt;p&gt;The behavior is independent from the number of nodes. I tested with 3, 5, 20 and 30 nodes.&lt;/p&gt;
&lt;p&gt;The messages are sent from the light switch client node, which runs on the nRF52840 Preview DK with project light_switch_proxy_client_nrf5284_xxAA_s140_6.0.0. By that it is also the proxy for commissioning via Smartphone. All server nodes running on Thingy:52 with project light_switch_proxy_server_nrf52832_xxAA_s132_6.0.0, so all servers are also proxy.&lt;/p&gt;
&lt;p&gt;The TTL value is the default set in nrf_mesh_config_app.h #define ACCESS_DEFAULT_TTL (SERVER_NODE_COUNT) whereas SERVER_NODE_COUNT is set in light_switch_example_common.h as #define SERVER_NODE_COUNT (30)&lt;/p&gt;
&lt;p&gt;The reliable messages are sent to a unicast address. Group addresses can only be used with unreliable messages!&lt;/p&gt;
&lt;p&gt;Yes, the packet arrives at the servers always very fast. An LED is switched on there when the message arrives and I see almost no visual delay between the time the message is sent which is indicated by a log output at JLink Viewer and the LED lights on. By that the high delay comes actually from the response!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very high response times of reliable unicast messages.</title><link>https://devzone.nordicsemi.com/thread/141157?ContentTypeID=1</link><pubDate>Tue, 24 Jul 2018 13:19:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65fb8aed-a92f-4b50-8fc2-780545ca1640</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Armin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;No I don&amp;#39;t think it&amp;#39;s a normal behavior. Do you see the same problem when you test with unmodified version of the light switch examples ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you see the same problem if you have less number of nodes ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did&amp;nbsp;you run anything else beside mesh on the node ? Running BLE or proxy on the node would affect the mesh performance.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The mechanism to resend notification is similar to trickle algorithm the interval is multiple by&amp;nbsp;ACCESS_RELIABLE_BACK_OFF_FACTOR by each retry. But your 5-10-15 seconds observation is quite strange, wouldn&amp;#39;t match with what we have.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which TTL value did you set ? The timeout is calculated by the TTL value.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you send the reliable message to a unicast address or to a group address&amp;nbsp; ?&lt;/p&gt;
&lt;p&gt;Also do you see the packet arrive on the peer device before that 5 -10 .. seconds ? We need to find if it was the original packet missing or the response packet missing.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>