<?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>Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37152/using-ble-nus-service-without-uart</link><description>Hello 
 I would like to send my sensor data to a mobile application using BLE SDK 15. Someone suggested me to go through the BLE NUS SERVICE example which was a good one. I understood a lot of things but now my sensor values are coming on analog pins</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Feb 2019 16:23:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37152/using-ble-nus-service-without-uart" /><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/170171?ContentTypeID=1</link><pubDate>Fri, 08 Feb 2019 16:23:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5893611-a057-488b-a772-488fe5e8e6fb</guid><dc:creator>noob_with_ucontrollers</dc:creator><description>&lt;p&gt;Okay thank you!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/170156?ContentTypeID=1</link><pubDate>Fri, 08 Feb 2019 15:11:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8922b014-c54a-47b0-8a36-dd4a32eaa52f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello &lt;a href="https://devzone.nordicsemi.com/members/noob_5f00_with_5f00_ucontrollers"&gt;noob_with_ucontrollers&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Let us follow up in the ticket that you started:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/43475/using-ble_template-example-to-transfer-data"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/43475/using-ble_template-example-to-transfer-data&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/170155?ContentTypeID=1</link><pubDate>Fri, 08 Feb 2019 15:06:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb695fc5-e591-4fd5-aee9-ad9ca318a9da</guid><dc:creator>noob_with_ucontrollers</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;&lt;br /&gt;I am using SDK 15.2, nrf52832, IDE is Embedded Studio so it is flashing the softdevice for me. I am also doing a RAM and FLASH memory adjustment according to&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/tutorials/b/getting-started/posts/adjustment-of-ram-and-flash-memory"&gt;https://devzone.nordicsemi.com/tutorials/b/getting-started/posts/adjustment-of-ram-and-flash-memory&lt;/a&gt;&lt;br /&gt;I am using S132.&amp;nbsp;&lt;br /&gt;Yes, even I could not understand why it doesn&amp;#39;t advertise. My guess was that there are some pins that have other connections on the PCB custom board I have but then again advertising doesn&amp;#39;t use pins.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/170048?ContentTypeID=1</link><pubDate>Fri, 08 Feb 2019 07:47:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3486d7df-d928-4b93-bdfc-902f73075ee4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/noob_5f00_with_5f00_ucontrollers"&gt;noob_with_ucontrollers&lt;/a&gt; ble_app_uart is the example that uses the NUS service. Regarding your other post, where you explain nothing happens when you flash the ble_app_uart example:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How do you flash it? Through your IDE? What IDE do you use?&lt;/p&gt;
