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

nrf51822 send media key to android device

hey I have a nRF51822 eval board and I want to use it as hid keyboard to send some media key such as vol+/- play/pause, etc. I have used the example code ble_hid_keyboard and it works well to send characters but I don't know how to send these media keys. thanks

Parents
  • FormerMember
    0 FormerMember

    From what I can see in USB HID Usage Tables on p. 56, vol +/- and play/pause has the following commands:

    • Volume up: 0x80
    • Volume down: 0x81
    • Play/pause: seems to be described in chapter 3.4.4 "Alternate Types"

    Update 26.10.2016: This example on github shows how to transfer vol+/-, play/pause. The example is for an older SDK, but the HID part/HID coding will be the same with a newer SDK.

Reply
  • FormerMember
    0 FormerMember

    From what I can see in USB HID Usage Tables on p. 56, vol +/- and play/pause has the following commands:

    • Volume up: 0x80
    • Volume down: 0x81
    • Play/pause: seems to be described in chapter 3.4.4 "Alternate Types"

    Update 26.10.2016: This example on github shows how to transfer vol+/-, play/pause. The example is for an older SDK, but the HID part/HID coding will be the same with a newer SDK.

Children
Related