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

How to send arbitrary data using on_hid_rep_char_write()?

Hi,

I'm able to send arbitrary information to the host using generic HID descriptor (uses vendor defined page). There is no driver issue. I'm also able to connect to the bluetooth of host. But I'm not able to receive data from host. How do I change on_hid_rep_char_write() in order to receive data? 

In HID keyboard example, the OUTPUT_REPORT_BIT_MASK_CAPS_LOCK uses the default value in HID table. What if it was an arbitrary value? So instead of caps lock should I keep polling for a value from host (open source HID API) and then may be light an led? 

Please to not divert me to HID keyboard & mouse examples! I need some concrete advise/help beyond those examples.

Parents Reply
  • Hello,

    What SDK version do you use? I don't think it should matter, but I haven't tested this example on all versions.

    I know that some of the characteristics require pairing (Note that "pairing" is not the same as "connecting")

    If you get insufficient authentication, you are trying to write to the wrong characteristic. It should be the third one from the top under "Human Interface Device".

    However, to see most of the characteristics, you need to pair. Just press the small settings icon in the top right corner of "Nordic_Keyboard", and press "Pair...", and click "Pair"(blue button), then you should be able to use the rest of the characteristics. If you also tick of for "Perform bonding", it will store the pairing information, so that you don't need to do the pairing every time.

    Best regards,

    Edvin

Children
Related