<?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>How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48580/how-to-increase-the-length-of-characteristic-value</link><description>Hi, 
 I would like to increase the length of read &amp;amp; write characteristic value to 29 bytes. I changed the NRF_SDH_BLE_GAP_DATA_LENGTH = 36 &amp;amp; NRF_SDH_BLE_GATT_MAX_MTU_SIZE = 32. Also changed attr_char_value.max_len = 29 &amp;amp; ram settings &amp;amp; hvx_params.p_len</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Sep 2019 11:52:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48580/how-to-increase-the-length-of-characteristic-value" /><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/209812?ContentTypeID=1</link><pubDate>Mon, 16 Sep 2019 11:52:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:370a1ea1-e39c-4ed3-998b-c5333a14d028</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The last reply was two months ago and the latest problem seems far away from the original title/question.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please create a new support case for it. Thanks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/209503?ContentTypeID=1</link><pubDate>Thu, 12 Sep 2019 22:53:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f4c0944-b7e9-49c4-aa49-f6ffe5bb580a</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;I added all the stuff as mentioned in the link above but still there are disconnections. Reattaching my newly modified files.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6064.ble_5F00_cus.c"&gt;devzone.nordicsemi.com/.../6064.ble_5F00_cus.c&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_cus.h"&gt;devzone.nordicsemi.com/.../ble_5F00_cus.h&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/707623.main.c"&gt;devzone.nordicsemi.com/.../707623.main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/197008?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2019 07:47:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:feef37bc-2141-45a0-8074-4ae8c27c5d0b</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yes, I tested with nRFconnect PC/mobile. It can read/write &lt;span&gt;29 bytes&lt;/span&gt;. If you enable the notification, it will disconnect immediately.&amp;nbsp; You can refer to this&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial&lt;/a&gt;&amp;nbsp;to check the notification setting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-62c600b6043d4e6a8819bea1689eb67c/pastedimage1562571988796v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/196907?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 18:42:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a4c0803-aa4d-4e48-b51f-21d79dde89a8</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;No Amanda, its still disconnecting. Did you check on nrfconnect? I&amp;#39;m also trying to send 0x01 &amp;amp; 0x02 values to output characteristics.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/196553?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 12:59:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0305421e-73f7-4a2d-9ca2-97cccb90d750</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The attached file &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-62c600b6043d4e6a8819bea1689eb67c/230855_5F00_0537_5F00_ble_5F00_app_5F00_template.zip"&gt;devzone.nordicsemi.com/.../230855_5F00_0537_5F00_ble_5F00_app_5F00_template.zip&lt;/a&gt; is modified as the last suggestion. It can work on my side.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/196384?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 06:19:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7892e82-4f04-4722-a9f3-28967bc8c2b9</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;We&amp;nbsp;are enduring&amp;nbsp;heavy loading because many colleagues are on vacation.&lt;/p&gt;
&lt;p&gt;I will back your case soon. &lt;span&gt;Thank you for your understanding.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/196334?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2019 17:37:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:246b1210-05b4-4a88-8188-5a6a0aea0514</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Did you find anything?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/196083?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 21:26:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9333cafb-b6f0-428a-9de4-cba01875fb39</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Hi Amanda, I&amp;#39;m still facing problems with all these changes. The bluetooth is getting disconnected. Please check my code. You can just search for&amp;nbsp;/*NEW CHANGE*/ in my code to track the changes.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5314.ble_5F00_app_5F00_template.zip"&gt;devzone.nordicsemi.com/.../5314.ble_5F00_app_5F00_template.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I could not trace the error.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1562102727653v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Please help!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/193659?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2019 12:14:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:802a187d-8197-4aca-9095-604f17c29992</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Change the Line 46 as&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    attr_char_value.init_len     = 29*sizeof(uint8_t);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/193237?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 15:12:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7b3a40d-6232-46eb-ad52-680972c1f0d5</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for adding the Data I/O characteristic. */
static uint32_t data_io_char_add(ble_midi_service_t * p_midi_service, const ble_midi_service_init_t * p_midi_service_init)
{
    uint32_t   err_code;
    ble_gatts_char_md_t char_md;
    ble_gatts_attr_md_t cccd_md;
    ble_gatts_attr_t    attr_char_value;
    ble_uuid_t          ble_uuid;
    ble_gatts_attr_md_t attr_md;
    // Configure the CCCD which is needed for Notifications and Indications
    memset(&amp;amp;cccd_md, 0, sizeof(cccd_md));
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cccd_md.read_perm);
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cccd_md.write_perm);
    cccd_md.vloc = BLE_GATTS_VLOC_STACK;
    // Configure the characteristic metadata.
    memset(&amp;amp;char_md, 0, sizeof(char_md));
    char_md.char_props.read          = 1;
    char_md.char_props.write_wo_resp = 1;
    char_md.char_props.notify        = 1;
    char_md.p_char_user_desc         = NULL;
    char_md.p_char_pf                = NULL;
    char_md.p_user_desc_md           = NULL;
    char_md.p_cccd_md                = &amp;amp;cccd_md;
    char_md.p_sccd_md                = NULL;
    // Add the MIDI Data I/O Characteristic UUID
    ble_uuid128_t base_uuid = {BLE_UUID_MIDI_DATA_IO_CHAR_BASE_UUID};
    err_code = sd_ble_uuid_vs_add(&amp;amp;base_uuid, &amp;amp;p_midi_service-&amp;gt;uuid_type);
    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }
    ble_uuid.type = p_midi_service-&amp;gt;uuid_type;
    ble_uuid.uuid = BLE_UUID_MIDI_DATA_IO_CHAR_UUID;
    // Configure the characteristic value&amp;#39;s metadata
    memset(&amp;amp;attr_md, 0, sizeof(attr_md));
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;attr_md.read_perm);
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;attr_md.write_perm);
    attr_md.vloc       = BLE_GATTS_VLOC_STACK;
    attr_md.rd_auth    = 0;
    attr_md.wr_auth    = 0;
    attr_md.vlen       = 0;
    // Configure the characteristic value
    memset(&amp;amp;attr_char_value, 0, sizeof(attr_char_value));
    attr_char_value.p_uuid       = &amp;amp;ble_uuid;
    attr_char_value.p_attr_md    = &amp;amp;attr_md;
    attr_char_value.init_len     = sizeof(uint8_t);
    attr_char_value.init_offs    = 0;
    attr_char_value.max_len      = 29*sizeof(uint8_t);
    attr_char_value.p_value      = NULL;
    return sd_ble_gatts_characteristic_add(p_midi_service-&amp;gt;service_handle, &amp;amp;char_md, &amp;amp;attr_char_value, &amp;amp;p_midi_service-&amp;gt;data_io_char_handles);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am also attaching the full code for your reference. Please have a look.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0537.ble_5F00_app_5F00_template.zip"&gt;devzone.nordicsemi.com/.../0537.ble_5F00_app_5F00_template.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/193203?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 13:24:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:634140bc-5750-4d6e-828c-b72b35d58dbe</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Could you provide the code where you initializes the characteristic?&lt;/p&gt;
