Using two pairs for each of different purposes

I have two central devices and two peripheral devices each paired with two different services.

I wish each pair can connect only to each other and don't mix up the connection.

How can I make this?

I guess it's something to do with UUID. isn't it?

All devices are nRF52840 dongles so can't distinguish by device names.

  • Hi,

    Since you mention peripheral and central devices, I assume you use Bluetooth Low Energy.

    The device name is not the name of the physical hardware. Rather, it is something you can configure through CONFIG_BT_DEVICE_NAME. This is done in most peripheral samples in nRF Connect SDK, see for instance the peripheral uart example.

    When the peripheral uses a known name, you can use the Scanning module in the central, and use a filter for connecting to the device of that known name. This is what is done for most central examples in the nRF Connect SDK, see for instance the central uart example.

    Regards,
    Terje

Related