<?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>CLI UART + NUS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27136/cli-uart-nus</link><description>Hello, 
 I&amp;#39;m trying to make CLI working with UART and BLE (NUS) backend simultaneously.
Starting point is CLI example from SDK 14.
What should I enable in sdk_config.h and how shuould I intialize CLI with UART and NUS in my app?
In ble_app_cli CLI</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Nov 2017 00:44:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27136/cli-uart-nus" /><item><title>RE: CLI UART + NUS</title><link>https://devzone.nordicsemi.com/thread/106817?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2017 00:44:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa15b6ba-1b83-4a1a-b293-c0412fdfcf90</guid><dc:creator>jnorgan</dc:creator><description>&lt;p&gt;Any luck getting this to work? I&amp;#39;m also getting fatal errors when calling nrf_cli_ble_uart_service_init();&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI UART + NUS</title><link>https://devzone.nordicsemi.com/thread/106819?ContentTypeID=1</link><pubDate>Thu, 24 Aug 2017 12:26:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:266fc8f3-c0c6-4dbb-8023-4db20225bf89</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Can you please edit your question and explain what you have done there? Not in comment to an answer? Please also consider including the complete project. And exactly which function that returns the error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI UART + NUS</title><link>https://devzone.nordicsemi.com/thread/106820?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2017 14:40:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32e96b81-cfa2-4415-b504-5a5c8e241743</guid><dc:creator>Pawel</dc:creator><description>&lt;p&gt;CLI UART init:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_drv_uart_config_t uart_config = NRF_DRV_UART_DEFAULT_CONFIG;
uart_config.pseltxd = TX_PIN_NUMBER;
uart_config.pselrxd = RX_PIN_NUMBER;
uart_config.hwfc    = NRF_UART_HWFC_DISABLED;
ret                 = nrf_cli_init(&amp;amp;m_cli_uart, &amp;amp;uart_config, true, true, NRF_LOG_SEVERITY_INFO);
APP_ERROR_CHECK(ret);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Where should I put this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APP_ERROR_CHECK(nrf_cli_ble_uart_service_init());
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ret_code_t ret;

ret = nrf_cli_start(&amp;amp;m_cli_uart);
APP_ERROR_CHECK(ret);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I always getting fatal error on nrf_cli_ble_uart_service_init().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI UART + NUS</title><link>https://devzone.nordicsemi.com/thread/106822?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2017 14:35:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e45c90b-ccc9-4439-8ec9-7b9e76eea40e</guid><dc:creator>Pawel</dc:creator><description>&lt;p&gt;This is CLI part of my app:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define CLI_EXAMPLE_LOG_QUEUE_SIZE (4)
NRF_CLI_UART_DEF(m_cli_uart_transport, 0, 64, 16);
NRF_CLI_BLE_UART_DEF(cli_ble_uart, &amp;amp;m_gatt, 64, 32);
NRF_CLI_DEF(m_cli_uart, &amp;quot;ub_dongle:~$ &amp;quot;, &amp;amp;m_cli_uart_transport.transport, &amp;#39;\r&amp;#39;, CLI_EXAMPLE_LOG_QUEUE_SIZE);
NRF_CLI_DEF(m_ble_cli, &amp;quot;cli_ble:~$ &amp;quot;, &amp;amp;cli_ble_uart.transport,, &amp;#39;\r&amp;#39;, CLI_EXAMPLE_LOG_QUEUE_SIZE);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On ble connection:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_cli_ble_uart_config_t config = { .conn_handle = m_conn_handle };
err_code = nrf_cli_init(&amp;amp;m_ble_cli, &amp;amp;config, true, true, NRF_LOG_SEVERITY_NONE);
APP_ERROR_CHECK(err_code);
APP_ERROR_CHECK(nrf_cli_task_create(&amp;amp;m_ble_cli));
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On ble disconnection:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(void)nrf_cli_uninit(&amp;amp;m_ble_cli);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI UART + NUS</title><link>https://devzone.nordicsemi.com/thread/106821?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2017 14:26:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b21208e9-02be-43f4-a941-699619328168</guid><dc:creator>Pawel</dc:creator><description>&lt;p&gt;For now I have Logger module + CLI + UART (as transport layer).
I would like to add NUS, and make it working simultaneously.&lt;/p&gt;
&lt;p&gt;This is what I added to makefile:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$(SDK_ROOT)/components/libraries/experimental_cli/ble_uart/nrf_cli_ble_uart.c \
$(SDK_ROOT)/components/ble/ble_services/ble_nus/ble_nus.c \
$(SDK_ROOT)/components/libraries/experimental_cli/ble_uart \
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is what I changed/added to sdk_config.h:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define BLE_NUS_ENABLED 1
#define NRF_CLI_BLE_UART_ENABLED 1
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CLI UART + NUS</title><link>https://devzone.nordicsemi.com/thread/106818?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2017 12:46:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1efbb99-8cfe-4f49-a754-225ad9bbd322</guid><dc:creator>jakub</dc:creator><description>&lt;p&gt;I think you can modify this example:&lt;/p&gt;
&lt;p&gt;examples\ble_peripheral\experimental\ble_app_cli&lt;/p&gt;
&lt;p&gt;Baically you need to change RTT to UART (you can base on this example: \examples\peripheral\cli as it uses both RTT and UART)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>