<?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>Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52839/data-updating-upto-241-bytes</link><description>Hello, 
 I have developed an application that transmits a string as a notification to the phone app whenever there is a corresponding command received from the phone app. 
 I actually want to send a string of size around 3KB. Now whenever I try to do</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Oct 2019 04:56:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52839/data-updating-upto-241-bytes" /><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/214723?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2019 04:56:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0263c040-6570-4c71-905f-5003ad6e159f</guid><dc:creator>Sudeep R J</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;Thanks for asking, but&amp;nbsp;I need to talk to my manager regarding sharing the project and I alone cannot take a call on that. I dont think he will agree to this because the companies projects are very confidential to it.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll check with him what to be done in this regard.&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards&lt;/p&gt;
&lt;p&gt;Sudeep R J&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/214580?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 11:35:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d947ed8-95a7-480e-a72a-92e6ad04099d</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;You should be able to see something in the debug log, or while debugging. Like what happens in the application when you&amp;#39;re checking for NRF_ERROR_RESOURCES. Does it stop altogether at these checks, or is it stuck in a loop, or what?&lt;/p&gt;
&lt;p&gt;If you&amp;#39;d like I can set this case to private mode (only yourself and Nordic engineers will then be able to see this case) so that you can share the full project and that way I can try to debug it from our side.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/214509?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 07:19:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1582114-31d1-47d6-9504-067d9e0cf3c8</guid><dc:creator>Sudeep R J</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;I am calling sd_ble_gatts_hvx from ble_nus_data_send which in turn is called in the interrupt handlers. When the command is written from phone app then RX_DATA event occurs and there I am calling ble_nus_data_send to send a &amp;quot;Hello World&amp;quot; notification as a response to a correct command.&lt;/p&gt;
&lt;p&gt;Next, when the Hello world is sent then TX_COMPLETE event occurs and there I am calling ble_nus_data_send to send around 241 bytes of data.&lt;/p&gt;
&lt;p&gt;The problem has arised here itself. If i dont include check for NRF_ERROR_RESOURCES event then upto 241 bytes notifications are sent correctly, but when I check for NRF_ERROR_RESOURCES then I am not getting any notifications. Actually I want to send around 3KB of data but without checking&amp;nbsp;&lt;span&gt;NRF_ERROR_RESOURCES&amp;nbsp;i was able to send only 241 bytes and with checking of&amp;nbsp;NRF_ERROR_RESOURCES&amp;nbsp; i am not getting any notifications.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks &amp;amp; Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sudeep R J&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/214335?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2019 11:05:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5de8dbc8-6275-47e3-9125-69899e7da000</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi there Sudeep&lt;/p&gt;
&lt;p&gt;Where are you calling sd_ble_gatts_hvx from? Your main application or from an interrupt? If you&amp;#39;re calling it from an interrupt, what interrupt is this? If you&amp;#39;re calling it from a SoftDevice interrupt you&amp;#39;ll block the TX_COMPLETE event, as the application won&amp;#39;t leave the SoftDevice interrupt.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/214260?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2019 05:54:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec9c8bcc-d7b6-4352-bf9b-2ee0b6d47459</guid><dc:creator>Sudeep R J</dc:creator><description>&lt;p&gt;Hello Simonr,&lt;/p&gt;
&lt;p&gt;No I am not able to achieve what I want. I want to send around 3KB of data as notifications. But I am able to receive notifications only upto 241 bytes. I tried the NRF_ERROR_RESOURCES as you had suggested to me. But from that I am not able to get any notifications.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is my problem.&lt;/p&gt;
&lt;p&gt;I have shared the code that I have written with you above&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/214135?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2019 11:17:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88d1958b-3d34-4d5f-ba42-8545a73dfbce</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Sorry, but&amp;nbsp; I&amp;#39;m not sure I understand what you&amp;#39;re trying to say here. Does this mean that you were able to achieve what you wanted?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/214082?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2019 09:03:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4270cb8-1758-40af-a0de-ff979ae3026c</guid><dc:creator>Sudeep R J</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;I have not faced any issues as you have mentioned. I am able to build and debug the application and also I am able to send 242 bytes of data from ble to phone app.&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards&lt;/p&gt;
&lt;p&gt;Sudeep R J&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/214069?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2019 08:32:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7d21b33-80a6-47d1-80e4-48459bb37e1f</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;What version of the S112 SoftDevice are you using though? Please check the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcomp_matrix_nrf52810%2FCOMP%2Fnrf52810%2FnRF52810_ic_rev_sdk_sd_comp_matrix.html&amp;amp;cp=3_3_2_2"&gt;compatibility matrix&lt;/a&gt; to make sure you&amp;#39;re using a SoftDevice version that&amp;#39;s compatible with SDK v.15.2.&lt;/p&gt;
&lt;p&gt;Have you been able to debug the application and/or get an error code?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/214038?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2019 06:44:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92ec5874-ffe9-4d09-9f97-237c2c713fe8</guid><dc:creator>Sudeep R J</dc:creator><description>&lt;p&gt;Hey Simonr,&lt;/p&gt;
&lt;p&gt;I am using nRF5_SDK_15.2.0 with s112 softdevice for nRF52810.&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: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/213539?ContentTypeID=1</link><pubDate>Mon, 07 Oct 2019 06:37:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b2509f0-967b-4274-a563-d3cd9e131e49</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Sudeep&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please enable the logging module and defining DEBUG in your preprocessor defines. That way, your log should tell you why the project is stopping, as there could be a multitude of reasons for this error.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What SDK and SoftDevice version are you using by the way?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/213292?ContentTypeID=1</link><pubDate>Fri, 04 Oct 2019 05:15:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1058d39-7456-45e3-8ae7-1f4bc4691ef5</guid><dc:creator>Sudeep R J</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void ble_nus_on_ble_evt(ble_evt_t const * p_ble_evt, void * p_context)
{
    if ((p_context == NULL) || (p_ble_evt == NULL))
    {
        return;
    }

    ble_nus_t * p_nus = (ble_nus_t *)p_context;

    switch (p_ble_evt-&amp;gt;header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            on_connect(p_nus, p_ble_evt);
            break;

        case BLE_GATTS_EVT_WRITE:
            on_write(p_nus, p_ble_evt);
            break;

        case BLE_GATTS_EVT_HVN_TX_COMPLETE:
            on_hvx_tx_complete(p_nus, p_ble_evt);
            break;

        default:
            // No implementation needed.
            break;
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is the ble event handler that i am using from ble_nus.c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/213291?ContentTypeID=1</link><pubDate>Fri, 04 Oct 2019 05:12:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f25b4c5-a3ee-40de-b57b-9c57bb49b9ef</guid><dc:creator>Sudeep R J</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;I tried the&amp;nbsp;&lt;span&gt;NRF_ERROR_RESOURCES as you mentioned but now I am not able to receive any notifications from the TX_COMPLETE event. I am giving a command from phone app and it is it is detected as RX_DATA event and for that I have written a Hello World string which is notified and after that there is a program halt at&amp;nbsp; NRF_BREAKPOINT_COND breakpoint in app_error_weak.c. Earlier i was sending data and upto 241 bytes there was no problem. But now there is no transmission of data at all. Here is the data handler code that I have written.&lt;pre class="ui-code" data-mode="text"&gt;static void nus_data_handler(ble_nus_evt_t *p_evt)
{
  
  if(p_evt-&amp;gt;type == BLE_NUS_EVT_RX_DATA)
  {
    uint32_t err_code;
   
    static uint8_t data_array[BLE_NUS_MAX_DATA_LEN] = &amp;quot;Hello World&amp;quot;;
    uint16_t length = sizeof(data_array) ;
    printf(&amp;quot;Command Received : %d%d\n&amp;quot;,p_evt-&amp;gt;params.rx_data.p_data[0],p_evt-&amp;gt;params.rx_data.p_data[1]);
    
   if(p_evt-&amp;gt;params.rx_data.p_data[0]==&amp;#39;0&amp;#39; &amp;amp;&amp;amp; p_evt-&amp;gt;params.rx_data.p_data[1]==&amp;#39;2&amp;#39; )
   {
      err_code = ble_nus_data_send(&amp;amp;m_nus, data_array , &amp;amp;length, m_conn_handle);
      printf(&amp;quot;data sent\n&amp;quot;);
      if(err_code != NRF_SUCCESS)
      {
        APP_ERROR_CHECK(err_code);
     }
     
   }
  }
  if(p_evt-&amp;gt;type == BLE_NUS_EVT_TX_RDY)
     {
       uint32_t err_code;
       uint8_t data_array1[20];  
     
       uint8_t data_array[242] = &amp;quot;12131415161718190471234567890101112131Heytherehowareyouhihkshuwrhibwbhvbvuewbaidhbuhwvvabhvsduverubvjhfvyuweqiqhidbqwejkfijsnoowhuiehisbfihbiqeajojqpowhijbhvbhbvwryguyhdjdieuyevuowsacihwaygbahbyfyugfrybfyrygiwhabiwfbyryi45966598kyuftd1589622k&amp;quot;;
       
       while(1)
       {
         uint32_t k = i;
          for(uint8_t j=0;i&amp;lt;k+20;i++)
          {
            data_array1[j] = data_array[i];
            j++;
          }
          uint16_t length = sizeof(data_array1);
          err_code = ble_nus_data_send(&amp;amp;m_nus, data_array1 , &amp;amp;length, m_conn_handle);
          
         if(err_code == NRF_ERROR_RESOURCES)
          {
            break;
          }
          else if (err_code != NRF_SUCCESS) 
          {
            APP_ERROR_HANDLER(err_code);
          }
          
         
       }
       
       
       }
}    &lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you could help me with any examples or documentation then that would be great.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks &amp;amp; Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sudeep R J&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/213181?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2019 12:00:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:234111db-9dc3-45c0-9977-6cca38b65431</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Sudeep&lt;/p&gt;
&lt;p&gt;BLE_ERROR_NO_TX_BUFFERS is outdated and no longer a valid error message. To make sure there are TX buffers available in newer SDKs you can call &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v6.1.1%2Fgroup___b_l_e___g_a_t_t_s___e_n_u_m_e_r_a_t_i_o_n_s.html&amp;amp;anchor=ggac817a87689e9c2c82f813a5221d0bd27a6501f213d3f433b0588413fa536d347c"&gt;sd_ble_gatts_hvx &lt;/a&gt;until you get NRF_ERROR_RESOURCES. When you get this error, wait for &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v6.1.1%2Fgroup___b_l_e___g_a_t_t_s___e_n_u_m_e_r_a_t_i_o_n_s.html&amp;amp;anchor=ggae537647902af1b05c1e32f12d6b401c7afab96bfa9918017082235f7664919f9d"&gt;BLE_GATTS_EVT_HVN_TX_COMPLETE &lt;/a&gt;before you call sd_ble_gatts_hvx again.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/213163?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2019 10:22:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b6c4026-0290-4c1f-81f0-5f356368729c</guid><dc:creator>Sudeep R J</dc:creator><description>&lt;p&gt;Hey Simonr,&lt;/p&gt;
&lt;p&gt;I clearly understood what Ole has written in case of Heart Rate Monitor and i tried the same thing but when i wrote a if condition to check for&amp;nbsp;&lt;span&gt;BLE_ERROR_NO_TX_BUFFERS i got an error saying this is undefined. I searched the entire project but&amp;nbsp;BLE_ERROR_NO_TX_BUFFERS is nowhere to be found. should i manually add this event in the BLE_GATTS_EVT or in nus_evts ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I think with what Ole has described my program should work according to that. Kindly let me know how to solve this&amp;nbsp;BLE_ERROR_NO_TX_BUFFERS issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks &amp;amp; Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sudeep R J&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/213146?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2019 09:19:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:539e4283-585b-4d18-a857-a9712303e05e</guid><dc:creator>Sudeep R J</dc:creator><description>&lt;p&gt;Hey Simonr,&lt;/p&gt;
&lt;p&gt;I have done that already.&lt;/p&gt;
&lt;p&gt;Now whatever 241 bytes i am able to receive as notifications are sent in 20 byte packets itself. I want to know how the next 241 bytes of data can be sent after sending this first 241bytes.&lt;/p&gt;
&lt;p&gt;whats happening is when I try to send a string of size say anythin more than 241 bytes, the first 241 bytes are sent successfully and that is notified on the nRF connect app. But the next bytes are not sent. That is the issue I am facing.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data updating upto 241 bytes</title><link>https://devzone.nordicsemi.com/thread/213143?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2019 09:15:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49a6a026-5429-4f9a-a548-f318b37c571e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Sudeep&lt;/p&gt;
&lt;p&gt;I recommend you divide your packets into 20-byte packets, as this is the most efficient way to transfer large amounts of data like this over BLE.&amp;nbsp;Please take a look at &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/42906/not-being-able-to-completely-transmit-large-string-over-ble"&gt;this case&lt;/a&gt;, for some more pointers on the matter.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>