<?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>Converting ble_app_uart_c  to support with multiple central connections</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92095/converting-ble_app_uart_c-to-support-with-multiple-central-connections</link><description>Hi All, 
 
 I modified ble_app_uart_c code to create multiple central connections instead of single central connection. 
 Here I am facing problem, once my central device is connected to peripheral getting fatal error. Checked my code with examples which</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Sep 2022 08:04:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92095/converting-ble_app_uart_c-to-support-with-multiple-central-connections" /><item><title>RE: Converting ble_app_uart_c  to support with multiple central connections</title><link>https://devzone.nordicsemi.com/thread/387211?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 08:04:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab2331e6-0043-4334-bc49-de770b0f01c8</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Sudheer,&lt;/p&gt;
&lt;p&gt;Great to know. I have suggested my&amp;nbsp;first answer&amp;nbsp;about the SoftDevice max link configuration as the answer to the original question this thread is about. If you&amp;nbsp;don&amp;#39;t mind, please verify it as the answer, or I can also do it later :D&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Converting ble_app_uart_c  to support with multiple central connections</title><link>https://devzone.nordicsemi.com/thread/387194?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2022 04:37:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19e46470-4427-4a14-a45d-df77a2bfe832</guid><dc:creator>A sudheer Kumar</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;Thanks for your support, It&amp;#39;s working fine for me after changing the values of Macros section placement according nrf52833 RAM size&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;sudheer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Converting ble_app_uart_c  to support with multiple central connections</title><link>https://devzone.nordicsemi.com/thread/387112?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 13:59:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab314107-447d-4522-bc57-28419880f8d0</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Sudheer,&lt;/p&gt;
&lt;p&gt;One thing that stands out immediately is that the RAM start address should be 0x2000&lt;strong&gt;5228&lt;/strong&gt; instead of 0x2000&lt;strong&gt;5288&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If that is intentional on your part, notice that&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;x5288 + x1ADD8 = x20060. That is more than the 128kB of RAM you have on the nRF52833&lt;/li&gt;
&lt;li&gt;There is no need to give the SoftDevice more RAM than it asks for&lt;/li&gt;
&lt;li&gt;Your application is basically running out of RAM as is.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So please fix it. However, this is small and probably not what is causing you problem. Unfortunately I don&amp;#39;t have the same issue using your main.c file&amp;nbsp;on a nRF52832 with even smaller RAM. I assume you have just added&amp;nbsp;some code to the application?&lt;/p&gt;
&lt;p&gt;I recommend you to take a look at this discussion:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/47579/heap-size"&gt;Heap size&lt;/a&gt;&amp;nbsp;.&lt;/p&gt;
&lt;p&gt;If that doesn&amp;#39;t help,&amp;nbsp;please open a new ticket, and&amp;nbsp;one of our Tech Support team will be happy to help you.&lt;/p&gt;
&lt;p&gt;Best of luck,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Converting ble_app_uart_c  to support with multiple central connections</title><link>https://devzone.nordicsemi.com/thread/387026?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 09:05:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b7655e4-7124-4475-bcf9-66c1e74f8573</guid><dc:creator>A sudheer Kumar</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;thanks for the replay,&lt;/p&gt;
&lt;p&gt;- Your memory setting configuration, where you changed the RAM start address.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -please check the attached pic for Macro section placement&lt;/p&gt;
&lt;p&gt;- Are you using only nRF52833 for this project?&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - Yes, Actually we are planning nrf52833 for concurrent peripheral and central connections, for collecting and sharing the sensors(like Temperature, Humidity, etc.. ) data across the devices. always welcome if you&amp;nbsp; have any advice.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;sure, New ticket will open for further communication&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&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/1121.ram.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Sudheer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Converting ble_app_uart_c  to support with multiple central connections</title><link>https://devzone.nordicsemi.com/thread/387022?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 08:54:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bfdca24-ada7-4355-9d2c-6024ceca02f0</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Sudheer,&lt;/p&gt;
&lt;p&gt;Glad to see you solved your original question.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s take a quick look at this next one. However, please know that&amp;nbsp;if it is sufficiently different/complicated, I will have to request you to open a new ticket.&lt;/p&gt;
&lt;p&gt;I need two information:&lt;/p&gt;
&lt;p&gt;- Your memory setting configuration, where you changed the RAM start address.&lt;/p&gt;
&lt;p&gt;- Are you using only nRF52833 for this project?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Converting ble_app_uart_c  to support with multiple central connections</title><link>https://devzone.nordicsemi.com/thread/386980?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 04:50:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4b8e7f4-ffa7-4ddd-88c9-0322758c288e</guid><dc:creator>A sudheer Kumar</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;Yes, you are correct.&amp;nbsp;&lt;span&gt;NRF_SDH_BLE_CENTRAL_LINK_COUNT was 4 but&amp;nbsp;NRF_SDH_BLE_TOTAL_LINK_COUNT was 1.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;now I changed&amp;nbsp; NRF_SDH_BLE_TOTAL_LINK_COUNT to 4 and build, while build it has been showing memory settings needs to change(please check the attached pic-error3).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Changed Section placement macros according to the attached pic, After changing section placement macros now it showing &amp;quot;heap is too large to fit in RAM1 memory segment&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;kindly guide me to solve this memory related issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;sudheer&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/4382.error3.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/Heap-error.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Converting ble_app_uart_c  to support with multiple central connections</title><link>https://devzone.nordicsemi.com/thread/386899?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2022 13:10:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b565a1a5-3425-45b9-a3fd-0bfc15ea5a72</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Sudheer,&lt;/p&gt;
&lt;p&gt;As you can see in&amp;nbsp;that log, the&amp;nbsp;assert happen at line 154 in your code, which is this section of code checking for Connecting Errors.&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void scan_evt_handler(scan_evt_t const * p_scan_evt)
{
    ret_code_t err_code;

    switch(p_scan_evt-&amp;gt;scan_evt_id)
    {
         case NRF_BLE_SCAN_EVT_CONNECTING_ERROR:
         {
              err_code = p_scan_evt-&amp;gt;params.connecting_err.err_code;
/* &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; */ APP_ERROR_CHECK(err_code);
         } break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Another thing you can see is that the error code is 18, NRF_ERROR_CONN_COUNT.&lt;/p&gt;
&lt;p&gt;From the name and context, you can guess, or confirm through the documentation, that this error indicates that&amp;nbsp;you are connecting more than the application is configured to handle.&lt;/p&gt;
&lt;p&gt;This analysis matches with your &lt;em&gt;&lt;strong&gt;first&lt;/strong&gt;&lt;/em&gt;&amp;nbsp;screenshot, where the log indicates a successful first connection, and&amp;nbsp;an error on the second connection attempt. However, it does not match with your second screenshot and typed out log... That bugs me a little.&lt;/p&gt;
&lt;p&gt;For now, could you please double check the following sdk_config items if they have been updated to a suitable value?&lt;/p&gt;
&lt;p&gt;NRF_SDH_BLE_TOTAL_LINK_COUNT&lt;br /&gt;NRF_SDH_BLE_CENTRAL_LINK_COUNT&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Converting ble_app_uart_c  to support with multiple central connections</title><link>https://devzone.nordicsemi.com/thread/386877?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2022 12:41:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fee844fe-5954-45f6-899e-d1edbe495a6e</guid><dc:creator>A sudheer Kumar</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;please find the below information copied from the Debug terminal&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; app_timer: RTC: initialized.&lt;br /&gt;&amp;lt;info&amp;gt; app: BLE UART central example started.&lt;br /&gt;&amp;lt;info&amp;gt; app: Connecting to target DACF341E3DD9&lt;br /&gt;&amp;lt;error&amp;gt; app: ERROR 18 [NRF_ERROR_CONN_COUNT] at D:\DMD\NTL-Startopalogy\Central\nRF5_SDK_17.1.0_ddde560\examples\ble_central\ble_app_uart_c\main.c:154&lt;br /&gt;PC at: 0x00030575&lt;br /&gt;&amp;lt;error&amp;gt; app: End of error report&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Sudheer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Converting ble_app_uart_c  to support with multiple central connections</title><link>https://devzone.nordicsemi.com/thread/386872?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2022 12:35:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f823684-db9b-42ab-aa2d-d84ffa643217</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Sudheer,&lt;/p&gt;
&lt;p&gt;Could you please give me the full 4th line?&lt;/p&gt;
&lt;p&gt;My request for the Debug build is not to fix the issue. It&amp;#39;s to get the error handling module to print out more information. But on your latest screenshot that information is&amp;nbsp;clipped off by the small window.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Converting ble_app_uart_c  to support with multiple central connections</title><link>https://devzone.nordicsemi.com/thread/386848?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2022 12:05:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ce5f975-1218-494f-9355-6ed9f4afa9c9</guid><dc:creator>A sudheer Kumar</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;thanks for reply,&lt;/p&gt;
&lt;p&gt;there is no breakpoints kept while debugging.&lt;/p&gt;
&lt;p&gt;Just build and debugged with &amp;quot;Debug&amp;quot; option instead of &amp;quot;Release&amp;quot;, but still facing the same issue.&lt;/p&gt;
&lt;p&gt;please see the attached debug terminal output&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Sudheer&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/1307.error2.PNG" /&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Converting ble_app_uart_c  to support with multiple central connections</title><link>https://devzone.nordicsemi.com/thread/386838?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2022 11:51:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7ca1117-3824-43b8-b4ae-550fc56b8b68</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Sudheer, welcome back.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I can see from the log that you are building for&amp;nbsp;Release. Could you please try again but build with the Debug option? The log would give more helpful options then.&lt;/p&gt;
&lt;p&gt;Please also double check if your setup is having any breakpoints. Your logs are somewhat similar to cases where users have problems due to an inadvertent breakpoint.&amp;nbsp;Breakpoints will cause an application to crash when&amp;nbsp;the application is using SoftDevice; that is due to how SoftDevice works.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>