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

Dynamic notification change

Hi all

I am using a nRF52840 with SDK 15.3.0 and s140_nrf52_6.1.1 soft device.

My application is a multi-peripheral device that has a common service, each peripheral can have different characteristic read/write permissions for this service. There can be many centrals, each central has its own unique security-key. If a central wants to connect it first NFC taps passing its security-key and BDA to the peripheral, the peripheral responds by advertising with a whitelist containing the single BDA - this all works very well.

If a central has no read permission for a specific characteristic then notifications should be disabled, the multi-peripheral knows before advertising if notifications should be enabled or not.

Is there a way to change the notification bit in the CCCD for the peripheral before advertising bearing in mind there may already be one or more centrals connected to the common service. I have searched the docs and devZone and not found a way to do this. There are ways to update the CCCD when there is a connection handle, although the CCCD is not updated until the next connection - but not for updating before a connection.

Does anyone have any ideas?

Thanks.

Related