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

How i can restrict nrf52832 connecttion with the custom mobile application only?

Hello, 

I am working on nRF52832 having SDK 15.3.0, Windows 10 and Segger Studio IDE.

My query is, i want to restrict my nRF board connection to a particular custom application developed by us.

It should get connect to other application like nRF Connect,but within 30 seconds it should get disconnect.

Is it possible?

If yes, kindly guide me, how can i implement it?

Parents Reply
  • But, from your OP, it sounded like you wanted to restrict your nRF to connect to only one app - not to restrict is to a particular user?

    Yes, I dont want to restrict it to a particular user.

    I just want my product to get connect with the application developed by us.if user tries to connect with any other app, then it should get connect but within 30 seconds it will disconnects.So that the BLE services developed by us won't be visible to others.

    Mainly we want to restrict others to do reverse engineering. 

Children
  • Not sure how well that's going to work - since the whole point of GATT is exactly that it's a standard protocol for discovering the Services of a Peripheral...

  • Agreed (with awneil).

    In this case you can't prevent connection, but you can prevent access to data by using GATTs Read and Write Request with Authorization.

    In a custom service you can pass an "authorization token" to your device -  say a GUID that is pre-programmed into your device - in a custom characteristic. Any app connecting to your device should provide this token.

    The rest of your custom characteristics and services should be set to require read and write authorization. On handling the request you compare the token in the "authorization" characteristic and allow or deny the action accordingly.

Related