&lt;p&gt;Unless you are using Segger Embedded Studio, you need to flash the SoftDevice first. Did you do that?&lt;/p&gt;
&lt;p&gt;Without any modifications this example should also start advertising, and you should be able to detect it with nRF Connect for Mobile or Desktop (Note: It will not show up on your Mobile Settings-&amp;gt;bluetooth page.&lt;/p&gt;
&lt;p&gt;For this example to work you will also need to program the softdevice.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The softdevice for nRF52832 is the .hex file located in:&lt;/p&gt;
&lt;p&gt;SDK15.2.0\components\softdevice\s132\hex\&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can program it using nRF Connect for Desktop or Nordic Command Line Tools.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/170032?ContentTypeID=1</link><pubDate>Fri, 08 Feb 2019 02:14:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab04652b-d21c-4532-a971-a8aa4ad75546</guid><dc:creator>noob_with_ucontrollers</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;, I am trying to do sth similar to arshdeep in the post. Send data via BLE from a custom PCB chip that has nrf52382. I start with the ble_template example in the SDK 15.2. The reason I don&amp;#39;t start with ble_app_uart is that that does not work on my PCB device (device doesn&amp;#39;t advertise when I flash it).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I am editting the ble_template to add NUS service, so that I can use nus_data_send() function.&amp;nbsp;&lt;br /&gt;However, when I do so, the code on the device doesn&amp;#39;t give me anything, moreover my pcb custom device doesn&amp;#39;t even advertise!!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Would you have any ideas pertaining this? I can share my code if you would like. It&amp;#39;s the ble_template ex as is with just a few edits.&amp;nbsp;&lt;br /&gt;Thank you very much!! :)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/170031?ContentTypeID=1</link><pubDate>Fri, 08 Feb 2019 01:23:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa39e0d1-12c0-4765-a58f-a0ff64d1b743</guid><dc:creator>noob_with_ucontrollers</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/arshdeep"&gt;arshdeep&lt;/a&gt;, I am trying to do a similar thing. Where did you find the NUS Service example? I am using thee SDK 15.2 but I have only the ble_template and ble_app_uart examples...&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/166720?ContentTypeID=1</link><pubDate>Mon, 21 Jan 2019 07:37:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea3854a2-9eb5-4b05-960b-f4f5134de614</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;It sounds like you have removed the uart related .c-files, but still have some references to them. Make sure that you comment out all functions using app_uart_get() and app_uart_put, in addition to commenting out the lines that include &amp;quot;app_uart.h&amp;quot;, &amp;quot;app_fifo.h&amp;quot; and &amp;quot;nrf_drv_uart.h&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/166661?ContentTypeID=1</link><pubDate>Sun, 20 Jan 2019 09:38:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6542bc7d-3e82-4b47-aefd-b251e7acea4c</guid><dc:creator>Sanket</dc:creator><description>&lt;p&gt;Hello Edvin and Arshdeep!&lt;/p&gt;
&lt;p&gt;I am&amp;nbsp;following to this thread. I want to know how to remove&amp;nbsp;UART&amp;nbsp;from the NUS example. In sdk_config.h, I did &amp;quot;&lt;span&gt;#define&amp;nbsp;&lt;/span&gt;APP_UART_ENABLED 0&amp;quot; and &amp;quot;#define UART_ENABLED 0&amp;quot;. In main.c, I commented out &amp;quot;uart_event_handle()&amp;quot; and &amp;quot;uart_init()&amp;quot; functions.&amp;nbsp;Still I get following errors in retarget.c file:&lt;/p&gt;
&lt;p&gt;.\_build\nrf52810_xxaa.axf: Error: L6218E: Undefined symbol app_uart_get (referred from retarget.o).&lt;br /&gt;.\_build\nrf52810_xxaa.axf: Error: L6218E: Undefined symbol app_uart_put (referred from retarget.o).&lt;/p&gt;
&lt;p&gt;How to handle this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/156416?ContentTypeID=1</link><pubDate>Thu, 08 Nov 2018 07:51:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca41fd03-6e02-4d2f-a63a-67479276be70</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Make sure that you set up the Putty Terminal correct, as described here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Flib_cli.html&amp;amp;anchor=lib_cli_terminal_settings"&gt;http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Flib_cli.html&amp;amp;anchor=lib_cli_terminal_settings&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Remember to follow both &amp;quot;Terminal settings&amp;quot; and &amp;quot;UART&amp;nbsp;and USB settings&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you are having problems, check out the &lt;a href="https://www.compuphase.com/software_termite.htm"&gt;Termite Terminal&lt;/a&gt;. It is a bit more limited, but easier to set up.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/156392?ContentTypeID=1</link><pubDate>Wed, 07 Nov 2018 23:14:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a3e9e6c-7b74-4178-a7d4-8424763ac7b7</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;Hello Edvin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I went on to a different project but now i am again back to nrf52832 DK and want to send sensor data to mobile app.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am running the ble app uart example. I have enabled the notification of TX characteristic(3 arrows downward) in nrf connect app but still i cannot send any data from Putty to app. I can not even write anything on my COM listener. Why is that so?&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/0257.putty.PNG" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/5531.nrfconnect.jpg" /&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/145917?ContentTypeID=1</link><pubDate>Mon, 27 Aug 2018 11:46:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:497f5331-3214-4d0e-b954-b8c9e468750e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The explanation is using the unmodified ble_app_uart example:&lt;/p&gt;
&lt;p&gt;The connection handle is, during the startup of the ble_app_uart example, set to&amp;nbsp;BLE_CONN_HANDLE_INVALID (= 0xFFFF).&lt;/p&gt;
&lt;p&gt;In the BLE_GAP_EVT_CONNECTED event in ble_evt_handler in main.c, the conn_handle, m_conn_handle is set to the conn_handle of the connection event, and it remains unchanged until the disconnected-event.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you look in the same example, in the uart_event_handle() in main.c, which is the only place using the ble_nus_data_send() function, you can see that it ignores returns from ble_nus_data_send if the err_code = NRF_ERROR_INVALID_STATE, NRF_ERROR_BUSY or NRF_ERROR_NOT_FOUND.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It only means that it will not try to send anything if there is no device to send to.&lt;/p&gt;
&lt;p&gt;So you can ignore this error:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;err_code = ble_nus_data_send(...)
if ((err_code != NRF_ERROR_INVALID_STATE) &amp;amp;&amp;amp; (err_code != NRF_ERROR_BUSY) &amp;amp;&amp;amp; (err_code != NRF_ERROR_NOT_FOUND))
{
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, you can use these return values to tell your application that the message is not sent, if you need it. The fact that ble_nus_data_send() returns&amp;nbsp;any of these values&amp;nbsp;will not break anything, other than telling you that the message was not sent.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Alternatively, you can check the conn_handle before you try to send:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(m_conn_handle !=&amp;#160;BLE_CONN_HANDLE_INVALID)
{
    err_code = ble_nus_data_send(...);
    if (err_code != NRF_ERROR_INVALID_STATE &amp;amp;&amp;amp; err_code != NRF_ERROR_BUSY)
    {
        APP_ERROR_CHECK(err_code);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/145703?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 13:49:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d35ad570-dd91-4317-9c76-8ab3abad260c</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;Hello Edvin,&lt;/p&gt;
&lt;p&gt;That sounds about right. Actually, i do not understand the concept of connection handle, so i passed the same &amp;quot;m_conn_handle&amp;quot; in my ble_nus_data_send() function. The error comes before connection itself. Can you tell me a little about the connection handle ? or a link where i can learn bout it. Thanks,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int main(void)
{
    bool erase_bonds;

    // Initialize.
    uart_init();
    log_init();
    timers_init();
    buttons_leds_init(&amp;amp;erase_bonds);
    power_management_init();
    ble_stack_init();
    gap_params_init();
    gatt_init();
    services_init();
    advertising_init();
    conn_params_init();

    // Start execution.
    printf(&amp;quot;\r\nUART started.\r\n&amp;quot;);
    NRF_LOG_INFO(&amp;quot;Debug logging for UART over RTT started.&amp;quot;);
    advertising_start();

    // Enter main loop.
    for (;;)
    {
        uint8_t str[4];

      sprintf((char*)str, &amp;quot;%d&amp;quot;, (int)adc_sample);

      ret_code_t err_code =  ble_nus_data_send(&amp;amp;m_nus, str, strlen((char*)str), m_conn_handle);
      APP_ERROR_CHECK(err_code);
        //idle_state_handle();
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/145357?ContentTypeID=1</link><pubDate>Wed, 22 Aug 2018 15:00:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a2facf1-aa4c-4300-8305-77f20b9cabfa</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;err_code = 0x05 is&amp;nbsp;NRF_ERROR_NOT_FOUND.&lt;/p&gt;
&lt;p&gt;This means that the ble_nus_data_send() receives an invalid conn_handle.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What conn_handle do you insert?&lt;/p&gt;
&lt;p&gt;in ble_nus_data_send()?&lt;/p&gt;
&lt;p&gt;from the ble_app_uart example:&lt;/p&gt;
&lt;p&gt;err_code = ble_nus_data_send(&amp;amp;m_nus, data_array, &amp;amp;length, m_conn_handle);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you get this return value before or after you connect with the phone?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/145355?ContentTypeID=1</link><pubDate>Wed, 22 Aug 2018 14:51:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4a95b6f-3f50-4409-8fbc-7c4b0355267b</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;Hello Edvin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How can i check the return value ? I am getting 0x00000005 as error code in te return value.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/144831?ContentTypeID=1</link><pubDate>Mon, 20 Aug 2018 06:18:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b7df57f-0a5c-4932-b74d-fe7754345423</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok, good.&lt;/p&gt;
&lt;p&gt;Can you check the return value of ble_nus_data_send()? Does it return NRF_SUCCESS, or one of the other values that are filtered out, NRF_ERROR_INVALID_STATE or NRF_ERROR_BUSY?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If not NRF_SUCCESS, I suspect NRF_ERROR_INVALID_STATE. If so, I think you are missing something that needs to be set up in the ble_nus_c setup. Compare your project with the ble_app_uart example. A keyword is&amp;nbsp;p_client-&amp;gt;is_notification_enabled in ble_nus.c.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But first check what ble_nus_data_send() returns.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/144755?ContentTypeID=1</link><pubDate>Fri, 17 Aug 2018 14:43:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:402c5a0b-c2ca-45c2-9912-d1a344bcdb6a</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1534516955136v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yes, as you can see in the image. I have enabled the notification. I believe there is a bug in my code. Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/144635?ContentTypeID=1</link><pubDate>Fri, 17 Aug 2018 07:41:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a601ce2f-0d1f-4b8c-b0a7-a88c1628be0d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Did you enable notifications in the nRF Connect app?&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/144602?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 19:28:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:076eb8b6-099d-4e76-8d43-1db084dabed2</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;Yes, I&amp;#39;m trying to send data through ble_nus_data_send(). First, i just want to understand that how does this API work by sending a demo data after regular intervals. Can you please see in my code that what all i&amp;#39;m doing wrong. I just want to send a test value to nrf connect application.&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;static void timeout_handler()
{
     uint32_t       err_code;
    static uint8_t index = 1; //no of bytes 
    static uint8_t data_array = 21; //Test value 
      uint16_t length = (uint16_t)index;
      
    
      err_code =   ble_nus_data_send(&amp;amp;m_nus, &amp;amp;data_array, &amp;amp;length, m_conn_handle);

         if ( (err_code != NRF_ERROR_INVALID_STATE) &amp;amp;&amp;amp; (err_code != NRF_ERROR_BUSY) &amp;amp;&amp;amp;
                         (err_code != NRF_ERROR_NOT_FOUND) )
                    {
                        APP_ERROR_CHECK(err_code);
                    }

        NRF_LOG_INFO(&amp;quot;Value Received !&amp;quot;);
}&lt;/pre&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/144409?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 06:29:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a93de5bb-824d-4af1-a459-1b8f04e73b91</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Do you send the data using ble_nus_data_send()?&lt;/p&gt;
&lt;p&gt;You can see it in the app, nRF Connect, if you connect to it, and enable notifications on the TX characteristic. Press the three arrows pointing down to turn on notifications.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/144232?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 17:51:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8261aba5-9792-4d99-ac7c-58f5fed1b818</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;Thank you Edvin, The example is running fine now but only if i send data from the Mobile application to the nrf DK. But how can i see the data coming from the nrf DK to mobile application?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/143156?ContentTypeID=1</link><pubDate>Tue, 07 Aug 2018 08:26:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82eb8185-f401-4bce-a9b1-feca6033a6d5</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Yes. That seems correct. Remove the uart_init() function, and use your own function, which you can copy parts of from the&amp;nbsp;SAADC&amp;nbsp;example found in SDK\examples\peripheral\saadc.&lt;/p&gt;
&lt;p&gt;Then, instead of printing the values in the log, you can pass them on to ble_nus_data_send() function.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The behavior of the ble_app_uart example is as follows:&lt;/p&gt;
&lt;p&gt;When you write something on the physical UART, which either ends with &amp;#39;\n&amp;#39; (newline) or the length is greater than the buffer size, then it will uart_event_handle() is triggered, and will send the data to the mobile using the ble_nus_data_send() function.&lt;/p&gt;
&lt;p&gt;When you send something from the phone to the nRF, then the nus_data_handler() function is called with the p_evt-&amp;gt;type ==&amp;nbsp;BLE_NUS_EVT_RX_DATA.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This function will typically print the received message on the physical UART, but you can remove this. The message is stored in p_evt-&amp;gt;params.rx_data.p_data[i], with the length of p_evt-&amp;gt;params.rx_data.length.&lt;/p&gt;
&lt;p&gt;This means that the message is stored byte by byte like this:&lt;/p&gt;
&lt;p&gt;p_evt-&amp;gt;params.rx_data.p_data[0];&lt;br /&gt;p_evt-&amp;gt;params.rx_data.p_data[1];&lt;br /&gt;p_evt-&amp;gt;params.rx_data.p_data[...];&lt;br /&gt;p_evt-&amp;gt;params.rx_data.p_data[ p_evt-&amp;gt;params.rx_data.length -1 ];&lt;br /&gt;p_evt-&amp;gt;params.rx_data.p_data[ p_evt-&amp;gt;params.rx_data.length ];&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/143083?ContentTypeID=1</link><pubDate>Mon, 06 Aug 2018 16:38:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56312e88-462f-4c7b-b3b1-df2597f5806b</guid><dc:creator>arshdeep</dc:creator><description>&lt;p&gt;Hello Edvin, Thank you for your response. I have a couple of more doubts&amp;nbsp; on UART service example before closing out on this string. I would highly appreciate if you could help me out with those. My sensors give values on analog pins using SAADC without using any other serial interface protocol. Now, i do not need to keep uart_init() function in my program and inside&amp;nbsp;&lt;span&gt;uart_event_handle(&lt;/span&gt;&lt;a class="code" title="Struct containing events from the UART module." href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/structapp__uart__evt__t.html"&gt;app_uart_evt_t&lt;/a&gt;&lt;span&gt; * p_event) function, instead of using app_uart_get function i would call my custom function to fetch sensor values and use ble_nus_data_send() function to send that value to my connected mobile application&amp;nbsp;&lt;/span&gt;&lt;span&gt;. is that right or am i missing something here?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Lastly, In this example my nrf52840 board is a peer and application is nordic uart mobile application. So, when i send data from my application to the board, then&amp;nbsp;&lt;span class="keywordtype"&gt;void&lt;/span&gt; nus_data_handler function is called?? and when i send data from board to mobile application then uart_event_handle() function is called???is that right?? or is it vice-versa.&amp;nbsp; I am sorry, i tried to put breakpoints&amp;nbsp;to analyze this behavior&amp;nbsp;but was not able to crack it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It would be great if i could get answers these questions.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks and Regards,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using BLE NUS SERVICE without UART</title><link>https://devzone.nordicsemi.com/thread/143020?ContentTypeID=1</link><pubDate>Mon, 06 Aug 2018 12:23:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afdca894-bfaf-4c98-aeaf-e6ada91c4f9a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What type of sensor do you use? Do they communicate using the UART protocol? If they do, then you can only change the uart_init() function in main.c to use the pins that you use. If they use some other protocol, then you have to read using the correct protocol, and then pass them on to the UART service.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You don&amp;#39;t need to create anything else.&lt;/p&gt;
&lt;p&gt;Whatever is passed on into ble_nus_data_send() will be sent to the connected device, as long as notifications is enabled.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>