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

USB custom (Vendor-Defined) HID device

Hi,

Is there a usb hidapi sample code for nrf52840 somewhere?

I know that there is a sample code of usbd_cdc_acm.
Using the HIDAPI library link below , It will be beneficial if the device is recognized as Vendor-Defined HID devices.
 It is no longer need a device driver.
 In addition, It is  not have to deal with changing port numbers.


http://www.signal11.us/oss/hidapi/

Parents
  • Hi edvin,

    Thank you for your response.

    with my product already, it can be realized with a driver's unnecessary with a microcomputer manufactured by another vendor.

    The Host OS standard driver will be installed automatically.

    Although the explanation may not be sufficient, it can be realized by describing the descriptor.
    Interface descriptor->bInterfaceClass 0x03(HID)
    Interface descriptor->bInterfaceSubClass 0 (none)
    ReportDescriptor->Usage Page 0x06, 0x00, 0xff, (Vendor Defined)
    ReportDescriptor->Usage Page0x09, 0x01, (Vendor Defined)

    I am assuming an application that creates a host PC application and uses nrf 52840 as a gateway.
    The host PC application communicates with hidapi.dll simply using 1OUT endpoint and 1IN endpoint.


    Best regards,

    junichiro

  • Hello Junichiro,

    I think I understand. So if your question is whether there are any examples that can show the use of the HIDAPI examples. I assume that you mean HID over BLE, is that correct?

    In that case I would recommend you to check out the ble_app_hids_ examples, so one of the following:

    SDK15.2.0\examples\ble_peripheral\ble_app_hids_keyboard

    SDK15.2.0\examples\ble_peripheral\ble_app_hids_mouse

    And change the HID service to match your application in hids_init() in main.c.

    Best regards,

    Edvin

Reply
  • Hello Junichiro,

    I think I understand. So if your question is whether there are any examples that can show the use of the HIDAPI examples. I assume that you mean HID over BLE, is that correct?

    In that case I would recommend you to check out the ble_app_hids_ examples, so one of the following:

    SDK15.2.0\examples\ble_peripheral\ble_app_hids_keyboard

    SDK15.2.0\examples\ble_peripheral\ble_app_hids_mouse

    And change the HID service to match your application in hids_init() in main.c.

    Best regards,

    Edvin

Children
No Data
Related