<?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>Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113683/packet-loss-during-iso-transmission-when-advertising</link><description>Hi, 
 Bug: 
 With a connected ISO connection between two devices X and Y: 
 
 X acts as a peripheral. It&amp;#39;s the ISO server and it is transmiting iso data to Y. 
 Y is multirole. It connects to X and establish an ISO connection to receive ISO data. 
 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Aug 2024 15:06:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113683/packet-loss-during-iso-transmission-when-advertising" /><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/498899?ContentTypeID=1</link><pubDate>Mon, 19 Aug 2024 15:06:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7979fef-7bb9-44f0-8aaa-2e6875d69ce9</guid><dc:creator>yuxuan.cai</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Glad to know it helps!&lt;/p&gt;
&lt;p&gt;The fact that the controller drops outdated SDU is a design decision and thus it will most likely not be fixed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Yuxuan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/498891?ContentTypeID=1</link><pubDate>Mon, 19 Aug 2024 14:36:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d72fe28a-8277-4c71-a56c-de29d9854097</guid><dc:creator>thomas_hexploy</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We did some test with&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ret = bt_iso_chan_send(&amp;amp;iso_cis_chan, buf, 0);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and this is much better. We don&amp;#39;t see any packet loss for the moment (we will continue our tests in the following days).&lt;/p&gt;
&lt;p&gt;Could you tell me if the issue you mention with the SDU will be fixed in later version or is it normal ?&lt;/p&gt;
&lt;p&gt;Thank you for your support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/498823?ContentTypeID=1</link><pubDate>Mon, 19 Aug 2024 12:00:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74836397-9023-4d2a-8672-935234588f48</guid><dc:creator>yuxuan.cai</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry that it took some time.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve managed to reproduce the packet loss you mentioned, and after discussions with the team, I believe it has to do with how the data are provided.&lt;/p&gt;
&lt;p&gt;In your application, the SDUs are provided to the controller with sequence numbers.&amp;nbsp;When an SDU is provided too late, the controller will either drop the data or send it in the next event. An SDU can be provided too late due to the asynchronous nature of the HCI interface, or in your case, the interference from an ongoing advertiser.&lt;/p&gt;
&lt;p&gt;To address this, you could use the &amp;quot;Time of Arrival&amp;quot; mode mentioned &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/softdevice_controller/doc/isochronous_channels.html"&gt;here&lt;/a&gt; by setting the sequence number to 0 when calling bt_iso_chan_send(). With this I observed no missing packets locally.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;d like to learn about the &amp;quot;Timestamp&amp;quot; mode, please check out the &lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/main/samples/bluetooth/iso_time_sync"&gt;iso time sync sample&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Yuxuan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/498291?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 12:53:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78d88f7b-fcf7-4da2-a620-d220c617caee</guid><dc:creator>thomas_hexploy</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can find enclosed a patch to apply on Zephyr (v3.6.99-ncs2) used by NCS 2.7. It&amp;#39;s only a rework of peripheral_iso and central_iso samples (central becomes RX and peripheral becomes TX).&lt;/p&gt;
&lt;p&gt;Once the patch is applied, you just have to build and flash these 2 samples on 2 different targets (Once flashed, the targets must be close to connect to each other since connection is based on RSSI).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0001_2D00_Peripheral_2D00_TX_2D00_ISO_2D00_Central_2D00_RX_2D00_ISO.patch"&gt;devzone.nordicsemi.com/.../0001_2D00_Peripheral_2D00_TX_2D00_ISO_2D00_Central_2D00_RX_2D00_ISO.patch&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is multiple defines at the beginning of the different main.c to customize the parameters we talked about.&lt;/p&gt;
&lt;p&gt;Let me know if you have any issue with this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/498185?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 07:30:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:048cbdf9-278e-4577-9c61-302d9a0a5b2c</guid><dc:creator>yuxuan.cai</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I was using the internal framework for quick testing, and it will take some time before I can convert it into something you could run. Would you mind sharing your codes?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Yuxuan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/498113?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 15:59:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e87ad27-d2a2-455f-9341-f6db36185efd</guid><dc:creator>thomas_hexploy</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In the following configuration:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ACL: 70ms&lt;/li&gt;
&lt;li&gt;SDU: 120 bytes&lt;/li&gt;
&lt;li&gt;ISO interval: 10ms&lt;/li&gt;
&lt;li&gt;Advertising: Every second&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I tried:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RTN:10 and latency: 50ms: I still have packet loss&lt;/li&gt;
&lt;li&gt;RTN:5 and latency: 20ms: I still have packet loss&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So unfortunately, &lt;strong&gt;I see no improvement on my side&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Could you provide me your sample code (that allowed you to have no packet loss) to reproduce it on my end ?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/498100?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 14:52:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69374414-9dc6-485c-8749-19223e3972c7</guid><dc:creator>yuxuan.cai</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have tested it a bit locally and managed to reproduce the packet loss you are seeing. It does seem to be an implmentation issue on our side. Although the root cause is not identified yet, it seems to be working &lt;strong&gt;when&amp;nbsp;NSE &amp;gt; 2 and FT &amp;gt; 1&lt;/strong&gt;. NSE and FT are selected by the controller with the provided RTN and max transport latency, and so far the configurations you have tried are, unfortunately, not meeting the two conditions at the same time.&amp;nbsp;The parameter selection algorithm of the controller is not exposed publicly and thus there are some trial &amp;amp; error to do. I am sorry for the inconvinience.&lt;/p&gt;
&lt;p&gt;You mentioned RTN=10 and max transport latency=50ms - have you tested this configuration? It&amp;nbsp;had no packet loss locally for me with an advertising interval=1s, ACL connection interval=70ms, max SDU size=120bytes, ISO interval=10ms.&lt;/p&gt;
&lt;p&gt;Or alternatively, could you try RTN=5, max transport latency=20ms? This is 48_4_1 in the quality of service configuration, and it&amp;nbsp;had no packet loss for me as well.&lt;/p&gt;
&lt;p&gt;Let us know if this is helpful to you!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Yuxuan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497758?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2024 09:32:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9b0f928-125f-43b3-b9d2-daf1db5f9147</guid><dc:creator>thomas_hexploy</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I tried with 60/70ms ACL connection time, I still have the same packet loss.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is my understanding of the current problem:&lt;/p&gt;
&lt;p&gt;Advertising is 4.5ms, so in our case this is the duration of about 3 ISO frames (3 * 1.5ms). It means that 4 retransmissions should be sufficient to cover the collisions. I don&amp;#39;t know how much time takes ACL connection, but let&amp;#39;s say 1.5ms (feel free to correct me), it would mean 5 retransmissions in the worst case scenario.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So, with 10 RTN and a latency of 50ms,&lt;/strong&gt; &lt;strong&gt;I don&amp;#39;t see what can cause packet loss ?&lt;/strong&gt; I think it should cover every collision.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand why the worst case scenario (longest duration where ISO frames can&amp;#39;t be sent because of collision) isn&amp;#39;t known and why a configuration (retransmission and latency) is not possible to remove entirely this packet loss.&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t have specific requirements on latency and retransmission (as far as it&amp;#39;s reasonable), if it allows no packet loss. We are in connected mode (CIS).&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497738?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2024 07:57:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84cb48f8-f340-4af6-8b1e-01224c149c61</guid><dc:creator>yuxuan.cai</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The ACL connection interval you are using seems a bit too large. Could you try a smaller value of 60 or 70ms?&lt;/p&gt;
&lt;p&gt;Due to clock drifts between devices, the peripheral will perform window widening to ensure it can&amp;nbsp;receive packets from central. Simply put, the larger connection interval it is, the larger window widening it will be. This window widening on ACL connection may block the CIS packet reception.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Yuxuan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497677?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 18:02:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:419dfb51-7b72-484f-a395-f96e749dce3f</guid><dc:creator>thomas_hexploy</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;So this is my current configuration:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Advertising: 1/1.2s&lt;/li&gt;
&lt;li&gt;ACL: 450/750 ms&lt;/li&gt;
&lt;li&gt;RTN: 13&lt;/li&gt;
&lt;li&gt;Latency: 100 ms&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In theory, we should have no packet loss with this configuration (related to Soft Device internal mechanism/scheduling).&lt;/p&gt;
&lt;p&gt;The result of my tests shows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Increasing latency and RTN reduces packet loss, I now see 0.1% packet loss instead of 1%. However, it&amp;#39;s still too much loss for a &amp;quot;best case scenario&amp;quot; (2 boards next to each others).&lt;/li&gt;
&lt;li&gt;Increasing ACL connection is not reducing packet loss.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;#39;m sorry to insist, but I need a configuration with 0% packet loss in the &amp;quot;best case scenario&amp;quot;. This is mandatory for our product to have the packet loss to a minimum (even though we know we can&amp;#39;t have 0% packet loss when deployed).&lt;br /&gt;&lt;br /&gt;To my knowledge, NRFSniffer does not support Isochronous connection. If it&amp;#39;s not supported, I can provided you the code I run to reproduce it on your side. That would allow you to sniff the traffic on your side.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;As a reminder, if I remove advertising I see absolutely no packet loss&lt;/strong&gt;. (Even with 30/60ms ACL connection time)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497661?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 15:09:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bacc66bb-4af3-4b45-ba80-274d26e11955</guid><dc:creator>yuxuan.cai</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Here&amp;nbsp;is another possibility.&lt;br /&gt;&lt;br /&gt;The ISO reception could be blocked by the ACL connection. To establish a CIS, you shall have an ACL connection by the spec. These two connections have&amp;nbsp;individual intervals, and it is possible/expected that they would interfere with each other. What is the connection interval you are using for the ACL connection? It is recommended to use an ACL connection interval larger than ISO interval (say 60ms or 70ms when&amp;nbsp;the ISO interval is 10ms) to reduce the inteference. Such interference might already exist before, and&amp;nbsp;it was not noticed because of the retransmission. With the advertising activity of the peripheral, the radio becomes busier and thus the packet loss is noticed.&lt;br /&gt;&lt;br /&gt;It is not guaranteed to work but could you please try a RTN = 13 with a max transport latency &amp;gt;= 50 ms? This allows&amp;nbsp;transmitting the same ISO packet across 5 ISO intervals, in which each interval the packet could be retransmitted 3 times.&lt;br /&gt;&lt;br /&gt;Also, it would be nice if you have any sniffer logs that we could look into.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Yuxuan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497656?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 14:30:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f870211e-0f73-4c83-8562-50cb05abcec0</guid><dc:creator>thomas_hexploy</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My advertising is 1 second, not 20ms.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Sorry for the confusion it was only to amplify what I didn&amp;#39;t understand in one post. You can forget this value of 20ms.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So since my advertising is (about) every second, my diagram is valid (I think) and I don&amp;#39;t understand why the parameters (rtn:2, latency: 20ms) do not work. Can you provide me with an example where this doesn&amp;#39;t work ?&lt;/p&gt;
&lt;p&gt;If possible, can you provide me with the correct parameters to have no packet loss with 1s advertising, 10ms ISO interval and 128 bytes payload ?&amp;nbsp; (In my opinion, the correct parameters are predictable)&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497654?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 14:15:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfb652fa-54e8-422f-938d-10bd767668fd</guid><dc:creator>yuxuan.cai</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry for chiming in.&amp;nbsp;As you already know,&amp;nbsp;with an advertising interval set to 20ms, the actual advertising interval could range from 10ms to 30ms due to the random offset. So in the updated diagram, it is possible that the retransmitted Frame B is also blocked by the advertising activity, when the actual advertising interval is ~10ms. Since the retransmission number (RTN) is set to 2, and Frame B has been transmitted twice without a success, Frame B will be flushed, resulting in a packet loss.&lt;br /&gt;&lt;br /&gt;For reference, the basic audio profile (BAP) for Bluetooth low energy defines two sets of quality of service configurations: low latency and high reliability (See 5.6.2 QoS Configurations in&amp;nbsp;&lt;a id="" href="https://www.bluetooth.com/specifications/specs/basic-audio-profile-1-0-1/"&gt;https://www.bluetooth.com/specifications/specs/basic-audio-profile-1-0-1/&lt;/a&gt;). There you can see a &lt;span&gt;RTN&lt;/span&gt;&amp;nbsp;of 2 is still in the realm of &amp;quot;low latency&amp;quot;. In your application, to ensure a high reliabitliy without a high packet loss rate, I&amp;#39;d recommend a much higher &lt;span&gt;RTN&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;As a side note,&amp;nbsp;the Softdevice Controller would select flush timeout (FT) and number of subevents (NSE) based on the given &lt;span&gt;RTN&lt;/span&gt;&amp;nbsp;and max transport latency. I wouldn&amp;#39;t go into details about FT and NSE here to keep the answer short. However, the Softdevice Controller would always prioritize max transport latency over &lt;span&gt;RTN&lt;/span&gt;, as by the Core Specification, the &lt;span&gt;RTN&lt;/span&gt;&amp;nbsp;is only a recommendation, not a mendatory requirement. Therefore, I would suggest setting a max transport latency that your application can accept first and foremost, and then increase the &lt;span&gt;RTN to achieve better reliability.&lt;br /&gt;&lt;br /&gt;Hope this helps!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;Cheers,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yuxuan&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497612?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 11:42:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c519edfd-92ff-4fb0-9b6f-5908c51a4513</guid><dc:creator>thomas_hexploy</dc:creator><description>&lt;p&gt;I have updated my diagram according to your previous message:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2273.timing.png" /&gt;&lt;br /&gt;&lt;br /&gt;If I follow correctly, with 2&amp;nbsp;retransmission and a latency of 20ms, we shouldn&amp;#39;t have any loss. This is what is represented on the diagram.&lt;/p&gt;
&lt;p&gt;So, can you explain to me, why 2 retransmission and a latency of 20ms does not solve this packet loss issue ?&lt;br /&gt;&lt;br /&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497600?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 10:09:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed8ff2b0-90e5-47ee-93e8-982dd8b79dfd</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="thomas_hexploy"]How is this implemented in the SoftDevice ? Can you confirm that the ~10ms delay is blocking any transmission/reception ?[/quote]
&lt;p&gt;No, it is not. Advertising blocks for about 4.5ms per advertising event. But due to the random offset this is not consistent so you cannot schedule the advertising events to always be between other activity. And the ISO transmissions happen at a fixed interval. So as you have one fixed interval (ISO) and one gliding and varying interval (advertising) whese will collide from time to time in a non-deterministic way.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497598?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 09:48:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54392f43-c830-4245-af94-86b12e8c7378</guid><dc:creator>thomas_hexploy</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Thank you for your response. However, there are two points I&amp;#39;d like to clarify:&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t quite understand why these 10ms would cause a collision. From my perspective, this is only a delay and should not interfere with transmission or reception. If we consider the minimum advertising interval allowed by the specification, which is 20ms, &lt;strong&gt;this would imply that up to 33% &lt;/strong&gt;(10ms random delay divided by 30ms, which is the total advertising duration, 20ms + random delay) &lt;strong&gt;of the bandwidth might be unavailable&lt;/strong&gt;. Therefore, in my understanding, this delay should not cause collision with any reception or transmission.(I used the information provided in &amp;quot;Legacy advertising&amp;quot; section of &lt;a id="" href="https://www.bluetooth.com/blog/periodic-advertising-sync-transfer/"&gt;https://www.bluetooth.com/blog/periodic-advertising-sync-transfer/&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;How is this implemented in the SoftDevice ? Can you confirm that the ~10ms delay is blocking any transmission/reception ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Even if we treat the 10ms delay as part of the advertising, it would suggest that advertising takes 14.5ms, which is still under 20ms (the time between 3 retransmissions). So,&lt;strong&gt; I don&amp;rsquo;t understand how a packet could be lost with 3 retransmissions and a 40ms latency&lt;/strong&gt; (as I tested). The following diagram illustrates my perspective (I simplified it, focusing on lost packet):&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/6708.timing.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Could you please point out where I might be mistaken?&lt;br /&gt;&lt;br /&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497564?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 07:27:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:452c60b9-8499-4b24-bbb4-dc7a4271e8c1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="thomas_hexploy"]increasing retransmission and latency improve the situation however with my configuration[/quote]
&lt;p&gt;That is good.&lt;/p&gt;
[quote user="thomas_hexploy"]If advertising takes 4.5ms, with retransmission set to 2 and latency set to 20ms, it should be enough to cover all collision with advertising. Isn&amp;#39;t it ?[/quote]
&lt;p&gt;In principle, yes. However, legacy advertising packets have a random offset of 0-10 ms per the Bluetooth sepcification, so you cannot schedule it exactly where it would fit in between the ISO packets.&lt;/p&gt;
[quote user="thomas_hexploy"]&lt;p&gt;In this section it is stated that &amp;quot;For optimal scheduling, the periodic advertising interval and ISO interval should have a common factor, and the sum of the periodic and extended advertising timing-event lengths should be less than the BIG reserved time&amp;quot;.&lt;/p&gt;
&lt;p&gt;So, do you think we could reduce the impact of advertising by configuring these ?&lt;/p&gt;[/quote]
&lt;p&gt;This applies to periodic avertising only, but as that was not mentioned before I assumed you are using only legacy (normal) advertising. If that is the case(?), this is not relevant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497556?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 06:50:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a16019c-662b-4558-a4a6-668c9c9605aa</guid><dc:creator>thomas_hexploy</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I tried the following configuration:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;retransmission: 1, latency: 30ms or 100ms: No change&lt;/li&gt;
&lt;li&gt;retransmissions: 3, latency: 10ms: No change&lt;/li&gt;
&lt;li&gt;retransmissions: 3, latency: 30ms: Reduce packet loss by factor 2.5 (so packet loss when advertising is ~25% instead of 65%)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, increasing retransmission and latency improve the situation however with my configuration I don&amp;#39;t understand why we don&amp;#39;t have 0 packet lost. If advertising takes 4.5ms, with retransmission set to 2 and latency set to 20ms, it should be enough to cover all collision with advertising. Isn&amp;#39;t it ?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Moreover I found few interesting thing in the Soft Device scheduling documentation (&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/softdevice_controller/doc/scheduling.html):"&gt;docs.nordicsemi.com/.../scheduling.html):&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In &amp;quot;BIS timing&amp;quot; (&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/softdevice_controller/doc/scheduling.html#broadcast_isochronous_channels_timing)"&gt;docs.nordicsemi.com/.../scheduling.html&lt;/a&gt;, there are few parameters that seems to transpose to CIS:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;BT_CTLR_SDC_BIG_RESERVED_TIME_US&lt;/em&gt;: Equivalent of &lt;em&gt;BT_CTLR_SDC_CIG_RESERVED_TIME_US&lt;/em&gt; for CIS&lt;/li&gt;
&lt;li&gt;&lt;em&gt;BT_CTLR_SDC_PERIODIC_ADV_EVENT_LEN_DEFAULT&lt;/em&gt;: Is it used by CIS ?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this section it is stated that &amp;quot;For optimal scheduling, the periodic advertising interval and ISO interval should have a common factor, and the sum of the periodic and extended advertising timing-event lengths should be less than the BIG reserved time&amp;quot;.&lt;/p&gt;
&lt;p&gt;So, do you think we could reduce the impact of advertising by configuring these ?&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;quot;CONFIG_BT_CTLR_SDC_PERIODIC_ADV_EVENT_LEN_DEFAULT: The time set aside for periodic advertising each periodic advertising interval in microseconds. The event length is the primary parameter for how much data can be transmitted by the periodic advertiser without scheduling conflicts occurring.&amp;quot;&lt;/em&gt;. &lt;br /&gt;My understanding is that we can reduce scheduling conflict (advertising) using this parameter. If so, which value should we use ? If not, I&amp;#39;m not sure to understand what this value does, could you provide me with more insight ?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497472?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2024 11:43:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c10e1b0-da61-43e7-99fe-977f4eac74e0</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The numbers you are seeing make sense. The reason is that a legacy advertising event takes about 4.5 ms in our implementation (including time for a potential scan request and scan response). And an ISO event with 128 byte takes about 1 ms as you write, but including overhead it is 1.5 ms. So in this case, with an ISO packet every 10 ms, there likelyhood of a collision is above 50%, as you are seeing. In other words, what you are seeing is expected.&lt;/p&gt;
&lt;p&gt;You&amp;nbsp;may want to consider increasing the retransmission coun and transport latency to better handle the packet loss.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497371?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2024 15:55:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58ac7463-952c-4cea-8af5-f97a899a8513</guid><dc:creator>thomas_hexploy</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I understand what you are saying but I think the packet loss is excessive.&lt;br /&gt;&lt;br /&gt;I used the advertising parameters 1-1.2s during 10 minutes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Maximum possible advertising: 1 * 10 * 60 = 600 advertisements.&lt;/li&gt;
&lt;li&gt;Number of packets lost: 393&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If there is no advertising, there is no packet loss, so I can say that packet loss are caused by advertising.&lt;br /&gt;&lt;br /&gt;It means that 393/600 = &lt;strong&gt;~66% of the advertising packets causes a packet lost&lt;/strong&gt;. (if I take the worst case scenario, meaning 500 advertisements, it would be 393/500 = ~79%)&lt;br /&gt;&lt;br /&gt;If I try to keep it simple, with a 2M PHY (and retransmission set to 1):&lt;/p&gt;
&lt;p&gt;We send an ISO&amp;nbsp;packets every 10ms, let&amp;#39;s say that sending an ISO&amp;nbsp;frame takes 1ms (128 bytes payload), it means ISO&amp;nbsp;uses 10% of the bandwidth. I have trouble understanding that with 90% of the bandwidth available, 66% of the advertising packets cause ISO&amp;nbsp;frames to be lost.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Could you explain why there is so much collision ?&lt;/p&gt;
&lt;p&gt;Increasing retransmission is not reducing the packet loss. Why ?&lt;br /&gt;&lt;br /&gt;Thank you&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;FYI, I use the following parameters, with one CIS channel (extracted from Zephyr sample &lt;em&gt;peripheral_iso&lt;/em&gt; and &lt;em&gt;central_iso&lt;/em&gt;):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static uint16_t latency_ms = 10U; /* 10ms */
static uint32_t interval_us = 10U * USEC_PER_MSEC; /* 10 ms */

