Is a custom HID gamepad possible WITHOUT bluetooth?

I want to build an HID gamepad on the nRF52840, but I don't want it to be a bluetooth HID device, I want it to be a USB HID device.

Is there a template for this? I saw the 'USBD_HID_Generic' example, however, I cannot find a place to put a report descriptor, and the documentation on this example, and the HID class as a whole is severely lacking in documentation.

Is this even possible?

Parents
  • Hi 

    This is possible, yes. 

    Which SDK do you want to use? 

    Best regards
    Torbjørn

  • Hi

    In the nRF5 SDK the HID descriptors are a bit tricky to find, this is true. 

    The example consists of a keyboard and a mouse class, and the easiest way to implement your own device (like a gamepad) is probably to copy and modify one of these. 

    For the keyboard class you can find the USB descriptor inthe app_usbd_hid_kbd_desc.h file, found in the following SDK folder:
    \nRF5_SDK_17.1.0_ddde560\components\libraries\usbd\class\hid\kbd

    The best would be to copy and rename all the files in the kbd subfolder, then you can change them at will without having to modify the original SDK files. 

    As another option, have you considered migrating to the new nRF Connect SDK instead?
    This is our main software platform moving forward, and while it presents a pretty significant learning curve when moving from the nRF5 SDK, it also brings a lot of useful features and improvements. 
    The HID example in particular is quite a bit easier to get started with, and the HID report descriptor is defined in the main file directly (shown here).

    Best regards
    Torbjørn 

Reply
  • Hi

    In the nRF5 SDK the HID descriptors are a bit tricky to find, this is true. 

    The example consists of a keyboard and a mouse class, and the easiest way to implement your own device (like a gamepad) is probably to copy and modify one of these. 

    For the keyboard class you can find the USB descriptor inthe app_usbd_hid_kbd_desc.h file, found in the following SDK folder:
    \nRF5_SDK_17.1.0_ddde560\components\libraries\usbd\class\hid\kbd

    The best would be to copy and rename all the files in the kbd subfolder, then you can change them at will without having to modify the original SDK files. 

    As another option, have you considered migrating to the new nRF Connect SDK instead?
    This is our main software platform moving forward, and while it presents a pretty significant learning curve when moving from the nRF5 SDK, it also brings a lot of useful features and improvements. 
    The HID example in particular is quite a bit easier to get started with, and the HID report descriptor is defined in the main file directly (shown here).

    Best regards
    Torbjørn 

Children
No Data
Related