nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need basic BLE Remote Control Device to control audio playback

I am very new to the Nordic line and I have an nRF5340-DK that I would like to build a basic BLE Remote Control project.  The Remote Control must pair with a phone or computer and control the audio playback controls.  I assume this is an HID type interface.

I am able to build and debug the "Hello World" application so I am mostly looking for a good BLE remote example app to start with as a base.

Parents
  • Assuming you are using VS Code and the nrf Connect SDK you can build application from sample. There are three/four samples that might be of use to you.

     

  • After looking at my list of options I do not get "peripheral_hids" but I do get keyboard which I will try.  Is this list filtered based on the target CPU?

  • Hi,

    No, it does not filter based on target CPU. If you start writing "hids" in the application template field you should get all the samples shown in 's picture:

    The reason you do not find peripheral_hids is probably because you are looking for samples under nrf/samples, while peripheral_hids is a Zephyr sample, so it is located under zephyr/samples.

    From your description the Peripheral HIDS keyboard sample is probably the best place to start. You want the remote control to be a peripheral. Additionally, for controlling audio you can use the HID profile with multimedia keys, sort of as a keyboard device: 

    0x07 0x00e8 0x00a4 KEY_PLAYPAUSE 3.0 0x0055 KEYCODE_MEDIA_PLAY_PAUSE
    0x07 0x00e9 0x00a6 KEY_STOPCD 3.0 0x0056 KEYCODE_MEDIA_STOP
    0x07 0x00ea 0x00a5 KEY_PREVIOUSSONG 3.0 0x0058 KEYCODE_MEDIA_PREVIOUS
    0x07 0x00eb 0x00a3 KEY_NEXTSONG 3.0 0x0057 KEYCODE_MEDIA_NEXT
    0x07 0x00ec 0x00a1 KEY_EJECTCD 3.0 0x0081 KEYCODE_MEDIA_EJECT
    0x07 0x00ed 0x0073 KEY_VOLUMEUP 1.6 0x0018 KEYCODE_VOLUME_UP
    0x07 0x00ee 0x0072 KEY_VOLUMEDOWN 1.6 0x0019 KEYCODE_VOLUME_DOWN
    0x07 0x00ef 0x0071 KEY_MUTE 3.0 0x00a4 KEYCODE_VOLUME_MUTE

    This table is from https://source.android.com/devices/input/keyboard-devices#hid-keyboard-and-keypad-page-0x07, so you can see there for more information.

    For more information about the Peripheral HIDS keyboard sample you can read the sample's documentation here: Peripheral HIDS keyboard.

    Best regards,

    Marte

  • Marte,

    I think you are right regarding the keyboard.  I tried the keyboard solution and quickly had a connectable device that would send a "hello" message to my phone.

    I tried the generic "peripheral_hids" and it seemed to build and flash to the Nordic but I did not see any devices advertising when I tried to pair with my phone.  I assume I would have to do more configuration of the project or possibly it is not easily going to work with the nRF5340 DK hardware.

    I will look at the multimedia keyboard features.

    Thanks for the help!

Reply
  • Marte,

    I think you are right regarding the keyboard.  I tried the keyboard solution and quickly had a connectable device that would send a "hello" message to my phone.

    I tried the generic "peripheral_hids" and it seemed to build and flash to the Nordic but I did not see any devices advertising when I tried to pair with my phone.  I assume I would have to do more configuration of the project or possibly it is not easily going to work with the nRF5340 DK hardware.

    I will look at the multimedia keyboard features.

    Thanks for the help!

Children
No Data
Related