<?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: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47667/nrf52840-console-commandline-over-ble-ble-cli-usage</link><description>Dear Nordic Support, 
 I am using nRF52840 and BLE SDK v15.2. I want to control my nRF52840 through both UART CLI and BLE CLI so I try and read example: nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\experimental\ble_app_cli 
 As I read and understand</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 May 2019 09:39:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47667/nrf52840-console-commandline-over-ble-ble-cli-usage" /><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/189830?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 09:39:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03b76f41-79bc-48dc-9381-061a46e09db8</guid><dc:creator>Duy</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I agree with &lt;a href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt; about the documenting about &amp;quot;adding enter for the line break&amp;quot;. It is confusing with the EOL in the application. This also makes me wonder that the mobile app doesn&amp;#39;t send out the CR, LF or CR + LF.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt;&amp;nbsp;I am still debugging the reason of&amp;nbsp;&lt;/p&gt;
[quote userid="6462" url="~/f/nordic-q-a/47667/nrf52840-console-commandline-over-ble-ble-cli-usage/189807"]The is received but all are 0x00[/quote]
&lt;p&gt;inside the code. Thank you for your support also.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/189807?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 09:04:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1065c42a-6a22-4d10-b741-9e063ec770db</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;It makes sense once you know - but it is certainly not obvious!&lt;/p&gt;
&lt;p&gt;Would be good if this were&amp;nbsp;documented.&lt;/p&gt;
&lt;p&gt;But it still doesn&amp;#39;t explain:&lt;/p&gt;
[quote userid="27129" url="~/f/nordic-q-a/47667/nrf52840-console-commandline-over-ble-ble-cli-usage/189620"]The is received but all are 0x00[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/189773?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 07:33:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e40d8de-7192-4a1c-88d3-80820deff97d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I think it makes sense:&amp;nbsp;the app allows you to select if you want to send a LF, CR or both when&amp;nbsp;you press enter. Otherwise, you would have been limited to 1 EOL per button.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/189771?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 07:14:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e16ee080-ab23-4b04-b3d3-6c2f0509dc5d</guid><dc:creator>Duy</dc:creator><description>&lt;p&gt;Hello &lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Thank you for your answer. It works for me now. This error is...so funny.&lt;/p&gt;
&lt;p&gt;One more question: is it because of the library fault or the application fault?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Duy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/189754?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 06:17:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93276523-6c92-4d74-928d-c51bb8eeb419</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I&amp;#39;ve tested it with the Toolbox app now. Turns out that you have to press enter for the line break to be inserted. Like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-0998bc948f3540e8b2403f9cda4988da/Screenshot_5F00_20190529_2D00_080650_5B00_1_5D00_.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/189620?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 11:58:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1521e1b1-b302-484d-999a-b011c5551de6</guid><dc:creator>Duy</dc:creator><description>&lt;p&gt;The is received but all are 0x00.&amp;nbsp;I also attached the configuration from my phone.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/480x320/__key/communityserver-discussions-components-files/4/6835.Screenshot_5F00_20190528_2D00_181717.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/189613?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 11:46:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d92b5e51-73ee-44e1-b101-e4089c43ac5e</guid><dc:creator>Duy</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Currently it stop at&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;p_instance-&amp;gt;p_cb-&amp;gt;handler(NRF_CLI_TRANSPORT_EVT_RX_RDY, p_instance-&amp;gt;p_cb-&amp;gt;p_context);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in side function&amp;nbsp;&lt;strong&gt;nus_data_handler&lt;/strong&gt;. This function is init as a callback inside&amp;nbsp;&lt;strong&gt;ret_code_t nrf_cli_ble_uart_service_init(void)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        case BLE_NUS_EVT_RX_DATA:
        {
            NRF_LOG_INFO(&amp;quot;Conn_handle:%d, Received: %d&amp;quot;,
                     p_instance-&amp;gt;p_cb-&amp;gt;conn_handle, p_nus_evt-&amp;gt;params.rx_data.length);
            NRF_LOG_HEXDUMP_DEBUG(p_nus_evt-&amp;gt;params.rx_data.p_data, p_nus_evt-&amp;gt;params.rx_data.length);
            size_t len = ((size_t) p_nus_evt-&amp;gt;params.rx_data.length) &amp;amp; 0x0000FFFF;
            err_code = nrf_ringbuf_cpy_put(p_instance-&amp;gt;p_rx_ringbuf,
                                           p_nus_evt-&amp;gt;params.rx_data.p_data,
                                           (size_t *)&amp;amp;len);
            ASSERT(err_code == NRF_SUCCESS);

            p_instance-&amp;gt;p_cb-&amp;gt;handler(NRF_CLI_TRANSPORT_EVT_RX_RDY, p_instance-&amp;gt;p_cb-&amp;gt;p_context);
            break;
        }&lt;/pre&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/189599?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 11:24:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f76a0d5-951e-4d5c-81b6-c9e9e455d902</guid><dc:creator>awneil</dc:creator><description>[quote userid="27129" url="~/f/nordic-q-a/47667/nrf52840-console-commandline-over-ble-ble-cli-usage/189590"]I tried to add \r \n or both \r\n[/quote]
&lt;p&gt;What, exactly, did you do?&lt;/p&gt;
&lt;p&gt;Show a screenshot.&lt;/p&gt;
&lt;p&gt;What did your peripheral receive?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(I&amp;#39;m not sure that the apps will interpret \n or \r - they might just send a backslash followed by the letter...)&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/189595?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 11:22:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9985c5ea-eb28-402d-a583-ebdc3fa1b0c7</guid><dc:creator>awneil</dc:creator><description>[quote userid="27129" url="~/f/nordic-q-a/47667/nrf52840-console-commandline-over-ble-ble-cli-usage/189590"]nothing happened[/quote]
&lt;p&gt;Nothing?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, again, &lt;strong&gt;debug from there!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You said that the command was being received - SO,&amp;nbsp;&lt;strong&gt;what happens next&lt;/strong&gt; ... ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/189590?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 11:16:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e8e714c-9e47-47e4-b722-06ff9ed999b0</guid><dc:creator>Duy</dc:creator><description>&lt;p&gt;[quote userid="4240" url="~/f/nordic-q-a/47667/nrf52840-console-commandline-over-ble-ble-cli-usage/189476"][/quote]&lt;/p&gt;
&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try to append a newline (\n - 0x0d) to your command.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;I tried to add \r \n or both \r\n from my android phone (also my iOS device) but nothing happened.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/189516?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 09:00:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d528b118-4ac9-46be-be10-5b30ca5bce22</guid><dc:creator>awneil</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/47667/nrf52840-console-commandline-over-ble-ble-cli-usage/189476"]a newline (\n - 0x0d[/quote]
&lt;p&gt;0x0D is a Carriage Return (CR);&lt;/p&gt;
&lt;p&gt;0x0A is a Newline (aka Line Feed, LF).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/189476?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 07:42:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98512f05-b568-438a-8b67-9053633d6a0a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try to append a newline (\n - 0x0d) to your command.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/188800?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 10:52:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83ea186f-8d13-4b41-89b5-c8320d14683a</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;so debug from there ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/188798?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 10:40:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91b3f6c5-3497-46a0-bbff-4e60e9427e33</guid><dc:creator>Duy</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;The command is received but it is not actioned.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/188796?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 10:33:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5ee6c8b-4c66-4769-bf83-8ca26db9b888</guid><dc:creator>awneil</dc:creator><description>[quote userid="27129" url="~/f/nordic-q-a/47667/nrf52840-console-commandline-over-ble-ble-cli-usage/188788"]there is nothing happens[/quote]
&lt;p&gt;You mean the command is not received, or it is just not actioned?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/188788?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 10:16:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e324125c-eb2a-4aaf-a7ec-69685cffbe8e</guid><dc:creator>Duy</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;I am running the&amp;nbsp;&lt;span&gt;ble_app_cli and when I send &amp;quot;led on&amp;quot; and &amp;quot;led off&amp;quot; through nRF Connect or nRF Toolbox app, there is nothing happens. When I control through UART CLI it works.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I want to control nRF52840 through BLE CLI so I test the example first.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I also add CR/LF when sending but it still doesn&amp;#39;t work.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: Console commandline over BLE (BLE CLI) usage</title><link>https://devzone.nordicsemi.com/thread/188783?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 09:59:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:978773f8-c28f-402a-82f1-a1836d01112e</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;It worked for me!&lt;/p&gt;
[quote userid="27129" url="~/f/nordic-q-a/47667/nrf52840-console-commandline-over-ble-ble-cli-usage"] I tried to control the nRF52840 through BLE using &amp;quot;led on&amp;quot; and &amp;quot;led off&amp;quot;[/quote]
&lt;p&gt;Sorry - not clear what you mean by that?&lt;/p&gt;
&lt;p&gt;Please describe in detail what, exactly, you are doing.&lt;/p&gt;
&lt;p&gt;I did find that you need a CR (and/or LF?) on the end for the command to be executed ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>