<?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>send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35647/send-packets-continuously-in-ble_app_uart-example</link><description>I have to send packages continuously; How can I get feedback on the success of transmission before sending the next package? Which event should I use? and in what callback function? 
 I&amp;#39;m using SDK 15 and softdevice 6.0. The event BLE_EVT_TX_COMPLETE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Jul 2018 12:36:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35647/send-packets-continuously-in-ble_app_uart-example" /><item><title>RE: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/138504?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2018 12:36:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:870b4473-0785-4d1e-9e00-02d034d60aca</guid><dc:creator>mdido</dc:creator><description>&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;For me the ticket is closed.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/138160?ContentTypeID=1</link><pubDate>Thu, 28 Jun 2018 14:22:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3590b350-5cac-4838-a2dd-899ea4d6e0ef</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;That is not entirely true.&lt;/p&gt;
&lt;p&gt;Different devices supports different features in BLE. Some are BLE5 features, while some are not.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The only BLE5 specific feature that makes a difference in throughput is 2MBPS.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Other than that, different phones support different MTU sizes, and some support DLE while others don&amp;#39;t. This will affect the number of packets that can be sent every connection interval.&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: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/138155?ContentTypeID=1</link><pubDate>Thu, 28 Jun 2018 13:57:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cee88b8a-5d28-4258-83f9-15beaf64a6c4</guid><dc:creator>mdido</dc:creator><description>&lt;p&gt;Hello, thank you for the great support.&lt;/p&gt;
&lt;p&gt;A last question:&lt;/p&gt;
&lt;p&gt;&lt;span id="result_box" lang="en"&gt;&lt;span&gt;I believed that only in BLE 5.0 I can send more packets in a connection interval.&lt;/span&gt; &lt;span&gt;It&amp;#39;s true?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&lt;span&gt;&lt;span id="result_box" lang="en"&gt;This is because I connected the nordic to phones with BLE &amp;lt;5.0 and then it seems that more packets are being sent every connection interval.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/138045?ContentTypeID=1</link><pubDate>Thu, 28 Jun 2018 09:04:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79ad3ab6-3ab3-4ef7-a8a7-cdc6b9eb1248</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok.&lt;/p&gt;
&lt;p&gt;The error 13313 = 0x3401 means that the CCCD of the characteristic is not set. That means that the phone has not enabled the notification yet, when you try to send the notification.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can ignore this err_code. That is, don&amp;#39;t send it to an APP_ERROR_CHECK(), but be aware that the message is not sent. Try to send it again. Once you call it after the notification is enabled, it should return NRF_SUCCESS.&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: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/138007?ContentTypeID=1</link><pubDate>Thu, 28 Jun 2018 07:03:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c2b4712-d1f3-435c-845b-987bee41ffd2</guid><dc:creator>mdido</dc:creator><description>&lt;p&gt;Good morning,&lt;/p&gt;
&lt;p&gt;I declared the flag as volatile, but the behaviour is the same. I have more information for you:&lt;/p&gt;
&lt;p&gt;If I send only 1000 packets witn the same code the app on iOS does not freeze, but If I disconnect the Nordic and I connect again I have the following error in the function &amp;quot;app_error_weak.c&amp;quot; of chip:&lt;/p&gt;
&lt;p&gt;app: ERROR 13313 [Unknown error code]&lt;/p&gt;
&lt;p&gt;Please see the following screenshot; the line number is always &amp;quot;APP_ERROR_CHECK(err_code);&amp;quot; in&amp;nbsp;SendData(void).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/968x612/__key/communityserver-discussions-components-files/4/ERROR_5F00_13313.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Mario&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/137934?ContentTypeID=1</link><pubDate>Wed, 27 Jun 2018 14:17:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:196fe4ab-b8d9-41ca-a1a3-d33a6761358e</guid><dc:creator>mdido</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;span id="result_box" lang="en"&gt;&lt;span&gt;Even I&amp;#39;m a bit confused.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;I believed that only in BLE 5.0 I can send more packets in a connection interval.&lt;/span&gt; &lt;span&gt;It&amp;#39;s true?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;With our current device that is CSR1010, with iOS we always have one packet per connection interval.&lt;/span&gt; &lt;span&gt;While using the Nordic with a connection interval set at 15 ms we have the following behaviors:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;1) iOS 9.0.1 -&amp;gt; 6 contiguous packets every 30 ms (with the freeze of app);&lt;/span&gt;&lt;br /&gt;&lt;span&gt;2) iOS 11.4 -&amp;gt; 7 contiguous packets every 15 ms &lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;(with the freeze of app)&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;3) Android 6.0.1 -&amp;gt; 1 packet every 15 ms (which is what I expected from configuration) (with no freeze of app).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The iOS / Android devices used are all BLE &amp;lt;5.0.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&lt;span&gt;Please, could you clarify?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="en"&gt;&lt;span&gt;Mario&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/137894?ContentTypeID=1</link><pubDate>Wed, 27 Jun 2018 12:39:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d5237c5-1b0f-420f-b5fa-0b6453a4ab42</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;If the flag is only set to 1 in the tx complete event, but the app still queues several packets, there is probably something wrong in the way that the flag is read. Where did you define the flag, and what type is it?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you try to decrare it as:&lt;/p&gt;
&lt;p&gt;volatile uint8_t transmission_flag = 0;&lt;/p&gt;
&lt;p&gt;and see if that helps? Volatile should tell the compiler that this variable may be changed outside the current application. If not, the compiler may assume that transmission_flag is not changed, since it didn&amp;#39;t change it itself.&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: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/137892?ContentTypeID=1</link><pubDate>Wed, 27 Jun 2018 12:34:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db6863b1-01a0-4222-86a5-f32abdc5d54f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Oh, so you want to lower the transmission rate, is that correct?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately, you can&amp;#39;t read out how many packets you have queued up, but there are some viable workarounds if you want to only send one packet per connection interval:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1: Not the best solution, but maybe the easiest. You can use a timer, and send a packet in the timeout handler. This may not be synced up with the connection interval, but if that is ok for your application, that is fine.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2: You can keep track of the number of packets that you have queued. That is, every time ble_nus_data_send, increment the counter, and everytime you get the tx complete event, decrement the counter. And then you only queue a packet when the counter is 0. This is basically what you did with the flag_transmitted implementation.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3: If you want to queue a packet every connection interval, this might be the most reliable solution. You can enable the radio notification. Please see &lt;a href="https://devzone.nordicsemi.com/tutorials/b/software-development-kit/posts/radio-notification"&gt;this guide&lt;/a&gt;.&amp;nbsp; That way you can get an interrupt on a given time before the connection interval event. In that interrupt you can queue one packet.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am a bit confused. The description from Einar is suited if you want to queue several packets, which is the correct way of doing it. But do you want to only queue one packet at the time? Do you want to increase the throughput? If the phone freezes it&amp;#39;s probably because the app can&amp;#39;t handle the incoming packets fast enough.&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: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/137816?ContentTypeID=1</link><pubDate>Wed, 27 Jun 2018 08:19:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56d9cd44-2354-4603-83e7-81476f72f44f</guid><dc:creator>mdido</dc:creator><description>&lt;p&gt;Hello, I changed the function&amp;nbsp;void SendData(void) as follows:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void SendData(void)
{

    static uint8_t data_array[BLE_NUS_MAX_DATA_LEN];
    static uint8_t index = 0;
    uint32_t       err_code;
    uint16_t length;

    for (index=0; index&amp;lt;18; index++)
    {
      data_array[index] =  (unsigned char)tempo_IC1;//index+1;
    }

    length = 18;

    err_code = ble_nus_data_send(&amp;amp;m_nus, data_array, &amp;amp;length, m_conn_handle);
    

    if ((err_code != NRF_ERROR_RESOURCES)&amp;amp;&amp;amp;(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))// (or anything else you want to filter out...)
    {
        APP_ERROR_CHECK(err_code);
    }

}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and now I have not the NRF_ERROR_RESOURCES. Pratically I send a packet of 18 bytes only if I sure that is set the flag BLE_GATTS_EVT_HVN_TX_COMPLETE. However I have the same timing transmission on the oscilloscope. That is the transmission of 7 packets of 18 bytes every connection interval that I set to 15 ms. This behaviour &amp;quot;freezes&amp;quot; the app on IOS ( I use IOS 11.4). How I can send one packet of 18 bytes every connection interva continuously?&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Mario&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/137717?ContentTypeID=1</link><pubDate>Tue, 26 Jun 2018 14:45:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00a19c11-1f08-4c72-b76c-168d5a8beba5</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;ble_nus_data_send() returns NRF_ERROR_RESOURCES this means that the sending buffer for this characteristic is full. Please see the description in ble_gatts.h, on line 632.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you use notification or indication?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see why you use the NRF_ERROR_BUSY return value.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if you want to send more packets you should do something like:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;err_code = NRF_SUCCESS;
while (err_code == NRF_SUCCESS)
{
    err_code = ble_nus_data_send()
}
if (err_code != NRF_ERROR_RESOURCES (or anything else you want to filter out...)
{
    APP_ERROR_CHECK(err_code)
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you receive an err_code = NRF_ERROR_RESOURCES, you should wait for the&amp;nbsp;BLE_GATTS_EVT_HVN_TX_COMPLETE event, which means that some buffer space is free, and do the same until you are done sending data.&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: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/137585?ContentTypeID=1</link><pubDate>Tue, 26 Jun 2018 07:24:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71ff70af-b0da-4480-ade1-7b438a15e06c</guid><dc:creator>mdido</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;following the function SendData()&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void SendData(void)
{

    static uint8_t data_array[BLE_NUS_MAX_DATA_LEN];
    static uint8_t index = 0;
    uint32_t       err_code;
    uint16_t length;

    for (index=0; index&amp;lt;18; index++)
    {
      data_array[index] =  (unsigned char)tempo_IC1;//index+1;
    }

    length = 18;

    do
    {
      err_code = ble_nus_data_send(&amp;amp;m_nus, 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);
      }
    } while (err_code == NRF_ERROR_BUSY);

}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The file name in p_info is main.c where there is the function SendData and the line number is &amp;quot;APP_ERROR_CHECK(err_code)&amp;quot; always in function SendData&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/137400?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 09:05:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8c0d988-2420-4656-b555-bb856b0a01a8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Einar is currently out of office, so I have taken this case, and will follow it up.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I see that the&amp;nbsp;BLE_NUS_EVT_TX_RDY is called on the BLE_EVT_TX_COMPLETE event, so it should be fine.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What does your SendData() function look like?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you please try the following:&lt;/p&gt;
&lt;p&gt;define &amp;quot;DEBUG&amp;quot; in your preprocessor defines, and disable optimization (set it to -O0). Then you should be able to find out what function that returns NRF_ERROR_RESOURCES. Set a breakpoint on line 90 in app_error_weak.c, and it should break there when you receive the error. Check what file name and line number that is stored in p_info. Is this within your SendData() function?&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: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/137263?ContentTypeID=1</link><pubDate>Fri, 22 Jun 2018 14:49:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a50ab532-89f8-4f16-8941-9138f088794a</guid><dc:creator>mdido</dc:creator><description>&lt;p&gt;Hello, I wait the event&amp;nbsp;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:monospace,serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;BLE_GATTS_EVT_HVN_TX_COMPLETE&lt;/span&gt; before the next transmission with&amp;nbsp;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:monospace,serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;ble_nus_data_send()&lt;/span&gt;. Please see the while loop in the main:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    // Enter main loop.
    for (;;)
    {
        //idle_state_handle();

        if ((flag_connected==1)&amp;amp;&amp;amp;(flag_transmitted==1))
        //if (flag_connected==1)
	{
          flag_transmitted = 0;
          
          //nrf_delay_ms(100);
          nrf_gpio_pin_toggle(OUT_COMP);
          SendData();

          num_packets++;
                                           
	}

    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;the flag_transmitted is asserted in following function handler:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void nus_data_handler(ble_nus_evt_t * p_evt)
{
    int break_point;
    char debug_str[10] = {0};

    if (p_evt-&amp;gt;type == BLE_NUS_EVT_RX_DATA)
    {
        uint32_t err_code;

        NRF_LOG_DEBUG(&amp;quot;Received data from BLE NUS. Writing data on UART.&amp;quot;);
        NRF_LOG_HEXDUMP_DEBUG(p_evt-&amp;gt;params.rx_data.p_data, p_evt-&amp;gt;params.rx_data.length);

        break_point = 25;

        // **************** ha ricevuto i dati su BLE RX, commentato il blocco inferiore che li rigirava sulla UART fisica
        /*
        for (uint32_t i = 0; i &amp;lt; p_evt-&amp;gt;params.rx_data.length; i++)
        {
            do
            {
                err_code = app_uart_put(p_evt-&amp;gt;params.rx_data.p_data[i]);
                if ((err_code != NRF_SUCCESS) &amp;amp;&amp;amp; (err_code != NRF_ERROR_BUSY))
                {
                    NRF_LOG_ERROR(&amp;quot;Failed receiving NUS message. Error 0x%x. &amp;quot;, err_code);
                    APP_ERROR_CHECK(err_code);
                }
            } while (err_code == NRF_ERROR_BUSY);
        }
        if (p_evt-&amp;gt;params.rx_data.p_data[p_evt-&amp;gt;params.rx_data.length - 1] == &amp;#39;\r&amp;#39;)
        {
            while (app_uart_put(&amp;#39;\n&amp;#39;) == NRF_ERROR_BUSY);
        }
        */
    }
    else if (p_evt-&amp;gt;type == BLE_NUS_EVT_TX_RDY)
    {
        flag_transmitted = 1;

        NRF_LOG_INFO(&amp;quot;TX OK&amp;quot;);
        //sprintf(debug_str, &amp;quot;numbers of packets = %d&amp;quot;, num_packets);
        //NRF_LOG_INFO(&amp;quot;%s&amp;quot;,(uint32_t)debug_str);
    }

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#222222;font-family:arial,sans-serif;font-size:16px;font-style:normal;font-weight:400;letter-spacing:normal;position:relative;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;" id="result_box" lang="en"&gt;&lt;span style="color:#222222;font-size:16px;position:static;"&gt;then, &lt;span style="background-color:transparent;color:#222222;float:none;font-family:arial,sans-serif;font-size:16px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;at the connection&lt;/span&gt;, the continuous transmission starts. &lt;span class="short_text" style="background-color:transparent;color:#222222;font-family:arial,sans-serif;font-size:24px;font-style:normal;font-weight:400;letter-spacing:normal;position:relative;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;" id="result_box" lang="en"&gt;&lt;span style="color:#222222;font-size:24px;position:static;"&gt;About 6000 packages can be transmitted&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class="short_text" style="background-color:transparent;color:#222222;font-family:arial,sans-serif;font-size:24px;font-style:normal;font-weight:400;letter-spacing:normal;position:relative;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;" id="result_box" lang="en"&gt;&lt;span style="color:#222222;font-size:24px;position:static;"&gt;before the software goes to the function&lt;/span&gt;&lt;/span&gt; &amp;quot;__WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)&amp;quot; with error 19 &amp;quot;NRF_ERROR_RESOURCES&amp;quot;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#222222;font-family:arial,sans-serif;font-size:16px;font-style:normal;font-weight:400;letter-spacing:normal;position:relative;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;" lang="en"&gt;&lt;span style="color:#222222;font-size:16px;position:static;"&gt;Every transmission I toggle a pin, please see the attached image of the monitoring of pin with the scope. Every change of level is a transmission&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:transparent;color:#222222;font-family:arial,sans-serif;font-size:16px;font-style:normal;font-weight:400;letter-spacing:normal;position:relative;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;" lang="en"&gt;&lt;span style="color:#222222;font-size:16px;position:static;"&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/400x295/__key/communityserver-discussions-components-files/4/scope_5F00_measure_5F00_2.jpg" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;A scope division i 5 ms and this is a very strange behaviour because I set the connction interval at 15 ms.&lt;/p&gt;
&lt;p&gt;What do you think?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send packets continuously in ble_app_uart example</title><link>https://devzone.nordicsemi.com/thread/137224?ContentTypeID=1</link><pubDate>Fri, 22 Jun 2018 09:28:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d3d31cf-0bf0-4afa-8089-91031e18a498</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can use the&amp;nbsp;&lt;code&gt;BLE_GATTS_EVT_HVN_TX_COMPLETE&lt;/code&gt; event to know that a Handle Value Notification transmission has completed. (This is allready used in the&amp;nbsp;NUS implementation, &lt;code&gt;ble_nus.c&lt;/code&gt;). Note that you can queue more than one, but you will get &lt;code&gt;NRF_ERROR_RESOURCES&lt;/code&gt; returned when there are too many in the queue. In that case, you have to wait for the&amp;nbsp;&lt;code&gt;BLE_GATTS_EVT_HVN_TX_COMPLETE&lt;/code&gt; event before you call&amp;nbsp;&lt;code&gt;ble_nus_data_send()&lt;/code&gt; (or&amp;nbsp;&lt;code&gt;sd_ble_gatts_hvx()&lt;/code&gt;) again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>