<?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 Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75910/add-ble-scan-to-usbd_ble_uart_freertos-example</link><description>Hi I&amp;#39;m trying to change peripheral usbd_ble_uart_freertos example to central with nus_c I added the scan and nuc_c module. When I&amp;#39;m testing the application, before making a connection with the peripheral all USB events are working as expected. After the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 13 Jun 2021 11:59:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75910/add-ble-scan-to-usbd_ble_uart_freertos-example" /><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/315016?ContentTypeID=1</link><pubDate>Sun, 13 Jun 2021 11:59:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:409c4805-fa4d-4891-a473-404e2b9c9da2</guid><dc:creator>shai.c</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Thanks for solving the issue!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/314645?ContentTypeID=1</link><pubDate>Thu, 10 Jun 2021 09:34:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4847ed1b-8b0a-4b6e-88c9-283bfd468bbe</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The problem here is that there is a stack overflow in the BLE task (SoftDevice handler implemented in&amp;nbsp; &amp;lt;SDK&amp;gt;\components\softdevice\common\nrf_sdh_freertos.c). You can see that by setting&amp;nbsp;&lt;code&gt;configCHECK_FOR_STACK_OVERFLOW&lt;/code&gt; to &lt;code&gt;2&lt;/code&gt; in FreeRTOSConfig.h and a breakpoint in&amp;nbsp;&lt;code&gt;vApplicationStackOverflowHook()&lt;/code&gt; in your main.c.&lt;/p&gt;
&lt;p&gt;To fix the issue increase&amp;nbsp;&lt;code&gt;NRF_BLE_FREERTOS_SDH_TASK_STACK&lt;/code&gt; in nrf_sdh_freertos.c, for instance to &lt;code&gt;512&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/314556?ContentTypeID=1</link><pubDate>Wed, 09 Jun 2021 18:13:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e07481a4-e12d-4dae-8278-666da05f497b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I did a naive test with a dummy peripheral that did not actually implement the NUS service, so no NUS service was discovered. Then I did not see any USB issues. Testing again with a device that actually implements the NUS service and where that is discovered I also see USB events missing. I need to look more into it, though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/314509?ContentTypeID=1</link><pubDate>Wed, 09 Jun 2021 13:50:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf9bafb8-b3e8-4bcf-9f3f-6e87f3b8264f</guid><dc:creator>shai.c</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;which SDK version are you using?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is my log:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: USBD BLE UART example started.
&amp;lt;info&amp;gt; app: Connecting to target 4DB83F7296C5
&amp;lt;info&amp;gt; app: ATT MTU exchange completed.
&amp;lt;info&amp;gt; app: Ble NUS max data length set to 0xF4(244)
&amp;lt;info&amp;gt; app: Discovery complete.
&amp;lt;info&amp;gt; app: Connected to device with Nordic UART Service.&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;why i don&amp;#39;t&amp;nbsp;see in your logs the following messages:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: Discovery complete.
&amp;lt;info&amp;gt; app: Connected to device with Nordic UART Service.&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Did you close the discovery module?&lt;/span&gt;&lt;/p&gt;
&lt;div style="left:137px;position:absolute;top:361px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/314480?ContentTypeID=1</link><pubDate>Wed, 09 Jun 2021 12:59:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:903f501e-3add-4e71-9210-6ca5018a4edf</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I took over this case from Susheel. I did just basic testing and then I see I get USB events even when connected. See log:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: USBD BLE UART example started.
&amp;lt;info&amp;gt; app: Connecting to target 45C36938A3C6
&amp;lt;info&amp;gt; app: ATT MTU exchange completed.
&amp;lt;info&amp;gt; app: Ble NUS max data length set to 0xF4(244)
&amp;lt;info&amp;gt; app: USB power detected
&amp;lt;info&amp;gt; app: USB ready
&amp;lt;info&amp;gt; app: USB power removed
&amp;lt;info&amp;gt; app: CDC ACM port closed
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Can you elaborate on the procedure I should follow to reproduce the issue you are seeing, and explain it in a bit more detail?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/314358?ContentTypeID=1</link><pubDate>Wed, 09 Jun 2021 07:33:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b81344f-132c-4ecd-bfe7-ca3b024a2fbe</guid><dc:creator>shai.c</dc:creator><description>&lt;p&gt;Thanks Susheel&amp;nbsp;&lt;span&gt;feel better&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/314321?ContentTypeID=1</link><pubDate>Wed, 09 Jun 2021 04:29:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8aa35fa5-8ea3-4be3-975a-87ce158bccc6</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry for late response. I am on sick leave and will request my colleague too look into this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/314075?ContentTypeID=1</link><pubDate>Tue, 08 Jun 2021 06:56:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:839f4275-2cc1-4ea9-bd99-7165c43dae61</guid><dc:creator>shai.c</dc:creator><description>&lt;p&gt;Good morning &lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Waiting for advise from you&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/313417?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 12:40:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a1accf4-1c11-4bce-9a72-369173acdfd7</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I am sorry, I did not manage to debug this today and I am off tomorrow, I will most likely continue to look at this on Monday&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/313311?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 08:28:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80a6d028-14e4-4032-95ae-0ced5d568bdc</guid><dc:creator>shai.c</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;attached minimalistic project with the problem.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/usbd_5F00_ble_5F00_with_5F00_scan_5F00_freertos.zip"&gt;devzone.nordicsemi.com/.../usbd_5F00_ble_5F00_with_5F00_scan_5F00_freertos.zip&lt;/a&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: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/313257?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 06:23:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94906c9d-583d-4237-8a77-5700aa2e9abf</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hmm, then the problem does not seem to be in the code usbd_isr or the usb thread. Need to understand what your application is doing in the &amp;quot;Connected&amp;quot; event. Can you give me your minimalistic project to be able to reproduce this behaviour?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/313161?ContentTypeID=1</link><pubDate>Wed, 02 Jun 2021 14:16:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9daa9eb2-622b-446c-9863-99b6e8b22a5c</guid><dc:creator>shai.c</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;i tried this but it didnt help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/313160?ContentTypeID=1</link><pubDate>Wed, 02 Jun 2021 14:15:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad445b86-caab-4d5f-bc68-2740eb6a3746</guid><dc:creator>shai.c</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the latest SDK 17.0.2&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/313139?ContentTypeID=1</link><pubDate>Wed, 02 Jun 2021 13:37:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a3ef2d9-4a22-498f-bcd4-216a237eca42</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;maybe you should let the usbd event queue process to run first before waiting as I see one race condition with first waiting and then processing&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    for (;;)
    {
        while (app_usbd_event_queue_process())
        {
            /* Nothing to do */
        }

        /* Waiting for event */
        UNUSED_RETURN_VALUE(ulTaskNotifyTake(pdTRUE, USB_THREAD_MAX_BLOCK_TIME));
    }    &lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add Ble Scan to usbd_ble_uart_freertos example</title><link>https://devzone.nordicsemi.com/thread/313136?ContentTypeID=1</link><pubDate>Wed, 02 Jun 2021 13:31:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c36a10e8-a804-40a6-b2c0-97529d4c9c80</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Which SDK version are you using? Seems like one of the&amp;nbsp;vTaskNotifyGiveFromISR is being lost making your USBD state machine stuck at wait and unable to create any new usbd events&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>