<?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>try to integrate Mult-touch and Keyboard functionalities in a single program, but it only can send Mult-touch information normally, failed to send Key value.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37705/try-to-integrate-mult-touch-and-keyboard-functionalities-in-a-single-program-but-it-only-can-send-mult-touch-information-normally-failed-to-send-key-value</link><description>I try to integrate Mult-touch(touch screen) and Keyboard feature in a single program, when I run this program, the phone side(Android8.0 based) can only receive Mult-touch information, it always can&amp;#39;t get the key value at all. 
 
 my question is: 
 -</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Aug 2018 01:38:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37705/try-to-integrate-mult-touch-and-keyboard-functionalities-in-a-single-program-but-it-only-can-send-mult-touch-information-normally-failed-to-send-key-value" /><item><title>RE: try to integrate Mult-touch and Keyboard functionalities in a single program, but it only can send Mult-touch information normally, failed to send Key value.</title><link>https://devzone.nordicsemi.com/thread/145591?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 01:38:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d9dba3a-b710-4c2e-b3a9-0f78e59e39de</guid><dc:creator>huangqiang2007</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your timely feedback.&amp;nbsp; As your verification, I guess it exists some fault to support both keyboard and digitizer simultaneously based on Android7.1.1 . I will perchase&amp;nbsp; a bluetooth adapter for testing my program on ubuntu or windows.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks a lot,&lt;/p&gt;