&lt;p&gt;The code before sd_ble_gatts_characteristic_add ().&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/193036?ContentTypeID=1</link><pubDate>Sun, 16 Jun 2019 14:34:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a07ba00-8018-405a-af4c-b8801a6f8546</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;I&amp;#39;m using ble_app_template example in&amp;nbsp;SDK 15.2.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have set&amp;nbsp;gatts_value.len&amp;nbsp; &amp;nbsp; &amp;nbsp;= 29*sizeof(uint8_t);&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t ble_midi_data_io_value_update(ble_midi_service_t * p_midi_service, uint8_t data_io_value[29])
{
    if (p_midi_service == NULL)
    {
        return NRF_ERROR_NULL;
    }
    uint32_t err_code = NRF_SUCCESS;
    ble_gatts_value_t gatts_value;
    // Initialize value struct.
    memset(&amp;amp;gatts_value, 0, sizeof(gatts_value));
    gatts_value.len     = 29*sizeof(uint8_t);
    gatts_value.offset  = 0;
    gatts_value.p_value = &amp;amp;data_io_value[0];
    // Update database.
    err_code = sd_ble_gatts_value_set(p_midi_service-&amp;gt;conn_handle, p_midi_service-&amp;gt;data_io_char_handles.value_handle, &amp;amp;gatts_value);
    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }
    // Send value if connected and notifying.
    if ((p_midi_service-&amp;gt;conn_handle != BLE_CONN_HANDLE_INVALID)) 
    {
        ble_gatts_hvx_params_t hvx_params;
        memset(&amp;amp;hvx_params, 0, sizeof(hvx_params));
        hvx_params.handle = p_midi_service-&amp;gt;data_io_char_handles.value_handle;
        hvx_params.type   = BLE_GATT_HVX_NOTIFICATION;
        hvx_params.offset = gatts_value.offset;
        hvx_params.p_len  = &amp;amp;gatts_value.len;
        hvx_params.p_data = gatts_value.p_value;
        err_code = sd_ble_gatts_hvx(p_midi_service-&amp;gt;conn_handle, &amp;amp;hvx_params);
        NRF_LOG_INFO(&amp;quot;sd_ble_gatts_hvx result: %x. \r\n&amp;quot;, err_code); 
    }
    else
    {
        err_code = NRF_ERROR_INVALID_STATE;
        NRF_LOG_INFO(&amp;quot;sd_ble_gatts_hvx result: NRF_ERROR_INVALID_STATE. \r\n&amp;quot;); 
    }
    return err_code;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Please guide what else do I need to add?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to increase the length of characteristic value?</title><link>https://devzone.nordicsemi.com/thread/192847?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2019 08:27:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2189f91b-6fd8-4108-a8e9-b41e10368fc9</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What SDK version and example do you use?&lt;/p&gt;
&lt;p&gt;What is the value of &lt;em&gt;&amp;amp;gatts_value.len?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>