This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE HID Mouse and BLE HID keyboard integration in the same program with nrf52 dk. Need urgent help

I have looked at few previous posts regarding integrating ble hid mouse and ble hid keyboard. But of no use, still stuck.

I have seen the following posts already

1) https://devzone.nordicsemi.com/f/nordic-q-a/37273/is-it-possible-to-integrate-bluetooth-hid-mouse-and-keyboard-functionality-in-a-single-program/143396#143396

2) https://devzone.nordicsemi.com/f/nordic-q-a/4408/mouse-keyboard-combo

3) https://devzone.nordicsemi.com/f/nordic-q-a/49980/how-to-combine-hid-keyboard-and-hid-mouse

I have changed the report_map_data as per the posts, also changed the INPUT_REPORT_COUNT, input_report_array and all. By making slight changes to the hids_init() function alone, I'm able to use ble keyboard and ble mouse individually but not simultaneously. I checked the hids_composite example, but it is complicated for me to understand. Then there is nrf ready smart remote, but source code for the same is not available online (gave a search already).

Then in one post it was said to create separate ble_hids_init_t variables for mouse and keyboard, I tried that. Then I'm getting some fatal error.

Any help will be highly appreciated. Cheers 

Parents
  • Hello,

     

    I checked the hids_composite example, but it is complicated for me to understand.

     Is there anything specific you don't understand about it? It would help if you could be more specific about the problems you encounter, like any error codes or debug messages would be appreciated.

  • Thank you for your time.

    1) I could understand ble hids keyboard and ble hids mouse example codes. But hids_composite seems to be entirely different from the former. Hence found it bit difficult to comprehend.

    2) Regarding the error that I get while integrating ble hid keyboard and ble hid mouse. I made changes to the hids_init() function as suggested in previous posts. While executing the code, execution goes by calling ble_hids_init() function which is at the end of hids_init(). Within the hids_init(), i had set hids_init_obj.is_kb = true and hids_init_obj.is_mouse = true. Then when the execution reaches ble_hids_init(), there is certain check if (p_hids_init->is_mouse) and (p_hids_init->is_kb), since both are true. It calls for boot_inp_rep_char_add() function twice. Based on your report_map_data(), only first time boot_inp_rep_char_add() executes properly for keyboard, second time when it executes for mouse, it gives FATAL ERROR. Since I don't have in depth knowledge of how all these work, I'm not able to resolve it.

    Is the above description sufficient. Should I furnish more details ?

Reply
  • Thank you for your time.

    1) I could understand ble hids keyboard and ble hids mouse example codes. But hids_composite seems to be entirely different from the former. Hence found it bit difficult to comprehend.

    2) Regarding the error that I get while integrating ble hid keyboard and ble hid mouse. I made changes to the hids_init() function as suggested in previous posts. While executing the code, execution goes by calling ble_hids_init() function which is at the end of hids_init(). Within the hids_init(), i had set hids_init_obj.is_kb = true and hids_init_obj.is_mouse = true. Then when the execution reaches ble_hids_init(), there is certain check if (p_hids_init->is_mouse) and (p_hids_init->is_kb), since both are true. It calls for boot_inp_rep_char_add() function twice. Based on your report_map_data(), only first time boot_inp_rep_char_add() executes properly for keyboard, second time when it executes for mouse, it gives FATAL ERROR. Since I don't have in depth knowledge of how all these work, I'm not able to resolve it.

    Is the above description sufficient. Should I furnish more details ?

Children
Related