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

1 peripheral (nRF) 1 central (iOS or Android) but 2 concurrent apps

Following situation:

My device acts as central (connecting to ble sensors) and as peripheral (transmitting and receiving data from mobile). Several services (Heart Rate, Speed and Cadence...) are implemented to suit most apps on Android and iOS, but I need an additional application to handle notifications (transmitting from mobile to device). As far as I can see, I have no possibility to connect with 2 apps to one gatt server... any solutions to this problem?

I know it's not a nordic specific question...but maybe I'm missing the point. Is there a sweet solution for this setup? As I'm implementing device and app I'm not limited to one side, except that stock apps should still see a heart rate and speed/cadence service.

best regards, Michael

Parents
  • Hi Michael,

    I don't think you can share same server between apps.

    But may I ask why you need to have a separated app to handle notification, can't a background service of the same app do that ?

  • Hmm, then I don't really get it.

    What is the problem of 2 concurrent apps to access to your device ? There should be no problem for 2 apps to connect to one same device (problem was two apps sharing same gatt server).

    You can create your own Gatt server in your app and handle notification there. This has nothing to do with other apps that acts as client, Strava for example.

    Another option is you use your app as a client, the server is on your device, and then when you want to send data from the phone to the device, you can use write command/request.

Reply
  • Hmm, then I don't really get it.

    What is the problem of 2 concurrent apps to access to your device ? There should be no problem for 2 apps to connect to one same device (problem was two apps sharing same gatt server).

    You can create your own Gatt server in your app and handle notification there. This has nothing to do with other apps that acts as client, Strava for example.

    Another option is you use your app as a client, the server is on your device, and then when you want to send data from the phone to the device, you can use write command/request.

Children
No Data
Related