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

alert notification as master or periferal?

I'm currently working on alert notification service. Correct me in case I misunderstand it.

having nrf51822 as peripheral with AlertNotificationServie will impose to have the app (ios at the moment) always running.

In case nrf51822 is a master there is no problem with app to sit memory. for this I'll have to use S120.

Is the master the right way to do it?

Anyone having same thoughts?

Thank you

  • An iOS app can keep a connection to a Peripheral in the background, so there shouldn't be any reason to not have the iOS device as the Central.

    However, with the Alert Notification Service, it's most often the device that has the notifications (i.e. the phone) that would be the GATT Server, and the device accessing them (the device) would be the GATT Client. As explained here, this is however independent of the GAP role.

  • Thank you Ole for clarification.

    What I'm trying to understand is how the connection is established in this case:

    • the phone is Central and is GATT Server for alert notification;

    • the nrf51822 for example will be peripheral and GATT Client (for ANS) and GATT Server (for Proximity);

    The device will advertise, go thru bonding and is connected. Is it the right time now to connect to Phone and subscribe to ANS?

    Thank you

  • There is no additional connection; you just start a service discovery by using the GATT Client API of the softdevice. It's a good idea to wait until bonding is finished however, since you may see INSUFFICIENT_AUTHENTICATION if you do things before that. You can refer to the proximity application in the SDK for an example, since it includes a GATT Client for the (very simple) Immediate Alert service, or also the ANCS or ANS example applications.

Related