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

Hide Service until bonded

Hi guys, 

I have a peripheral device using a custom service based on the ble_nus, the intention is to hide the service and its characteristics until the bonded has been done. 

Using the security parameter in the char access i can disable any writing or reading from them 
 

add_char_params.write_access = SEC_MITM; 
add_char_params.read_access  = SEC_MITM;


But i would like to hide the full service until the bonding is correct. Is there any way of doing this? 

Similar way, in the central, i would like to avoid the discovery to start, unless the bonding has been done properly. 

I am using the s140 in a nrf52840, using examples from the SDK_15.3. Thank you in advance!

Parents
  • Not direct answer as I did not achieved this, but my suggestion for you is to initialize your service after you are done with rest of the work i.e. until then service will be not shown. I know you have to tell the other side (peer) to about the service change and there is a event which you can use to inform that your service table is changed.

    Just sharing my thoughts, if I get chance I will come back with more information.

    Thanks.

Reply
  • Not direct answer as I did not achieved this, but my suggestion for you is to initialize your service after you are done with rest of the work i.e. until then service will be not shown. I know you have to tell the other side (peer) to about the service change and there is a event which you can use to inform that your service table is changed.

    Just sharing my thoughts, if I get chance I will come back with more information.

    Thanks.

Children
No Data
Related