<?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 implement the get report request function in the SDK 15.3.0 hid example? Please provide a function example?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59620/how-to-implement-the-get-report-request-function-in-the-sdk-15-3-0-hid-example-please-provide-a-function-example</link><description>To realize multi touch in hid, we need to realize get report request to get the maximum number of support points and set report request to set touch mode. In the SDK 15.3.0 ble app his keyboard routine, we see the P feature report initializer, but we</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Apr 2020 01:41:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59620/how-to-implement-the-get-report-request-function-in-the-sdk-15-3-0-hid-example-please-provide-a-function-example" /><item><title>RE: How to implement the get report request function in the SDK 15.3.0 hid example? Please provide a function example?</title><link>https://devzone.nordicsemi.com/thread/243064?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 01:41:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6715ee7e-e3b5-4594-836c-20f4f51404db</guid><dc:creator>peter.min</dc:creator><description>&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement the get report request function in the SDK 15.3.0 hid example? Please provide a function example?</title><link>https://devzone.nordicsemi.com/thread/242882?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2020 09:25:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:974d507f-066c-4d83-a3a7-be4e52e33b1c</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I updated my reply with inline code.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement the get report request function in the SDK 15.3.0 hid example? Please provide a function example?</title><link>https://devzone.nordicsemi.com/thread/242818?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2020 03:04:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b69f4ee-e9c9-45bd-bec2-b48bf7c52006</guid><dc:creator>peter.min</dc:creator><description>&lt;p&gt;I can&amp;#39;t visit your sample website. Please send the sample here or my &lt;a title="email" href="mailto:peter.min@honestar.com"&gt;email&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement the get report request function in the SDK 15.3.0 hid example? Please provide a function example?</title><link>https://devzone.nordicsemi.com/thread/242715?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2020 13:19:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6acd155-c71a-4c8e-9f60-3bf8b16790e9</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The HIDS module keeps track of attribute values for each connection object (handle) and uses this tracked state to respond to a GATT client read / write operations. In general you can refer to the&amp;nbsp;hids_init() in ble_app_hids_keyboard example on how to configure the HIDS module (for instance set report map and the number of feature reports supported).&lt;/p&gt;
&lt;p&gt;If you want to set a non-zero value for feature reports there are two ways:&lt;/p&gt;
&lt;p&gt;1. You&amp;nbsp;can&amp;nbsp;use the following function:&lt;br /&gt;&lt;a href="https://gist.github.com/kapi-no/ce902e1aed6aac57eae2c6a3eabf7b58"&gt;https://gist.github.com/kapi-no/ce902e1aed6aac57eae2c6a3eabf7b58&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t ble_hids_feat_rep_set(ble_hids_t * p_hids,
                               uint8_t      rep_index,
                               uint16_t     len,
                               uint8_t      offset,
                               uint16_t     conn_handle,
                               uint8_t    * p_feat_rep)
{
    VERIFY_PARAM_NOT_NULL(p_hids);
    VERIFY_PARAM_NOT_NULL(p_feat_rep);

    ret_code_t err_code;
    uint8_t  * p_rep_data;
    uint8_t    index;

    if (rep_index &amp;gt;= p_hids-&amp;gt;feature_rep_count)
    {
        return NRF_ERROR_INVALID_PARAM;
    }

    err_code = blcm_link_ctx_get(p_hids-&amp;gt;p_link_ctx_storage,
                                 conn_handle,
                                 (void *) &amp;amp;p_rep_data);
    VERIFY_SUCCESS(err_code);

    p_rep_data += sizeof(ble_hids_client_context_t) + BOOT_KB_INPUT_REPORT_MAX_SIZE +
                  BOOT_KB_OUTPUT_REPORT_MAX_SIZE + BOOT_MOUSE_INPUT_REPORT_MAX_SIZE;

    for (index = 0; index &amp;lt; p_hids-&amp;gt;inp_rep_count; index++)
    {
        p_rep_data += p_hids-&amp;gt;p_inp_rep_init_array[index].max_len;
    }

    for (index = 0; index &amp;lt; p_hids-&amp;gt;outp_rep_count; index++)
    {
        p_rep_data += p_hids-&amp;gt;p_outp_rep_init_array[index].max_len;
    }

    for (index = 0; index &amp;lt; rep_index; index++)
    {
        p_rep_data += p_hids-&amp;gt;p_feature_rep_init_array[index].max_len;
    }

    // Copy the requested feature report data
    if (len + offset &amp;lt;= p_hids-&amp;gt;p_feature_rep_init_array[rep_index].max_len)
    {
        memcpy(p_rep_data + offset, p_feat_rep, len);
    }
    else
    {
        return NRF_ERROR_INVALID_LENGTH;
    }

    return NRF_SUCCESS;
}&lt;/pre&gt;&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You need to call&amp;nbsp;the&amp;nbsp;&lt;span&gt;ble_hids_feat_rep_set()&amp;nbsp;&lt;/span&gt;when you handle the&lt;span&gt;&amp;nbsp;&lt;/span&gt;BLE_GAP_EVT_CONNECTED event from Softdevice to set a non-zero value for the feature report(s).&lt;/p&gt;
&lt;p&gt;OR&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;Open ble_hids.c and go to on_report_value_read_auth(), then change:&lt;br /&gt;auth_read_params.params.read.update = 0; // Set to 0.&lt;/p&gt;
&lt;p&gt;Then calling sd_ble_gatts_value_set() after ble_hids_init() should work, for instance: &lt;br /&gt;err_code= sd_ble_gatts_value_set(m_conn_handle,&lt;br /&gt;m_hids.feature_rep_array[FEATURE_REPORT_INDEX]-&amp;gt;char_handles.value_handle,&lt;br /&gt;&amp;amp;gatts_value);&lt;/p&gt;
&lt;p&gt;I hope you can use one of the suggestions above.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>