<?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>Bluetooth connection context</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93636/bluetooth-connection-context</link><description>I have to make a connection from a central_uart to 4 periperal_uart every 60ms Sending 30 byte . 
 I Have to make a polling of all the peripheral every 60ms. 
 I know that a connection will take 7.5mS more or less. If I use Bluetooth connection context</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Nov 2022 11:49:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93636/bluetooth-connection-context" /><item><title>RE: Bluetooth connection context</title><link>https://devzone.nordicsemi.com/thread/394897?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2022 11:49:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71ea4482-afab-4bfb-8ea4-3e0fc3fa0697</guid><dc:creator>novello</dc:creator><description>&lt;p&gt;oK Thank for the documentation, ... I need some time to study&lt;/p&gt;
&lt;p&gt;I will activate the sniffer using 1 Central UART 2 periferal_uart&amp;nbsp; and a sniffer.&lt;/p&gt;
&lt;p&gt;Thank also for&amp;nbsp; the examples I have fount (uart_througput).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth connection context</title><link>https://devzone.nordicsemi.com/thread/394872?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2022 10:15:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:288f2a59-79cb-4ce0-8c04-cf4d00aea5c5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Novello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Which error do you have ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think the most important thing is that you can control the connection interval.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Have you checked which exact connection interval you have on the connection ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I have made a blog about optimizing connection interval &lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/building-a-bluetooth-application-on-nrf-connect-sdk-part-3-optimizing-the-connection"&gt;here&lt;/a&gt;. Please have a look.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please try to capture a&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nrf-sniffer-for-bluetooth-le"&gt; sniffer trace&lt;/a&gt;. From that we can do further analysis of the communication. Made sure you follow an advertiser before you make the connection. The sniffer can only track one connection at a time.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth connection context</title><link>https://devzone.nordicsemi.com/thread/394837?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2022 08:05:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e3e2992-c235-4eb5-ad55-165020e756ac</guid><dc:creator>novello</dc:creator><description>&lt;p&gt;I Have see the webminar. The main problem is that&amp;nbsp; in the BLE library there are many parameter that are not clear for me.&lt;/p&gt;
&lt;p&gt;my multi_nus and the 4 peripheral_uart work well if I send (20byte&amp;nbsp; message every 0.5 second.) If I have to send a message from the central_unit to the 4 peripheral every 80ms I have some errore.&lt;/p&gt;
&lt;p&gt;So I&amp;#39;m Trying to modify some parameter to ingrease the throughput&amp;nbsp; but for me is impossible to understand&amp;nbsp; what are:&lt;/p&gt;
&lt;p&gt;CONFIG_BT_ACL_RX_SIZE=502&amp;nbsp; &amp;nbsp;?&amp;nbsp; (see througput examples)&lt;/p&gt;
&lt;p&gt;CONFIG_BT_:AT_PREPARE_CONT=2&lt;/p&gt;
&lt;p&gt;CONFIG_BT_L2CAP_TX_BUF_COUNT =10 .. etc.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And how the modify the perfomance of my system. After that I have to setup coded_phy LINK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth connection context</title><link>https://devzone.nordicsemi.com/thread/394766?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 15:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1e02f8e-4a37-4d1a-beef-fc0af1a91f65</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Novello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I think you are having a misunderstanding on the Bluetooth connection.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The Bluetooth connection is always ON regardless of the connection interval. It only terminated if you either do a disconnection, or the devices are not in range.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The max and min connection interval doesn&amp;#39;t mean it&amp;#39;s the connection time. It&amp;#39;s the &lt;strong&gt;interval&lt;/strong&gt;. I would suggest to have a look at &lt;a href="https://youtu.be/BZwOrQ6zkzE?t=926"&gt;this video.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For example a connection interval of 100ms meaning that every 100ms the central will ping the peripheral and the peripheral will response to the ping of the central. This way the 2 devices know that they still can communicate to each other.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The super vision timeout is used when the device can&amp;#39;t communicate between each other (no ping) for a long time. If the time that they are not communicated is over the super vision timeout the connection will be terminated.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The minimum and maximum connection interval is only the preferable value that the peripheral gives the central, so the central can choose a connection interval inside the range between minimum and maximum connection interval.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth connection context</title><link>https://devzone.nordicsemi.com/thread/394759?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 15:05:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9832e817-87e9-4e16-a6a5-e53d8ac0efd4</guid><dc:creator>novello</dc:creator><description>&lt;p&gt;I&amp;#39;m trying to use the&amp;nbsp;&lt;span&gt;Bluetooth connection contex us is used in multi-nus. (for the moment). I need frome a central_uart to connect with 4 peripleral_uart and then send a mesage to the 4 peripheral every 20ms&amp;nbsp; ( I will do the complete loop in 80ms)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I setup:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;peripheral prefered maximun&amp;nbsp; connection interval =65000&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;peripheral prefered minimun&amp;nbsp; connection interval =65000&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then the connection bettwen the 5 ble devices is always ON.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And I will use the :The unit of super vision timeout is 10ms. So if you set the timeout to value 200 , for example, then it&amp;#39;s 200x10ms= 2 seconds. To verify if a device is &amp;quot;dead &amp;quot; There&amp;nbsp; is a callback that inform the application layer that a device is not &amp;quot;visible&amp;quot;?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth connection context</title><link>https://devzone.nordicsemi.com/thread/394746?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 14:34:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d56d844-d3c5-4f20-83bd-fa21d15e05af</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Novello,&amp;nbsp;&lt;/p&gt;
[quote user="novello"]&lt;p&gt;peripheral prefered maximun&amp;nbsp; connection interval&amp;nbsp; for me 20mS (at step of 1.25ms) or it have to be 500mS the connection will be always active. 500mS/1.125ms the maximunh is 65000 .....I CAN USE THIS&amp;nbsp; to be always connected&lt;/p&gt;
&lt;p&gt;peripheral prefered latency in connection latency in connection interval&amp;nbsp; &amp;nbsp; ==&amp;gt;0&lt;/p&gt;
&lt;p&gt;peripheral prefered supervision timeout in 10mS&amp;nbsp; &amp;nbsp;for me is 100 ==&amp;gt; 1 sec....&amp;nbsp; Which is the best choise?&amp;nbsp;&amp;nbsp;&lt;/p&gt;[/quote]
&lt;p&gt;Please try to elaborate a bit more clear I don&amp;#39;t fully understand what you are trying to describe here.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that the minimum and maximum connection interval is only for preference. There is only one actual connection interval used.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The unit of connection interval is in 1.25ms . So if you set minimum connection interval value to 6 it means 6x1.25 = 7.5ms&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The unit of super vision timeout is 10ms. So if you set the timeout to value 200 , for example, then it&amp;#39;s 200x10ms= 2 seconds.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please note that the connection interval is not the same as the time it take to establish a connection.&amp;nbsp;The connection interval&amp;nbsp;the&amp;nbsp;interval period when the central &amp;quot;ping&amp;quot; the peripheral.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth connection context</title><link>https://devzone.nordicsemi.com/thread/394734?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 14:17:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c80d489a-057b-4fed-a2d5-56eca977a207</guid><dc:creator>novello</dc:creator><description>&lt;p&gt;The problem is that in 20ms I have also to send 30 byte to the first peripheral,30byte to the sencond peripheral etc. ... to 4th peripheral. Sorry for me is not clear the meaning of:&lt;/p&gt;
&lt;p&gt;peripheral prefered minimum connection interval&amp;nbsp; for me is 7ms (at step&amp;nbsp; of 1.25ms)&amp;nbsp; It wil be used&amp;nbsp; the minimun range is 6&amp;nbsp;&lt;/p&gt;
&lt;p&gt;peripheral prefered maximun&amp;nbsp; connection interval&amp;nbsp; for me 20mS (at step of 1.25ms) or it have to be 500mS the connection will be always active. 500mS/1.125ms the maximunh is 65000 .....I CAN USE THIS&amp;nbsp; to be always connected&lt;/p&gt;
&lt;p&gt;peripheral prefered latency in connection latency in connection interval&amp;nbsp; &amp;nbsp; ==&amp;gt;0&lt;/p&gt;
&lt;p&gt;peripheral prefered supervision timeout in 10mS&amp;nbsp; &amp;nbsp;for me is 100 ==&amp;gt; 1 sec....&amp;nbsp; Which is the best choise?&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;But at the polling rate you have which is 60ms, it&amp;#39;s better to keep them all connected I think.!!! So this is the best solution&amp;nbsp; to have the peripheral&amp;nbsp; always connected !&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth connection context</title><link>https://devzone.nordicsemi.com/thread/394669?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 12:15:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df835d3f-af55-402d-aa44-e7563b66c09d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Novello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see any problem using Bluetooth Connection Context here. Please be aware that Bluetooth Connection Context has nothing to do with the connection parameters (connection interval). The main purpose of Bluetooth Connection Context is to store the CCCD values on each connection so that it can restore them when the same central/peripheral reconnected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can choose to keep the connection with all of the device simultaneously or you can choose to only connect to one at a time. But at the polling rate you have which is 60ms, it&amp;#39;s better to keep them all connected I think.&amp;nbsp;&lt;/p&gt;
[quote user=""]I know that a connection will take 7.5mS more or less[/quote]
&lt;p&gt;I assume you meant &amp;quot;connection interval&amp;quot; of 7.5ms ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;If you want to have support for multiple peripherals and if you don&amp;#39;t need too low connection interval (7.5ms) I would suggest to use 20ms connection interval. It will be easier for the scheduler to handle multiple connection with slightly larger connection interval (e.g 20ms) .&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>