Hardcoded connection

What is the best strategy for connection between specific central and peripheral when both are powered up and then locking the connection so no more devices interfere?

  • Hi.

    Maybe you could elaborate a little bit on your usecase here?

    But after you connect to your preferred device, you don't have to start scanning for more devices. You can choose only to allow 1 connection. You can add your device to a whitelist etc.

    If you share some more information about your application or requirements, we can discuss further what could be the best way for you to solve this.

    Br,
    Joakim

  • Thank you, Joakim.

    Currently, we want to hardcore (in the firmware as configuration both in the peripheral and central devices) that peripheral P will connect only to Central C1, Central C2, and Central C3 (C2 and/or C3 may be not present in some cases). We do not want any interaction by the user (pressing the button, waiting for pairing), just when peripheral P and Central C1 are powered up, they establish a connection, and no more connections (except C2 and C3 if powered up) are allowed.

    I assume this is possible if the peripheral serves as a beacon, right? How to select (filter) data coming from a specific beacon then? Also assuring the "freshnes" of the data received from the beacon can be a challenge.

    Or do we need to switch the option - one Central device and three peripherals?

  • That should be possible.

    Could you share information about which SDK, device etc. you are working with here?

    Br,
    Joakim

  • I am using nRF5_SDK_17.0.2 and nRF52832. I tried the Zephyr framework, but there are some issues with the UART, and no problems so far with nRF5_SDK_17.0.2.

  • Thanks. 

    I would highly recommend using the nRF Connect SDK for new designs and development. 

    The nRF5 SDK is currently in maintenance mode (ref:  nRF Connect SDK and nRF5 SDK statement )

    If you have any trouble using the NCS, I would recommend that you open a new ticket explaining what you have problems with. We will do our best to assist you.

    _________

    What you describe should be achievable. You can add a scan filter so that your device only connects to certain devices that match the filter, either by name, address or UUID. 

    How to use filters is demonstrated in the samples in the SDK. You can also add your devices to the whitelist. There are several other configurations you can look at i.e defining the maximum number of connections that is allowed etc. 
    I would suggest that you take a look at the samples available in the SDK and use the documentation to explore the different options you have. 

    Br,
    Joakim

Related