<?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>nrf_cli_init is returning Error code 4</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46125/nrf_cli_init-is-returning-error-code-4</link><description>Hi I am using nRF52832 .My application acts as central and Peripheral at the same time. 
 board acting as Central: scans and connect to peripherals without any error. 
 But when board advertises and another central device try to connect i am getting error</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Apr 2019 12:21:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46125/nrf_cli_init-is-returning-error-code-4" /><item><title>RE: nrf_cli_init is returning Error code 4</title><link>https://devzone.nordicsemi.com/thread/183112?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 12:21:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ac055f0-e359-486b-afeb-1a425330fc98</guid><dc:creator>Rekha</dc:creator><description>&lt;p&gt;Hi&amp;nbsp; while debugging its entering BLE_GAP_EVT_CONNECTED but printf statements inside this switch case are not displayed on terminal (i have opened PuTTy COM port terminal.&amp;nbsp;)..how to check this?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_cli_init is returning Error code 4</title><link>https://devzone.nordicsemi.com/thread/183100?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 11:52:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ec818cf-df87-4814-a5a3-ade380084d73</guid><dc:creator>Rekha</dc:creator><description>&lt;p&gt;any changes in the event handler ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_cli_init is returning Error code 4</title><link>https://devzone.nordicsemi.com/thread/183098?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 11:47:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:606df990-37ed-433c-954e-e048b32649b4</guid><dc:creator>Rekha</dc:creator><description>&lt;p&gt;yes i tried that but now device is not getting connected at all. i am not even getting BLE_EVT_CONNECTED now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_cli_init is returning Error code 4</title><link>https://devzone.nordicsemi.com/thread/183095?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 11:39:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a53df5a-52e8-4245-b1ea-3c89e4d7efc1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for debugging this. Please try to increase&amp;nbsp;NRF_CLI_BLE_UART_MAX_CLIENTS to 8 in sdk_config.h and see if that helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_cli_init is returning Error code 4</title><link>https://devzone.nordicsemi.com/thread/183087?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 11:05:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28216394-62d1-43b9-91f5-80eda7e17a73</guid><dc:creator>Rekha</dc:creator><description>&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;Yes i am getting error in&amp;nbsp;&lt;span&gt;blcm_link_ctx_get().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;condition:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;if (conn_id &amp;gt;= p_link_ctx_storage-&amp;gt;max_links_cnt)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NRF_LOG_INFO(&amp;quot;max link count = %d %d\r\n&amp;quot;, conn_id, p_link_ctx_storage-&amp;gt;max_links_cnt);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return NRF_ERROR_NO_MEM;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;this prints: conn_id&amp;nbsp; = 7,&amp;nbsp;&lt;span&gt;p_link_ctx_storage-&amp;gt;max_links_cnt =1.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;my device acts as both and central and peripheral simultaneously.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;as central : device should connect 7 peripherals&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;as peripheral: device should connect 1 central.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;how to achieve this?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;do i need to change anything in sdk_config.h?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_cli_init is returning Error code 4</title><link>https://devzone.nordicsemi.com/thread/183059?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 09:12:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5516be28-c017-4953-be8c-8c868ab999b2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Rekha,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please try to debug&amp;nbsp;&lt;strong&gt;nrf_cli_init()&amp;nbsp;&lt;/strong&gt;to see why it returns error 4. E.g., check if it&amp;#39;s maybe coming from nrf_cli_ble_uart.c-&amp;gt;cli_ble_uart_init()-&amp;gt;blcm_link_ctx_get().&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_cli_init is returning Error code 4</title><link>https://devzone.nordicsemi.com/thread/182036?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2019 09:17:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be35b78e-7083-421e-831f-4d59e06eb08a</guid><dc:creator>Rekha</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;initially uart is used as transport layer for CLI, on connected event ble_cli is used. this causes error only when a central tries to connect my device.&lt;/p&gt;
&lt;p&gt;if my device is trying to connect to other peripherals there are no errors. code works fine.&lt;/p&gt;
&lt;p&gt;i have attached main.c file for your reference in which i am calling these functions.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2816.main.c"&gt;devzone.nordicsemi.com/.../2816.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Rekha&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_cli_init is returning Error code 4</title><link>https://devzone.nordicsemi.com/thread/181991?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2019 07:18:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40e822cc-b566-4078-91e5-89d81dcc73b3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure why nrf_cli_init() is called on the connected event.&amp;nbsp;Is this the only place where you initialize CLI in your app?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>