This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Distingush whether connection request came from an App or not

Hi, I use NUS quite alot with the following condition;

(SDK 7.2 & S110 7.1 with IAR 7.1)

When the peripheral only uses NUS, iOS cannot detect the peripheral at the

"settings - Bluetooth" menu.

Whereas on Android, Galaxy 4 Android 5.0.1 / Nexus 5 Android 6.0.1 for example,

displays the device at the settings menu like this.

BLE display

Also, when I select "Nordic_NUS", the device pairs with the phone.

/******************************************/

What I want is that,

I only want to allow connection when the user requests a connection with an App.

For instance, there's the Master Control Panel (MCP).

MCP

I want the peripheral to maintain the connection when the central has connected the peripheral with the MCP.

Whereas if an user selects the peripheral from the "Settings - Bluetooth" menu, I want to reject the connection request.

Is this possible to distinguish whether the user has requested with the MCP or not?

Also I want to allow only the connection request from the MCP app.

For instance, I want to also reject connection request when the user uses a nRF Toolbox App.

To be sure, waiting for an certain NUS message after the connection can be one solution.

However, this is not a good solution if the message is discovered by others and it has many flaws.

I hope to see if there's a feature that I don't know.

Hope to hear your clairvoyant answers.

-Kind Regards, Mango

Related