<?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>nRF52840 - Unable to increase Peripheral link count to max (20)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37949/nrf52840---unable-to-increase-peripheral-link-count-to-max-20</link><description>Hi, I&amp;#39;m trying to increase the NRF_SDH_BLE_PERIPHERAL_LINK_COUNT to max possible (20) in my project. When I first tried to do this the softdevice prompted me with this error: 
 
 After this I went into the settings for the project and changed &amp;#39;RAM_SIZE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Aug 2018 15:19:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37949/nrf52840---unable-to-increase-peripheral-link-count-to-max-20" /><item><title>RE: nRF52840 - Unable to increase Peripheral link count to max (20)</title><link>https://devzone.nordicsemi.com/thread/146559?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 15:19:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e06d5945-6637-4e1a-a409-9571ecdc5d8a</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="73389" url="~/f/nordic-q-a/37949/nrf52840---unable-to-increase-peripheral-link-count-to-max-20/146251"]Is there anyway to calculate these values instead of doing trial and error?[/quote]
&lt;p&gt;No. The SoftDevice will output the RAM requirements after you have configured it, and you need to do this by trail and error.&lt;/p&gt;
[quote userid="73389" url="~/f/nordic-q-a/37949/nrf52840---unable-to-increase-peripheral-link-count-to-max-20/146251"]Also, what consequences can it have on the application when lowering NRF_SDH_BLE_GAP_DATA_LENGTH and NRF_SDH_BLE_GATT_MAX_MTU?&amp;nbsp;[/quote]
&lt;p&gt;The data length is the&amp;nbsp;on-air packet size, and the MAX MTU parameter is the maximum length of an ATT packet. For a 1 to 1 connection, lowering these parameters could lead to a lower&amp;nbsp;throughput. For a 20 link connection, it might actually be beneficial to have a 27 byte data length, since the event length could also be lower, giving the scheduler better time to handle the 20 links and prevent connection events from overlapping. For more information, see the page &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/multilink_scheduling/suggested_intervals_windows_s132.html?cp=2_3_1_0_14_9"&gt;Suggested intervals and windows&lt;/a&gt; and &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/ble_data_throughput/ble_data_throughput.html?cp=2_3_1_0_16"&gt;Bluetooth Low Energy data throughput&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - Unable to increase Peripheral link count to max (20)</title><link>https://devzone.nordicsemi.com/thread/146251?ContentTypeID=1</link><pubDate>Wed, 29 Aug 2018 08:40:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61d3d87a-d581-45e9-81bd-054729186d9a</guid><dc:creator>AntonHellbe</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;br /&gt;&lt;br /&gt;Thanks for you answer.&lt;br /&gt;&lt;br /&gt;Lowering both NRF_SDH_BLE_GAP _DATA_LENGTH and NRF_SDH_BLE_GATT_MAX_MTU_SIZE to 150 instead of 251/247 allowed me to increase the Peripheral link count to 20.&amp;nbsp;Is there anyway to calculate these values instead of doing trial and error?&lt;br /&gt;&lt;br /&gt;Also, what consequences can it have on the application when lowering NRF_SDH_BLE_GAP_DATA_LENGTH and NRF_SDH_BLE_GATT_MAX_MTU?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Br,&lt;br /&gt;Anton&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - Unable to increase Peripheral link count to max (20)</title><link>https://devzone.nordicsemi.com/thread/146245?ContentTypeID=1</link><pubDate>Wed, 29 Aug 2018 08:26:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58b048f3-101b-4fe0-944c-99e445e7cea0</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You could also get NRF_ERROR_NO_MEM from &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.0/group___b_l_e___c_o_m_m_o_n___f_u_n_c_t_i_o_n_s.html?cp=2_3_2_1_0_2_0_2_2_1#ga8a92420df90945526d4c89d09486508d"&gt;sd_ble_enable()&lt;/a&gt; if the dynamic part of the SoftDevice RAM region is larger than 64 kB(which is currently not supported).&lt;/p&gt;
&lt;p&gt;In order to support 20 links, you might need to decrease the GAP data length and/or the max MTU size, so you go under the 64 kB limit. You will need to adjust NRF_SDH_BLE_GAP_DATA_LENGTH and/or NRF_SDH_BLE_GATT_MAX_MTU_SIZE in sdk_config.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>