Hi, I need to use nrf52832 as HID keyboard and send function keys F1-F9 to computer. I have tired to run HID keyboard example in nrf5 SDK. How do I send function keys instead of ASCII codes of the letters? Thanks
Hi, I need to use nrf52832 as HID keyboard and send function keys F1-F9 to computer. I have tired to run HID keyboard example in nrf5 SDK. How do I send function keys instead of ASCII codes of the letters? Thanks
Hi,
Please see this document, page 55, for the usage table you're interested in:
https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
In order to send a given data stream, you can create a function similar to this one:
https://github.com/Rallare/nrf51_ble_app_hids_kbd_consumercontrol/blob/master/main.c#L1058
Kind regards,
Håkon
Hello Hakon,
Do you have any example that works on nRF52 development board? The Example you linked seems to be for nRF51 board.
Is there any document to explain how report_map_data is determined?
Also where are the values for each control action from? I couldn't find them in the USB document.
| typedef enum | |
| { | |
| RELEASE_KEY = 0x00, | |
| CONSUMER_CTRL_PLAY = 0x01, | |
| CONSUMER_CTRL_ALCCC = 0x02, | |
| CONSUMER_CTRL_SCAN_NEXT_TRACK = 0x04, | |
| CONSUMER_CTRL_SCAN_PREV_TRACK = 0x08, | |
| CONSUMER_CTRL_VOL_DW = 0x10, | |
| CONSUMER_CTRL_VOL_UP = 0x20, | |
| CONSUMER_CTRL_AC_FORWARD = 0x40, | |
| CONSUMER_CTRL_AC_BACK = 0x80, | |
| } consumer_control_t; |
Thanks
Hello Hakon,
Do you have any example that works on nRF52 development board? The Example you linked seems to be for nRF51 board.
Is there any document to explain how report_map_data is determined?
Also where are the values for each control action from? I couldn't find them in the USB document.
| typedef enum | |
| { | |
| RELEASE_KEY = 0x00, | |
| CONSUMER_CTRL_PLAY = 0x01, | |
| CONSUMER_CTRL_ALCCC = 0x02, | |
| CONSUMER_CTRL_SCAN_NEXT_TRACK = 0x04, | |
| CONSUMER_CTRL_SCAN_PREV_TRACK = 0x08, | |
| CONSUMER_CTRL_VOL_DW = 0x10, | |
| CONSUMER_CTRL_VOL_UP = 0x20, | |
| CONSUMER_CTRL_AC_FORWARD = 0x40, | |
| CONSUMER_CTRL_AC_BACK = 0x80, | |
| } consumer_control_t; |
Thanks
Hi,
xhr0428 said:Is there any document to explain how report_map_data is determined?
In BLE HID over GATT, the transport layer is closely coupled with USB HID. If you want to know more, I would recommend reading up on "usb descriptors" in general, on sites like "usb made simple" or "usb in a nutshell".
If you look at a USB descriptor, they have a usage, and that usage can be looked up in the previously linked document.
Kind regards,
Håkon