<?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>Use ble communication instead of cli terminal</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82040/use-ble-communication-instead-of-cli-terminal</link><description>Hi, 
 I&amp;#39;m trying to use ble data instead of cli terminal. when nRF52840 received data from ble, I want send the data to cli instance. I called function named &amp;quot;void nrf_cli_print_stream(void const * p_user_ctx, char const * p_data, size_t data_len)&amp;quot; to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Nov 2021 13:31:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82040/use-ble-communication-instead-of-cli-terminal" /><item><title>RE: Use ble communication instead of cli terminal</title><link>https://devzone.nordicsemi.com/thread/340750?ContentTypeID=1</link><pubDate>Thu, 25 Nov 2021 13:31:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b4031ef-d7d9-4832-a331-43d62945a343</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Cheng,&lt;/p&gt;
&lt;p&gt;You can use the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__nrf__cli__ble__uart.html"&gt;BLE UART command line&amp;nbsp;interface transport layer&lt;/a&gt;. You can look at &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/ble_sdk_app_cli.html"&gt;Experimental: Console over Bluetooth Application&lt;/a&gt;&amp;nbsp;to see how this can be used in an example.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use ble communication instead of cli terminal</title><link>https://devzone.nordicsemi.com/thread/340648?ContentTypeID=1</link><pubDate>Thu, 25 Nov 2021 07:55:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8bfabdb-6d91-47e2-a624-3d8273b51e68</guid><dc:creator>ChengCheng</dc:creator><description>&lt;p&gt;Hi Marte，&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry maybe my expression wasn&amp;#39;t very clear. I have used&amp;nbsp;NRF_CLI_CMD_REGISTER to register some commands. And I use PC tool like Putty to send command to make the MCU do things, everything is working fine.&lt;/p&gt;
&lt;p&gt;My question is how to send these commands through an Andriod APP? And now,&amp;nbsp;Andriod APP&amp;nbsp;could send string data to the MCU by using&amp;nbsp;&amp;nbsp;&lt;span&gt;NUS example, but the string data cannot&amp;nbsp; trigger command line callback function to execute. So Is there an interface to input commands to the cli module instead of through a keyboard or&amp;nbsp;uart? Or is there a better way? Thank you!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Cheng&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use ble communication instead of cli terminal</title><link>https://devzone.nordicsemi.com/thread/340644?ContentTypeID=1</link><pubDate>Thu, 25 Nov 2021 07:24:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c73c17dc-ad79-4e04-aec7-1618b16cbe47</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You are correct that&amp;nbsp;nrf_cli_print() just prints, which is what I assumed you wanted since you were using&amp;nbsp;nrf_cli_print_stream(). If you want to send commands over CLI to make the nRF52840 do things, then you must create CLI commands for this. Please see&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_cli.html"&gt;Command Line Interface library&lt;/a&gt;&amp;nbsp;for more information on how to do this, and how to use the library in general.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use ble communication instead of cli terminal</title><link>https://devzone.nordicsemi.com/thread/340623?ContentTypeID=1</link><pubDate>Thu, 25 Nov 2021 01:21:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18633c45-bc16-4ba1-abe4-0c343c1aee74</guid><dc:creator>ChengCheng</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;I use cli terminal to send some our own commands for the nRF52840 to execute. I also hope using ble APP to send the same commands to let the mcu execute. So that&amp;#39;s why I used NUS example to do this. But I found nrf_cli_print() just print commands as messages and not execute. So is there another way?&lt;/p&gt;
&lt;p&gt;Thank you, have a nice day!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use ble communication instead of cli terminal</title><link>https://devzone.nordicsemi.com/thread/340536?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 12:33:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bb2354c-aa2f-4947-a658-07529274c01b</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is there any particular reason why you are using CLI to print what you receive over BLE instead of using what is already used in the NUS example,&amp;nbsp;app_uart_put()?&lt;/p&gt;
&lt;p&gt;You should not use&amp;nbsp;nrf_cli_print_stream(). This function is only to be used by the nrf_fprintf module, and not to be used directly. Use nrf_cli_print() instead.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>