<?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>Multirole (C and P) device misses connection events</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98513/multirole-c-and-p-device-misses-connection-events</link><description>Hi all, I am observing some strange behaviour on my two nRF52840 devices. They are running NCS v2.1.0 (Zephyr 3.1.99), one as central and peripheral, one as peripheral only. They both have BLE parameters similar to those inthe nRF throughput example.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Aug 2024 14:06:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98513/multirole-c-and-p-device-misses-connection-events" /><item><title>RE: Multirole (C and P) device misses connection events</title><link>https://devzone.nordicsemi.com/thread/499795?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2024 14:06:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3740871c-9ce7-4021-b06a-9e32b6a05985</guid><dc:creator>dtp</dc:creator><description>&lt;p&gt;This was indeed what was happening. We solved by using a different connection interval on the B - C connection, as per Emil&amp;#39;s suggestion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole (C and P) device misses connection events</title><link>https://devzone.nordicsemi.com/thread/499794?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2024 14:03:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d01b4872-f384-4cfb-8d28-c50228d90233</guid><dc:creator>dtp</dc:creator><description>&lt;p&gt;Hi Emil, apologies for never getting back to you on this. Thank you for this because we ended up going for the approach you suggested here. My concern at the time were the iOS (the Central) connection interval constraints (only multiples of 15 ms allowed) but we solved the problem by having platform-specific connection parameters.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole (C and P) device misses connection events</title><link>https://devzone.nordicsemi.com/thread/419805?ContentTypeID=1</link><pubDate>Tue, 11 Apr 2023 17:30:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02e50455-7ca2-4c28-83f1-68a1c675ed68</guid><dc:creator>Emil Lenngren</dc:creator><description>&lt;p&gt;Consider the case when there are three devices A, B, C with two connections:&lt;/p&gt;
&lt;p&gt;1. A (peripheral) &amp;lt;-&amp;gt; B (central)&lt;/p&gt;
&lt;p&gt;2. B (peripheral) &amp;lt;-&amp;gt; C (central)&lt;/p&gt;
&lt;p&gt;and both connections have equal connection interval.&lt;/p&gt;
&lt;p&gt;Since the timing is based on the central&amp;#39;s clock in a connection, B&amp;#39;s clock will drive the first connection and C&amp;#39;s clock will drive the second connection. These two clocks are not perfectly synchronised but will drift with respect to each other. It is therefore possible that the connection events at B for the two connections for some time always clash, until they drift apart. Having unrelated connection intervals solves this issue, since if two connection events from two different connections in that case happen to overlap, they will certainly not overlap at the next connection event.&lt;/p&gt;
&lt;p&gt;This can be compared to the case when there is only one central, but multiple peripherals to this central. Since the central&amp;#39;s clock drive all connections in this case, the timings will always drift the same, causing no overlaps in this case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole (C and P) device misses connection events</title><link>https://devzone.nordicsemi.com/thread/419781?ContentTypeID=1</link><pubDate>Tue, 11 Apr 2023 14:33:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d060c548-2745-4570-a5ea-3667b9f71ed4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi David,&amp;nbsp;&lt;br /&gt;I assume you are using Nordic BLE controller ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have a look at the scheduling documentation &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/softdevice_controller/doc/scheduling.html"&gt;here&lt;/a&gt;, you can find somewhat the explanation for the behavior you observed.&amp;nbsp;By default BLE connection event should have same priority and when one connection is about to timeout due to too much preemption it will have first priority.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, I&amp;#39;m not so certain about the drifting explanation. If there is a drifting, both connection should be drifted. And why would B-C has higher priority than A-B.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I agree with Emil suggestion that you can try to make the connection interval slightly different to see if you have the same issue. I would assume collision still occurs but it will not last for a long time as you are seeing in your case.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole (C and P) device misses connection events</title><link>https://devzone.nordicsemi.com/thread/419454?ContentTypeID=1</link><pubDate>Sun, 09 Apr 2023 08:07:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11371481-f078-48bb-9528-03df26366212</guid><dc:creator>Emil Lenngren</dc:creator><description>&lt;p&gt;I think the easiest solution would be to use different connection intervals. Do you really need exactly 100 ms on both connections? If one had for example 101.25 ms and the other 98.75 ms, that would instead result in seldom occasional clashes rather than constantly overlapping clashes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole (C and P) device misses connection events</title><link>https://devzone.nordicsemi.com/thread/419445?ContentTypeID=1</link><pubDate>Sat, 08 Apr 2023 11:04:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:498ae592-5b8a-45fb-85a5-94616bdbf1e6</guid><dc:creator>dtp</dc:creator><description>&lt;p&gt;Another update: after some analysis, the issue is clearly caused by the connection events for the two connections (A-B, B-C) drifting and eventually overlapping. When they overlap, the A-B event seems to be &amp;quot;sacrificed&amp;quot; for half of the conn events, until enough time passes for the the two events to drift apart from each other and a&amp;nbsp;healthy exchange resumes.&lt;/p&gt;
&lt;p&gt;Some more useful information on this side: I am using an external 20ppm crystal and&amp;nbsp;the auto-update of conn params is disabled:&lt;/p&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_20PPM=y
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n&lt;/pre&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I thought re-enabling&amp;nbsp;&lt;/span&gt;CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS on device B might allow the B-C connection to automatically re-update itself when the two connection events clash so that the phase of the event can be shifted or the conn parameters renegotiated, but this did not happen.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;One of the reasons I chose 100ms for both connections is to avoid issues like this occurring, but it&amp;#39;s clear I need to take the drift of the two connections into account on device B. Ideally, I keep the B-C connection event within a certain window, semi-synchronised with the A-B conn events.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;1) Are there any NCS/Zephyr techniques to avoid the clash of connection events on a multirole device?&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;2) If not, it might have to look at PPI ways. I was thinking of recalling a conn_params_update() whenever the two events get to close,&amp;nbsp;but where the next event would occur in the window would be left up to chance?&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;3) Is there a way to force a connection event to occur at a certain point in time rather than leaving it up to chance?&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multirole (C and P) device misses connection events</title><link>https://devzone.nordicsemi.com/thread/419409?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2023 20:20:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8678b3e-1ba8-4a2f-9f51-8470fe2c433c</guid><dc:creator>dtp</dc:creator><description>&lt;p&gt;Just to provide an update on this: the issue still occurs when using two nRF52840 DK as A and B.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>