param.sca = BT_GAP_SCA_UNKNOWN;
param.packing = 0;
param.framing = 0;
param.c_to_p_latency = latency_ms; /* ms */
param.p_to_c_latency = latency_ms; /* ms */
param.c_to_p_interval = interval_us; /* us */
param.p_to_c_interval = interval_us; /* us */&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497359?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2024 14:18:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:837ccc7e-0b74-408d-9399-d0d6056fe5fc</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is not due to a regression, but a difference in priorities in the Packetcraft controller and the SoftDevice controlloller. The Packetcraft controller always prioritizes ISO. The advantage with that is that it is less likely to get ISO packet loss. The disadvantage: other activities are influenced more. This may result in link loss, no packets being sent at all or reduced randomness in the random offsett for the advertiser.&lt;/p&gt;
&lt;p&gt;The priority between ISO and other activities is not configurable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497351?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2024 13:43:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13d3c66e-10b6-4b00-a7a9-a395653654d4</guid><dc:creator>thomas_hexploy</dc:creator><description>&lt;p&gt;We did an other test with NCS 2.6, Packet Craft for CPU Net (ble5-ctr-rpmsg_18929.hex) and an &amp;quot;aggressive advertising&amp;quot; (30/60ms).&lt;/p&gt;
&lt;p&gt;=&amp;gt; We have almost no packet loss (few packets times to times), clearly below 0.1% in the same test conditions.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So I keep thinking, this is a regression from previous NCS. Can you confirm this ? How can we fix it ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497210?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2024 15:34:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:084455b2-f6a1-4ba2-a05b-84d0e498f8ee</guid><dc:creator>thomas_hexploy</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;We are migrating from NCS 2.1 with Packet Craft firmware (CPU NET) and we did not have this problem (at least it was not so significant).&lt;br /&gt;&lt;br /&gt;With the configuration described in my first message, I advertised using different parameters (provided to bt_le_adv_start):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No advertising: No packet loss =&amp;gt; 0% loss&lt;/li&gt;
&lt;li&gt;BT_GAP_ADV_FAST_INT_MIN_1 (30 ms) and BT_GAP_ADV_FAST_INT_MAX_1 (60 ms): 568 packets lost (out of 3425) =&amp;gt; &lt;strong&gt;~17% loss&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;BT_GAP_ADV_FAST_INT_MIN_2 (100 ms) and BT_GAP_ADV_FAST_INT_MAX_2 (150 ms): 226 packets lost (out of 3400) =&amp;gt; &lt;strong&gt;~7% loss&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;BT_GAP_ADV_SLOW_INT_MIN (1 s) and BT_GAP_ADV_SLOW_INT_MAX (1.2 s): 21 packets lost (out of 2800) =&amp;gt; &lt;strong&gt;~1% loss&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Looking at these numbers it seems that the&lt;strong&gt; advertising almost always causes an ISO&amp;nbsp;packet loss&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Even though we were to use the best case scenario (advertising parameters between 1 and 1.2s), we would have a minimal 1% loss, which is too much for our use case.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;With Packet Craft, we used the advertising parameters between 30 and 60ms, and we were clearly below 1% packet loss. So I don&amp;#39;t think it&amp;#39;s normal to have this today, and it seems more like a regression.&lt;br /&gt;&lt;br /&gt;What do you think ?&lt;br /&gt;&lt;br /&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Packet loss during ISO transmission when advertising</title><link>https://devzone.nordicsemi.com/thread/497196?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2024 14:55:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab1cefe0-1b24-4509-af8e-c2c6241dfa17</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When advertisign while in an ISO connection there will be collisions from time to time. And in this case, the stack prioritizes the advertising packets. To reduce the ISO packet loss you could increase the number of ISO retransmissions, and ansure you use an advertising interval that is as high as possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>