Making Separate BLE Mouse & Keyboard (each nRF52832) Appear as a Single BLE Device

Hi,

I am working on a project where I have two separate physical devices, each based on an nRF52832:

  • One device is a BLE Mouse
  • The other is a BLE Keyboard

My goal is to make both devices appear as a single HID device when connected to a host (PC, Mac, etc.). I understand that BLE HID normally supports composite devices, but in my case, the mouse and keyboard are separate hardware units.

I’ve considered two approaches:

  1. Using Gazell for communication between the peripherals and BLE for host connection:

    • The mouse and keyboard communicate wirelessly over Gazell instead of BLE.
    • One of them (e.g., the keyboard) also acts as a BLE peripheral and connects to the host.
    • The keyboard collects HID reports from the mouse via Gazell and forwards both mouse and keyboard reports to the host over BLE.
  2. Using the same Bluetooth Identity Address (BD_ADDR) and IRK:

    • Both devices share the same bonded connection details, appearing as a single device to the host.
    • This would require modifying the SoftDevice to share the same BD_ADDR and encryption keys.

I would like to know:

  • Is it possible to use a shared BD_ADDR and IRK on two nRF52832 devices to make them appear as one?
  • How to implement the second approach?
  • If that is too much of a complex task- then how to implement the first approach?

Thanks in advance for any insights!

  • Hi!

    My goal is to make both devices appear as a single HID device when connected to a host (PC, Mac, etc.).

    Could you explain why you have this goal?

  • Hello!

    Could you explain why you have this goal?

    The mouse and keyboard are going to get shipped together as a pair; this eliminates the need to pair the mouse and keyboard individually to the desktop.

    My goal is to make both devices appear as a single HID device when connected to a host (PC, Mac, etc.)

    Correcting my statement:
    My goal is to make both devices appear as a single Bluetooth device when connected to a host.

  • The Gazell solution seems to be the most sound one. Perhaps there are some examples on how to get Gazell to work with MPSL?

  • Have you considered using BLE multirole? one device will be peripheral only. The other device will be central and peripheral. In this way the BT stack will handle connections without conflicts. (more difficult when you combine gazell with BLE concurrent as their timing may collide)

    for HID, check also the nRF Desktop application. There is the code for the dongle and code for peripherals, all over BLE.  There should be all building blocks for what you need, but it needs some code adjustments for sure. Basically you need to combine the dongle with the peripheral. 

    See block diagrams
    https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf_desktop/README.html

  • That's great for an alternative!
    However upon testing we figured that latency becomes a bit of an issue- I've roughly explained the problem here.


    Theoretically Gazell would fix the latency issue between the keyboard and mouse if used correctly with the Multi Protocol Service Layer. 

    Also, if making Gazell work with MPSL is challenging, we're also willing to switch to an alternate protocol like ESB (Enhanced Shock Burst)

    Here are a few resources:
    https://github.com/inductivekickback/ncs_ble_esb_demo
    The github link demonstrates how ESB can be modified to work with MPSL. Perhaps this could also be done with Gazell?

    https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/updating-to-the-mpsl-timeslot-interface


    We'll also have a 'dongle' mode- so that would look something like this:



1 2