<?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>Ble template app and UART crash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32907/ble-template-app-and-uart-crash</link><description>Good morning everyone, 
 
 I am facing a weird problem concerning the use of the UART service. 
 I am currently using the NRF52832DK to develop an application. In a nutshell, I am reading a temperature via a TWI-connected sensor every 2 seconds, and I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Apr 2018 11:21:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32907/ble-template-app-and-uart-crash" /><item><title>RE: Ble template app and UART crash</title><link>https://devzone.nordicsemi.com/thread/127202?ContentTypeID=1</link><pubDate>Fri, 06 Apr 2018 11:21:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:148636a3-8f9f-47c4-bf2b-f590274d35b1</guid><dc:creator>lbe</dc:creator><description>&lt;p&gt;After some time, I was finally able to find the problem!&lt;/p&gt;
&lt;p&gt;In my main.c, I was calling advertising_init() AFTER services_init(); like this the UUID for NUS was not recognized as valid.&lt;/p&gt;
&lt;p&gt;It was enough to change the order of the two calls (services_init(), then advertising_init()) to fix the problem.&lt;/p&gt;
&lt;p&gt;Thanks everyone for the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble template app and UART crash</title><link>https://devzone.nordicsemi.com/thread/127051?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 12:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5f6ac0e-bdd7-43db-8b85-c9af8e4122e6</guid><dc:creator>lbe</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;and thanks for the reply. Normally, I use a forum&amp;nbsp;only once the debug and other techniques did not help me finding the solution to a weird problem, like in this case.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble template app and UART crash</title><link>https://devzone.nordicsemi.com/thread/127040?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 12:36:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8da85514-56a3-4521-88de-2c057e504552</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;You should debug to find the reason why the code is not working. If you are using Keil, see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/10729/my-device-is-freezing-and-restarting"&gt;this post&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble template app and UART crash</title><link>https://devzone.nordicsemi.com/thread/127028?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 12:16:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb9c38fb-a522-4cef-a59c-7edc322a3b7b</guid><dc:creator>lbe</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thank you for the hint, put it is already there. Actually my code look exactly as the one you posted :).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The app is not able to start if I change the name of the m_adv_uuids.&lt;/p&gt;
&lt;p&gt;I just realized there was an error in my post; the code not working is when I define the m_adv_uuids as follows&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static ble_uuid_t m_adv_uuids[] =                                               /**&amp;lt; Universally unique service identifiers. */
{
        {BLE_UUID_NUS_SERVICE, NUS_SERVICE_UUID_TYPE}
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble template app and UART crash</title><link>https://devzone.nordicsemi.com/thread/127024?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 12:07:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a926a902-b9c8-4637-aea0-dff86c4c9500</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Try to place the&amp;nbsp;m_adv_uuids in the scan response packet, as shown in the NUS example.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void advertising_init(void)
{
    uint32_t               err_code;
    ble_advertising_init_t init;

    memset(&amp;amp;init, 0, sizeof(init));

    init.advdata.name_type          = BLE_ADVDATA_FULL_NAME;
    init.advdata.include_appearance = false;
    init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;

    init.srdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    init.srdata.uuids_complete.p_uuids  = m_adv_uuids;

    init.config.ble_adv_fast_enabled  = true;
    init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;
    init.config.ble_adv_fast_timeout  = APP_ADV_TIMEOUT_IN_SECONDS;

    init.evt_handler = on_adv_evt;

    err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
    APP_ERROR_CHECK(err_code);

    ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble template app and UART crash</title><link>https://devzone.nordicsemi.com/thread/126678?ContentTypeID=1</link><pubDate>Tue, 03 Apr 2018 14:16:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7dea072-cc5f-4e8a-904d-f3ab58998b2f</guid><dc:creator>lbe</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;after some digging in the forum, I partially solved my problem following&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/24673/add-ble_nus-to-buttonless-app"&gt;this discussio&lt;/a&gt;n and setting&amp;nbsp;&lt;span class="TextRun SCXO99892716" lang="EN-US"&gt;&lt;span class="NormalTextRun SCXO99892716"&gt;NRF_SDH_BLE_SERVICE_CHANGED to 0.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I still have a problem when I try to change the value in the array of advertised services....If I leave everything like it is now, i.e.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static ble_uuid_t m_adv_uuids[] =                                               /**&amp;lt; Universally unique service identifiers. */
{
    {BLE_UUID_DEVICE_INFORMATION_SERVICE, BLE_UUID_TYPE_BLE}
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the application works, and I can correctly receive data on an ipad using the UART from the NRF Toolbox.&lt;/p&gt;
&lt;p&gt;If I try to change the code to&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static ble_uuid_t m_adv_uuids[] =                                               /**&amp;lt; Universally unique service identifiers. */
{
    {BLE_UUID_DEVICE_INFORMATION_SERVICE, BLE_UUID_TYPE_BLE}
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The application crashes immediately, meaning that I am not even able to start&amp;nbsp; the debugger.&lt;/p&gt;
&lt;p&gt;I suspect there is something I am still missing in the sdk_config.h file, but I cannot figure out what is wrong....&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I already commented out&amp;nbsp;&lt;span class="TextRun SCXO229881043" lang="EN-US"&gt;&lt;span class="NormalTextRun SCXO229881043"&gt;NRF_LOG_BACKEND_UART_ENABLED and NRF_LOG_BACKEND_UART_TX_PIN.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="TextRun SCXO229881043" lang="EN-US"&gt;&lt;span class="NormalTextRun SCXO229881043"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="TextRun SCXO229881043" lang="EN-US"&gt;&lt;span class="NormalTextRun SCXO229881043"&gt;Thank you,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble template app and UART crash</title><link>https://devzone.nordicsemi.com/thread/126582?ContentTypeID=1</link><pubDate>Tue, 03 Apr 2018 07:09:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b1e5b47-9837-45fd-8159-4da75ae26b7e</guid><dc:creator>lbe</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;thanks for your reply. I tried using pins 3 and 4 for the TWI as you suggested, but I get the same problem when I try to register the UART service instead of the default one.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t fully get the problem you mention with the ram size....If I am registering an UUID instead of another this can create RAM problems? I think I am missing something...I am trying to have a look in the forum but I am not able to find anything useful so far....Do you have a more precise hint?&lt;/p&gt;
&lt;p&gt;Thanks a lot&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble template app and UART crash</title><link>https://devzone.nordicsemi.com/thread/126464?ContentTypeID=1</link><pubDate>Fri, 30 Mar 2018 17:40:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f48f9e2-f28b-46c1-91a8-b7a7a607c0f1</guid><dc:creator>karthikeyan</dc:creator><description>&lt;p&gt;Hi, the ram size will be the problem check that. Mean while can you change your sda and scl pin to 3 and 4 and check. You can use any pins for twi. To check whether the problem belongs there.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>