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

Change Characteristics' Read/Write Permissions While Connected

Greetings, and thank you ahead of time to anyone willing to lend some advice.

I'm implementing application-layer security by requiring central devices to supply a user-configurable password. This is being done in order to maintain compatibility with a security scheme used to connect to the device through means other than BLE. Once a valid password has been supplied to the peripheral, certain characteristics will be changed from being completely inaccessible to read / write or from read-only to read / write, depending on the characteristic. I know this kind of functionality can be achieved through read / write authorization, however this would require that the security state be analyzed at each read / write event. What I wish to do is set the characteristics' read / write permissions to their appropriate levels at once when a valid password is supplied (similar to how they are assigned when initially adding the characteristics). However, I have so far been unable to determine a way to accomplish this. Is this behavior possible with the S110 soft device? If so, do you know how I can access the data structures that must be manipulated to accomplish this? Thanks!

EDIT: I forgot to mention that the connection between the peripheral and central cannot be broken while changing the read / write permissions.

Related