<?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>Fine tuning connection and scanning parameters in a BLE Network</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99733/fine-tuning-connection-and-scanning-parameters-in-a-ble-network</link><description>Hi all, 
 We have a setup of multiple nRF52832 communication together, forming a network, and they are responsible for delivering messages. 
 So let&amp;#39;s list our network components more clearly: 1- Device A, All messages from the network should be forwarded</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 May 2023 08:36:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99733/fine-tuning-connection-and-scanning-parameters-in-a-ble-network" /><item><title>RE: Fine tuning connection and scanning parameters in a BLE Network</title><link>https://devzone.nordicsemi.com/thread/427424?ContentTypeID=1</link><pubDate>Thu, 25 May 2023 08:36:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c82b74f-18b9-438a-a4eb-3500635e8b3b</guid><dc:creator>Hieu</dc:creator><description>[quote user="Karim_Os"]First of all, I hope you enjoy your holiday,[/quote]
&lt;p&gt;Thank you. I had a good time.&lt;/p&gt;
[quote user="Karim_Os"]1- Yes, we can reconnect, but we can have two times disconnection per hour[/quote]
&lt;p&gt;Depends on how electromagnetically noisy your environment is, and what range your device is operating at, this might be normal.&lt;/p&gt;
&lt;p&gt;If your devices are very far from each other, try bumping up the TX Power of the devices. You can find the method discussed&amp;nbsp;several times on DevZone via the search function or an internet search engine.&lt;/p&gt;
[quote user="Karim_Os"]2- We use both ways, from central to peripheral and vice versa, so slave latency actually delays some of the messages if SL is large[/quote]
&lt;p&gt;You don&amp;#39;t need to use a large SL. Just a small amount is already very helpful for the central to schedule events.&lt;/p&gt;
&lt;p&gt;Larger&amp;nbsp;values are mostly used for peripheral power saving purpose.&lt;/p&gt;
&lt;p&gt;What is your requirement regarding latency? At 30ms connection interval, even with large peripheral latency (like 100), the delay will only be 3s.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fine tuning connection and scanning parameters in a BLE Network</title><link>https://devzone.nordicsemi.com/thread/426093?ContentTypeID=1</link><pubDate>Wed, 17 May 2023 17:41:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46627f15-7f8c-4464-95d2-c8365341dbb8</guid><dc:creator>Karim_Os</dc:creator><description>&lt;p&gt;First of all, I hope you enjoy your holiday,&lt;br /&gt;second things:&lt;br /&gt;1- Yes, we can reconnect, but we can have two times disconnection per hour&lt;br /&gt;2- We use both ways, from central to peripheral and vice versa, so slave latency actually delays some of the messages if SL is large&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fine tuning connection and scanning parameters in a BLE Network</title><link>https://devzone.nordicsemi.com/thread/425995?ContentTypeID=1</link><pubDate>Tue, 16 May 2023 19:51:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8815535-e479-45ee-8199-b5bb1f77d68f</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;I understand your requirement as followed:&lt;/p&gt;
&lt;p&gt;- Up to two type-C devices shall be connected to one type-B device&lt;br /&gt;- Up to two type-B devices&lt;span&gt;&amp;nbsp;shall be&lt;/span&gt; connected to one type-A device&lt;br /&gt;- Each type-C device shall transmit 100 bytes of data every 1 minute&lt;br /&gt;- Each type-B device shall transmit all&amp;nbsp;date received from type-C devices to the type-A device it is connected to&lt;/p&gt;
&lt;p&gt;This requirement&amp;nbsp;is not extreme, and achieving stability and reliability should not be an issue. How often are you having the connection timeout issue? Is the reconnection also not working well?&lt;/p&gt;
[quote user="Karim_Os"]I tried to increase slave latency, but it affected the data sent back from A to C.[/quote]
&lt;p&gt;What is the concern regarding this? Must the latency be very low?&lt;/p&gt;
[quote user="Karim_Os"]nRF52 SDK16.0.0[/quote]
&lt;p&gt;If you are in the early stage of your project, please try to use our newest SDK. We are actively developing &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/release_notes.html"&gt;the nRF Connect SDK, and the latest version is v2.3.0&lt;/a&gt;&amp;nbsp;as of time of writing. If you have to use the nRF5 SDK, we recommend using the latest version, v17.1.0.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please be informed that I will&amp;nbsp;have a holiday and days off from tomorrow. I will return later next week and continue to support you if you have any further questions. My apology for the inconvenience.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fine tuning connection and scanning parameters in a BLE Network</title><link>https://devzone.nordicsemi.com/thread/425817?ContentTypeID=1</link><pubDate>Tue, 16 May 2023 10:18:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35ae2eee-5814-4e39-9ce4-7994ffd18407</guid><dc:creator>Karim_Os</dc:creator><description>&lt;p&gt;Thank you for your quick&amp;nbsp; response,&amp;nbsp;&lt;/p&gt;
[quote userid="9456" url="~/f/nordic-q-a/99733/fine-tuning-connection-and-scanning-parameters-in-a-ble-network/425722"]&lt;p&gt;What SDK are you using? nRF Connect SDK or nRF5 SDK? And which version?&lt;/p&gt;
&lt;div class="quote-header"&gt;&lt;/div&gt;&lt;blockquote class="quote"&gt;&lt;div class="quote-content"&gt;&lt;/div&gt;&lt;/blockquote&gt;[/quote]
&lt;p&gt;nRF52 SDK16.0.0&lt;/p&gt;
[quote userid="9456" url="~/f/nordic-q-a/99733/fine-tuning-connection-and-scanning-parameters-in-a-ble-network/425722"]By 100 bytes, do you mean that each Device C will send 100 byte at a time? [/quote]
&lt;p&gt;Yes, for each device&amp;nbsp;&lt;/p&gt;
[quote userid="9456" url="~/f/nordic-q-a/99733/fine-tuning-connection-and-scanning-parameters-in-a-ble-network/425722"]you can try looking into the Supervision Timeout and Peripheral Latency connection parameters.&amp;nbsp;[/quote]
&lt;p&gt;&lt;/p&gt;
[quote userid="9456" url="~/f/nordic-q-a/99733/fine-tuning-connection-and-scanning-parameters-in-a-ble-network/425722"]could you give some estimation on how many type-C is connected to a type-B, and how often each type-C will transmit data?[/quote]
&lt;p&gt;We have C devices double the count of others; each sends 100 bytes of data every 1 minute.&lt;/p&gt;
[quote userid="9456" url="~/f/nordic-q-a/99733/fine-tuning-connection-and-scanning-parameters-in-a-ble-network/425722"]you can try looking into the Supervision Timeout and Peripheral Latency connection parameters.&amp;nbsp;[/quote]
&lt;p&gt;I tried to increase slave latency, but it affected the data sent back from A to C.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fine tuning connection and scanning parameters in a BLE Network</title><link>https://devzone.nordicsemi.com/thread/425723?ContentTypeID=1</link><pubDate>Mon, 15 May 2023 20:37:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:654c6111-c524-4ac0-ada2-ffcba6e48633</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;By the way, there are a few things I would like to recommend you to:&lt;/p&gt;
&lt;p&gt;Search for previous DevZone questions, for example, I can find two relevant ones fairly quickly:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/88739/ble-connection-parameters-choice-for-multiple-connection"&gt;BLE Connection parameters choice for multiple connection&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/44762/ble-multi-link-high-throughput-lowest-latency"&gt;BLE Multi-link high throughput / lowest latency&lt;/a&gt;&lt;br /&gt;Even if you are using a different SDK from the one in discussion, the numbers should still relevant be and can be referred.&lt;/p&gt;
&lt;p&gt;Checkout this NovelBits blog post on maximizing throughput:&amp;nbsp;&lt;a href="https://novelbits.io/bluetooth-5-speed-maximum-throughput/"&gt;https://novelbits.io/bluetooth-5-speed-maximum-throughput/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fine tuning connection and scanning parameters in a BLE Network</title><link>https://devzone.nordicsemi.com/thread/425722?ContentTypeID=1</link><pubDate>Mon, 15 May 2023 20:33:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef1b4d86-af29-4136-b894-73359b8f7a1f</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Karim_Os,&lt;/p&gt;
&lt;p&gt;What SDK are you using? nRF Connect SDK or nRF5 SDK? And which version?&lt;/p&gt;
[quote user=""]1- How to know the packets per connection interval as we have ~ 100 bytes of sensor data, so we need to ensure it is transmitted in a single connection interval - hopefully, that is the right decision for throughput-&amp;nbsp;&amp;nbsp;[/quote]
&lt;p&gt;By 100 bytes, do you mean that each Device C will send 100 byte at a time? Or all Devices C will send a total of 100?&amp;nbsp;How often is this sent?&lt;/p&gt;
&lt;p&gt;Sending all 100 bytes in one connection interval is possible, as a link layer packet can be 251 bytes maximum. Subtracting some overhead of other layers, you are still left with&amp;nbsp;maximum 244 bytes of application data for each &lt;em&gt;packet&lt;/em&gt;, which you can have multiple in a connection interval.&lt;/p&gt;
[quote user=""]2- What is the best connection interval to be chosen? The smaller, the better, or it has other calculations?[/quote]
&lt;p&gt;It depends&amp;nbsp;on both your data rate requirement and&amp;nbsp;how likely devices are transmitting within the (relatively) same time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In addition to the questions I asked previously, could you give some estimation on how many type-C is connected to a type-B, and how often each type-C will transmit data?&lt;/p&gt;
[quote user=""]3- How to perform scanning while connecting (as devices A and B are connected together to forward the sensor data) and at the same time always scan for new C-devices without affecting the throughput?[/quote]
&lt;p&gt;Scanning can be enabled the same way that is done when there is no connection established yet.&lt;/p&gt;
[quote user=""]&lt;p&gt;4-&amp;nbsp;for instance, if we have the following:&lt;br /&gt;a- Device A connected to device&amp;nbsp;B and receiving data&lt;/p&gt;
&lt;p&gt;b- device A connected to 2 devices B and receiving data from only one, and the other is idle&lt;/p&gt;
&lt;p&gt;c- device A connected to 2 devices B and receiving from both of them simultaneously,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;what is the effect of the throughput and connection stability in these cases, I think case (a) is the best, but for b and c, would it differ? Why? And most importantly, how to manage throughput in a multilink like this&amp;nbsp;while maintaining connection&amp;nbsp;&lt;strong&gt;stability and&lt;/strong&gt;&amp;nbsp;&lt;strong&gt;reliability&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;/strong&gt;as sometimes I face a connection timeout for the current configurations of all devices (30 ms connection intervals)&amp;nbsp;&lt;/p&gt;[/quote]
&lt;p&gt;It quite depends on the details I have&amp;nbsp;asked for above.&amp;nbsp;As some general tips, you can try looking into the Supervision Timeout and Peripheral Latency connection parameters.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you feel like you could use some review of the fundamentals of&amp;nbsp;a BLE connection,&amp;nbsp;Nordic provides &lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/"&gt;a free online course on BLE Fundamentals&lt;/a&gt;, where the basics of a connection is covered in &lt;a href="https://academy.nordicsemi.com/lessons/lesson-3-bluetooth-le-connections/"&gt;Lesson 3&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>