HID keyboard volume up down without consumer control?

Hi guys. May I ask some questions for ble_app_hids_keyboard_pca10056_s113 project from 17.1.0 nRF5 SDK:

From this thread,  HID keyboard with volume control with SDK 12

and a nRF Github example,

https://github.com/Rallare/nrf51_ble_app_hids_kbd_consumercontrol/blob/master/main.c

It sounded you cannot send volume up 0x80 or volume down 0x81 when only using the original ble_app_hids_keyboard_pca10056_s113 example.

Is this true that you always have to use the consumer control data to send volume up or down? Why won't keyboard 0x80 and 0x81 not work?

I'm testing this using iPhone 13 and Galaxy S22.

Parents Reply Children
  • Hi,

     

    I took the stock ble_app_hids_keyboard sample, adjusted the descriptor per the linked case.

    I changed the array "m_sample_key_press_scan_str" to send "test" + volume_up (0x80) + return.

    This will then be sent one byte on each button press.

     

    This adjusted the volume on both Ubuntu 22.04 and Android 13 (OnePlus 8)

     

    On which platform did this not work on your end?

     

    Kind regards,

    Håkon

  • Hello Håkon. Here are my test results, only Android took volume up down 80 81:

    Android / Samsung Galaxy S10 v12: the volume key 80 81 works

    Macbook / macOS 13.2.1: volume key doesn't work

    iPad air 5th Gen/ iPadOS v16.1.1: volume key doesn't work

    Windows 10 laptop with Intel Bluetooth driver (LMP 12 / Bluetooth v5.3): volume key doesn't work

    Is it only Android and Ubuntu that can take keyboard volume up down 0x80 81?

    I was creating this keyboard example for Windows and MacBook. In this case, is Consumer Control the only way to control volumes?

    Thank you for your help!

  • Hi,

     

    Matthew K said:

    Hello Håkon. Here are my test results, only Android took volume up down 80 81:

    Android / Samsung Galaxy S10 v12: the volume key 80 81 works

    Macbook / macOS 13.2.1: volume key doesn't work

    iPad air 5th Gen/ iPadOS v16.1.1: volume key doesn't work

    Windows 10 laptop with Intel Bluetooth driver (LMP 12 / Bluetooth v5.3): volume key doesn't work

    Is it only Android and Ubuntu that can take keyboard volume up down 0x80 81?

    I was creating this keyboard example for Windows and MacBook. In this case, is Consumer Control the only way to control volumes?

    It highly depends on what the OS on the other side accepts.

    If you have a solution that works on your target platforms, I would recommend that you keep using that. You can ask on windows/mac specific forums on how to handle those specific commands when connecting over HID over GATT.

     

    Kind regards,

    Håkon

Related