&lt;p&gt;QiangHuang&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: try to integrate Mult-touch and Keyboard functionalities in a single program, but it only can send Mult-touch information normally, failed to send Key value.</title><link>https://devzone.nordicsemi.com/thread/145494?ContentTypeID=1</link><pubDate>Thu, 23 Aug 2018 11:40:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:262c061a-f721-4a16-85bc-d4e1f18b6e85</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I added your descriptor to the ble_app_hids_keyboard example in SDK v12.2, and I see similar behavior.&lt;/p&gt;
&lt;p&gt;If I add the digitizer descriptor, the keyboard refuses to work properly on android (7.1.1). Changing the descriptor to something else, like consumer controls (vol up/down, power, etc), then the keyboard works just fine.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Testing it in linux (ubuntu 18.04.1), both keyboard and digitizer work as expected.&lt;/p&gt;
&lt;p&gt;Could you try your implementation in linux or windows 8/10, to see if it works in these OSes?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: try to integrate Mult-touch and Keyboard functionalities in a single program, but it only can send Mult-touch information normally, failed to send Key value.</title><link>https://devzone.nordicsemi.com/thread/145439?ContentTypeID=1</link><pubDate>Thu, 23 Aug 2018 08:22:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50592b5f-c597-419a-868b-2be495bad25b</guid><dc:creator>huangqiang2007</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;please ignore the identical repeated reply due to my network issue.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;QiangHuang&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: try to integrate Mult-touch and Keyboard functionalities in a single program, but it only can send Mult-touch information normally, failed to send Key value.</title><link>https://devzone.nordicsemi.com/thread/145422?ContentTypeID=1</link><pubDate>Thu, 23 Aug 2018 07:41:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e1e0c30-4e59-4789-9ceb-54a064c8eb69</guid><dc:creator>huangqiang2007</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Actually&amp;nbsp;I have tried to set&amp;nbsp;hids_init_obj.is_kbd to true and kept appearance as&amp;nbsp;&amp;nbsp;BLE_APPEARANCE_HID_KEYBOARD, but it still failed to send key value and can send touch value&amp;nbsp;normally.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regatds,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;QiangHuang&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: try to integrate Mult-touch and Keyboard functionalities in a single program, but it only can send Mult-touch information normally, failed to send Key value.</title><link>https://devzone.nordicsemi.com/thread/145421?ContentTypeID=1</link><pubDate>Thu, 23 Aug 2018 07:38:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03f33182-388f-417f-9d45-742ad15106c8</guid><dc:creator>huangqiang2007</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Actually&amp;nbsp;I have tried to set&amp;nbsp;hids_init_obj.is_kbd to true and kept appearance as&amp;nbsp;&amp;nbsp;BLE_APPEARANCE_HID_KEYBOARD, but it still failed to send key value and can send touch value&amp;nbsp;normally.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regatds,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;QiangHuang&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: try to integrate Mult-touch and Keyboard functionalities in a single program, but it only can send Mult-touch information normally, failed to send Key value.</title><link>https://devzone.nordicsemi.com/thread/145420?ContentTypeID=1</link><pubDate>Thu, 23 Aug 2018 07:37:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcfd29cb-5642-4f56-af76-17d4377f5b35</guid><dc:creator>huangqiang2007</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Actually&amp;nbsp;I have tried to set&amp;nbsp;hids_init_obj.is_kbd to true and kept appearance as&amp;nbsp;&amp;nbsp;BLE_APPEARANCE_HID_KEYBOARD, but it still failed to send key value and can send touch value&amp;nbsp;normally.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regatds,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;QiangHuang&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: try to integrate Mult-touch and Keyboard functionalities in a single program, but it only can send Mult-touch information normally, failed to send Key value.</title><link>https://devzone.nordicsemi.com/thread/145409?ContentTypeID=1</link><pubDate>Thu, 23 Aug 2018 06:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82cc8191-1d8d-487f-8866-2b266e77e1db</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if &amp;quot;hids_init_obj.is_kbd&amp;quot; is not set true, the ble_hids library does not populate the boot characteristics (or the protocol mode characteristic). Could you try setting this to true and see if this has any effect?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: try to integrate Mult-touch and Keyboard functionalities in a single program, but it only can send Mult-touch information normally, failed to send Key value.</title><link>https://devzone.nordicsemi.com/thread/145390?ContentTypeID=1</link><pubDate>Thu, 23 Aug 2018 01:25:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45ff38e5-00df-4e20-bc8a-c0b9e7ce6af3</guid><dc:creator>huangqiang2007</dc:creator><description>&lt;p&gt;Hi Hakon Alseth,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I confirmed that the INPUT_REPORT_KEYS_INDEX is 1. Actually I have configured input and output report in hids_init( ) as follows:&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;ble_hids_inp_rep_init_t input_report_array[2];&lt;br /&gt;ble_hids_outp_rep_init_t output_report_array[1];&lt;/p&gt;
&lt;p&gt;p_input_report = &amp;amp;input_report_array[INPUT_REP_TOUCH_INDEX];&lt;br /&gt; p_input_report-&amp;gt;max_len = INPUT_REP_TOUCH_LEN;&lt;br /&gt; p_input_report-&amp;gt;rep_ref.report_id = INPUT_REP_TOUCH_ID;&lt;br /&gt; p_input_report-&amp;gt;rep_ref.report_type = BLE_HIDS_REP_TYPE_INPUT;&lt;/p&gt;
&lt;p&gt;BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.cccd_write_perm);&lt;br /&gt; BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.read_perm);&lt;br /&gt; BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.write_perm);&lt;/p&gt;
&lt;p&gt;p_input_report = &amp;amp;input_report_array[&lt;span&gt;INPUT_REPORT_KEYS_INDEX&amp;nbsp;&lt;/span&gt;];&lt;br /&gt; p_input_report-&amp;gt;max_len = INPUT_REPORT_KEYS_MAX_LEN;&lt;br /&gt; p_input_report-&amp;gt;rep_ref.report_id = INPUT_REPORT_KEYS_ID;&lt;br /&gt; p_input_report-&amp;gt;rep_ref.report_type = BLE_HIDS_REP_TYPE_INPUT;&lt;/p&gt;
&lt;p&gt;BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.cccd_write_perm);&lt;br /&gt; BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.read_perm);&lt;br /&gt; BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.write_perm);&lt;/p&gt;
&lt;p&gt;p_output_report = &amp;amp;output_report_array[OUTPUT_REPORT_INDEX];&lt;br /&gt; p_output_report-&amp;gt;max_len = OUTPUT_REPORT_MAX_LEN;&lt;br /&gt; p_output_report-&amp;gt;rep_ref.report_id = OUTPUT_REP_REF_ID;&lt;br /&gt; p_output_report-&amp;gt;rep_ref.report_type = BLE_HIDS_REP_TYPE_OUTPUT;&lt;/p&gt;
&lt;p&gt;BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_output_report-&amp;gt;security_mode.read_perm);&lt;br /&gt; BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_output_report-&amp;gt;security_mode.write_perm);&lt;/p&gt;
&lt;p&gt;hid_info_flags = HID_INFO_FLAG_REMOTE_WAKE_MSK | HID_INFO_FLAG_NORMALLY_CONNECTABLE_MSK;&lt;/p&gt;
&lt;p&gt;memset(&amp;amp;hids_init_obj, 0, sizeof(hids_init_obj));&lt;/p&gt;
&lt;p&gt;hids_init_obj.evt_handler = on_hids_evt;&lt;br /&gt; hids_init_obj.error_handler = service_error_handler;&lt;br /&gt; hids_init_obj.is_kb = false;&lt;br /&gt; hids_init_obj.is_mouse = false;&lt;br /&gt; hids_init_obj.inp_rep_count = 2;&lt;br /&gt; hids_init_obj.p_inp_rep_array = input_report_array;&lt;br /&gt; hids_init_obj.outp_rep_count = 1;&lt;br /&gt; hids_init_obj.p_outp_rep_array = output_report_array;&lt;/p&gt;
&lt;p&gt;hids_init_obj.feature_rep_count = 0;&lt;br /&gt; hids_init_obj.p_feature_rep_array = NULL;&lt;/p&gt;
&lt;p&gt;hids_init_obj.rep_map.data_len = sizeof(report_map_data);&lt;br /&gt; hids_init_obj.rep_map.p_data = report_map_data;&lt;/p&gt;
&lt;p&gt;hids_init_obj.hid_information.bcd_hid = BASE_USB_HID_SPEC_VERSION;&lt;br /&gt; hids_init_obj.hid_information.b_country_code = 0;&lt;br /&gt; hids_init_obj.hid_information.flags = hid_info_flags;&lt;br /&gt; hids_init_obj.included_services_count = 0;&lt;br /&gt; hids_init_obj.p_included_services_array = NULL;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;some macro defines as follows:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;#define INPUT_REP_TOUCH_INDEX&amp;nbsp; 0&lt;br /&gt;#define INPUT_REP_TOUCH_LEN&amp;nbsp; &amp;nbsp; &amp;nbsp;13&lt;br /&gt;#define INPUT_REP_TOUCH_ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp;&lt;/p&gt;
&lt;p&gt;#define INPUT_REPORT_KEYS_INDEX&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/p&gt;
&lt;p&gt;#define&amp;nbsp;&lt;span&gt;OUTPUT_REPORT_MAX_LEN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;#define&amp;nbsp;&lt;span&gt;INPUT_REPORT_KEYS_ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define OUTPUT_REPORT_INDEX&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define OUTPUT_REPORT_MAX_LEN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define OUTPUT_REP_REF_ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In addition, I have set the appearance&amp;nbsp;to&amp;nbsp;BLE_APPEARANCE_GENERIC_HID. If I keep the appearance as&amp;nbsp;BLE_APPEARANCE_HID_KEYBOARD, it can&amp;#39;t send any information to phone side.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;QiangHuang&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: try to integrate Mult-touch and Keyboard functionalities in a single program, but it only can send Mult-touch information normally, failed to send Key value.</title><link>https://devzone.nordicsemi.com/thread/145330?ContentTypeID=1</link><pubDate>Wed, 22 Aug 2018 13:23:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd5ec49a-b359-4749-ba4e-82265c86563c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The function &amp;quot;send_key_scan_press_release&amp;quot; uses index INPUT_REPORT_KEYS_INDEX, which needs to be concise with your configuration (in your specific case; should be set to 1).&lt;/p&gt;
&lt;p&gt;An easier way to send keyboard data is to send it directly without using the added buffering logic in the example, for instance like this:&lt;br /&gt;// Send &amp;quot;hi&amp;quot;&lt;br /&gt;uint8_t temp_buf[INPUT_REPORT_KEYS_MAX_LEN] = {0x00, 0x00, 0xb, 0xc, 0x2c, 0x0, 0x0, 0x0};&lt;br /&gt;ble_hids_inp_rep_send(&amp;amp;m_hids, INPUT_REPORT_KEYS_INDEX, INPUT_REPORT_KEYS_MAX_LEN, (uint8_t*)temp_buf, m_conn_handle);&lt;br /&gt; &lt;br /&gt;Could you check your index values and report them here if it still does not work?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>