<?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>Add NUS to the project</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106849/add-nus-to-the-project</link><description>Hello Nordic engineer, 
 
 I use SDK 17.1.0 
 
 The functionality I want is in 【 ble_peripheral】ble_app_uart . 
 Add to the target is 【 ble_central_and_peripheral】experimental \ ble_app_multirole_lesc 
 I need the NUS functionality of ble_app_uart to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Jan 2024 07:35:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106849/add-nus-to-the-project" /><item><title>RE: Add NUS to the project</title><link>https://devzone.nordicsemi.com/thread/463907?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2024 07:35:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88580dd8-2389-49af-8f22-f9ab3f619bbf</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;&lt;span&gt;Thank you&amp;nbsp;&lt;/span&gt;&lt;span&gt;Berg&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add NUS to the project</title><link>https://devzone.nordicsemi.com/thread/463125?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2024 12:10:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb2b3112-78c9-4f97-89f1-172e25036dab</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="tony55723"]Originally, in the example &amp;#39;ble_central_and_peripheral,&amp;#39; its RAM address was 0x200028d8. After modification to 0x20002a98, an increase of 0x1c0 was observed. I would like to inquire how this 0x1c0 is calculated. In the future, if I need UART functionality, would I need to further increase the RAM?[/quote]
&lt;p&gt;The RAM requirements for the SoftDevice cannot be easily calculated due to the&amp;nbsp;number of different configurations that may&amp;nbsp;require more RAM for the SoftDevice. It is&amp;nbsp;better to&amp;nbsp;let the SoftDevice to calculate it for you. The RAM size indicated in the error message&amp;nbsp;is the minimum required RAM size.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="tony55723"]&lt;p&gt;&lt;span&gt;Secondly, a mobile phone can establish a BLE connection with any 52811 device. The connected 52811, in turn, can use its own BLE capability to connect to other 52811 devices. However, there is a condition: due to limitations in Flash and RAM on the 52811, each 52811 can only connect to one other 52811.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Finally, the 52811 connected to the mobile phone receives data sent by the phone and needs to perform two tasks after receiving it. The first task is to send the data to an external MCU through UART, and the second task is to transmit the data to the connected 52811 through BLE. Both of these tasks are required for all 52811 devices.&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;You can estimate the memory requirements by building your current 52840 project with this configuration. The 52811 is quite memory constrained.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add NUS to the project</title><link>https://devzone.nordicsemi.com/thread/462859?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2024 11:38:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04e4fa79-aedc-41fe-8754-5afb0010bfbc</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello Berg,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you so mush&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The program is functioning properly; the mobile phone can discover the device through scanning, establish a connection, and send data successfully. The NUS callback functions are effective.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Originally, in the example &amp;#39;ble_central_and_peripheral,&amp;#39; its RAM address was 0x200028d8. After modification to 0x20002a98, an increase of 0x1c0 was observed. I would like to inquire how this 0x1c0 is calculated. In the future, if I need UART functionality, would I need to further increase the RAM?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Additionally, I would like to provide a brief overview of all the requirements, as the person answering the &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/106588/regarding-lesc-and-issues-with-chip-transplantation"&gt;questions&lt;/a&gt; in another inquiry is also you&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I plan to eventually use the 52811 entirely. In other words, the current example &amp;#39;ble_central_and_peripheral&amp;#39; is designed for the 52840, and I need to modify it for the 52811.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Secondly, a mobile phone can establish a BLE connection with any 52811 device. The connected 52811, in turn, can use its own BLE capability to connect to other 52811 devices. However, there is a condition: due to limitations in Flash and RAM on the 52811, each 52811 can only connect to one other 52811.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Finally, the 52811 connected to the mobile phone receives data sent by the phone and needs to perform two tasks after receiving it. The first task is to send the data to an external MCU through UART, and the second task is to transmit the data to the connected 52811 through BLE. Both of these tasks are required for all 52811 devices.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;===============&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After describing all the requirements, I would like to inquire whether these issues should be continued under the current inquiry or if a new question should be opened for each specific problem encountered?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;New question = the &amp;#39;support+&amp;#39; button on the DevZone website&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add NUS to the project</title><link>https://devzone.nordicsemi.com/thread/462628?ContentTypeID=1</link><pubDate>Thu, 04 Jan 2024 08:35:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd757316-349d-4b87-be52-59808eff6a51</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The Softdevice needs more RAM to store the UUID value and the solution is to adjust the RAM start address and size as suggested by the error messages.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The RAM region is configured in the settings here:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1704357280862v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add NUS to the project</title><link>https://devzone.nordicsemi.com/thread/462627?ContentTypeID=1</link><pubDate>Thu, 04 Jan 2024 08:26:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cec4ff1-5dd8-4cee-b29e-351d95c5bb13</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/7723.a2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add NUS to the project</title><link>https://devzone.nordicsemi.com/thread/462625?ContentTypeID=1</link><pubDate>Thu, 04 Jan 2024 08:24:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e103a801-be08-4ffe-bd04-5eb4239c557c</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;Hello Berg,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I followed your instructions to do it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0677.a1.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is it caused by a memory issue?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add NUS to the project</title><link>https://devzone.nordicsemi.com/thread/462232?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2024 10:11:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d27c9cc3-0fc3-4ed5-9f4e-5df96fce9dba</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Did you increase the NRF_SDH_BLE_VS_UUID_COUNT value in sdk_config.h as I suggested earlier? Also, note that you will get a more verbose error message than just &amp;#39;Fatal error&amp;#39; if you add the &amp;#39;DEBUG&amp;#39; symbol to your build.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add NUS to the project</title><link>https://devzone.nordicsemi.com/thread/461975?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 14:00:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f369f442-7f76-4ab7-abf0-00459f3eae15</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;Hello Berg,&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*lint -save -e14 */
/**
 * Function is implemented as weak so that it can be overwritten by custom application error handler
 * when needed.
 */
__WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)
{
    __disable_irq();
    NRF_LOG_FINAL_FLUSH();

#ifndef DEBUG
    NRF_LOG_ERROR(&amp;quot;Fatal error&amp;quot;);
#else
    switch (id)
    {
#if defined(SOFTDEVICE_PRESENT) &amp;amp;&amp;amp; SOFTDEVICE_PRESENT
        case NRF_FAULT_ID_SD_ASSERT:
            NRF_LOG_ERROR(&amp;quot;SOFTDEVICE: ASSERTION FAILED&amp;quot;);
            break;
        case NRF_FAULT_ID_APP_MEMACC:
            NRF_LOG_ERROR(&amp;quot;SOFTDEVICE: INVALID MEMORY ACCESS&amp;quot;);
            break;
#endif
        case NRF_FAULT_ID_SDK_ASSERT:
        {
            assert_info_t * p_info = (assert_info_t *)info;
            NRF_LOG_ERROR(&amp;quot;ASSERTION FAILED at %s:%u&amp;quot;,
                          p_info-&amp;gt;p_file_name,
                          p_info-&amp;gt;line_num);
            break;
        }
        case NRF_FAULT_ID_SDK_ERROR:
        {
            error_info_t * p_info = (error_info_t *)info;
            NRF_LOG_ERROR(&amp;quot;ERROR %u [%s] at %s:%u\r\nPC at: 0x%08x&amp;quot;,
                          p_info-&amp;gt;err_code,
                          nrf_strerror_get(p_info-&amp;gt;err_code),
                          p_info-&amp;gt;p_file_name,
                          p_info-&amp;gt;line_num,
                          pc);
             NRF_LOG_ERROR(&amp;quot;End of error report&amp;quot;);
            break;
        }
        default:
            NRF_LOG_ERROR(&amp;quot;UNKNOWN FAULT at 0x%08X&amp;quot;, pc);
            break;
    }
#endif

    NRF_BREAKPOINT_COND;
    // On assert, the system can only recover with a reset.

#ifndef DEBUG
    NRF_LOG_WARNING(&amp;quot;System reset&amp;quot;);
    NVIC_SystemReset();
#else
    app_error_save_and_stop(id, pc, info);
#endif // DEBUG
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have enabled RTT, and the feedback message is &amp;#39;NRF_LOG_ERROR(&amp;quot;Fatal error&amp;quot;);&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void services_init(void)
{
    uint32_t           err_code;
    ble_nus_init_t     nus_init;
//    nrf_ble_qwr_init_t qwr_init = {0};

//    // Initialize Queued Write Module.
//    qwr_init.error_handler = nrf_qwr_error_handler;

//    err_code = nrf_ble_qwr_init(&amp;amp;m_qwr, &amp;amp;qwr_init);
//    APP_ERROR_CHECK(err_code);

    // Initialize NUS.
    //memset(&amp;amp;nus_init, 0, sizeof(nus_init));

    //nus_init.data_handler = nus_data_handler;

    err_code = ble_nus_init(&amp;amp;m_nus, &amp;amp;nus_init);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This time, I didn&amp;#39;t even execute the &amp;#39;memset&amp;#39; function, but the error issue still occurred&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you help me, please? Thank you.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add NUS to the project</title><link>https://devzone.nordicsemi.com/thread/461422?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2023 10:42:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9280d07b-8ea3-4843-b48b-fcc5c762786d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The first thing I would recommend is enabling debug logging over RTT by setting NRF_LOG_BACKEND_RTT_ENABLED to 1 in your sdk_config.h file, to view the error messages. That said, the issue likely&amp;nbsp;caused by not having increased the NRF_SDH_BLE_VS_UUID_COUNT to allow registration of the NUS UUID.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>