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

Generic HID example

Is there an example somewhere to show how to use the "BLE_APPEARANCE_GENERIC_HID"  to transfer data over BLE to a another BT device such as a laptop ?

The HID mouse and HID keyboard examples works fine, but would like to know how to use the Generic HID device to transfer binary data.

Parents
  • I have the same question. I have a USB connected device that I would like to port to BLE.  At the present time I have bidirectional 8-bit communication. The USB characteristics are such that no inf or special driver is required. Just the built-in HID driver on all OS's. So to be able to do similar on BLE would be great. So, it's not a keyboard or mouse just an HID "thing". Super easy to write software on the PC for also.  Can  we make something like this in BLE?  I can provide more USB info if needed.

  • Hi Grant

    We don't have a dedicated example for this, but it should be relatively straight forward to modify one of the existing examples (like ble_apps_hid_keyboard) to use a generic HID descriptor. 

    The appearance is set in the gap_params_init() function, and the HID descriptor is configured in the hids_init() function. 

    Assuming you change the descriptor you would also need to change the functions for reading and writing HID data to match the new descriptor. 

    Best regards
    Torbjørn

Reply
  • Hi Grant

    We don't have a dedicated example for this, but it should be relatively straight forward to modify one of the existing examples (like ble_apps_hid_keyboard) to use a generic HID descriptor. 

    The appearance is set in the gap_params_init() function, and the HID descriptor is configured in the hids_init() function. 

    Assuming you change the descriptor you would also need to change the functions for reading and writing HID data to match the new descriptor. 

    Best regards
    Torbjørn

Children
Related