This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Show some services after BLE connection

Hi,

I would like to resume the discussion made a few days ago in this post.

Is it possible to hide some BLE services until the connection is successful?
I want only my app to see all services. So, after the connection sequence suggested in the previous post, I want to make hidden services visible. it's possible to do it?
Thank you.

Parents
  • Hi Sergi, 

    Yes, it's possible to add more services/characteristics in run time. You can take a look here.

    But as mentioned in the case, it's not possible to remove the service after you disconnect. You would need to re-initialize the softdevice to do that. So after a disconnection you need to go through the process to reset the softdevice before you advertise again. 

    In my opinion, it's easier that you just limit the functionality when the non-authorized app connected. For example you don't response to a write request. Or don't send the value in a read request. Then you don't need to reset the softdevice in your code. 

Reply
  • Hi Sergi, 

    Yes, it's possible to add more services/characteristics in run time. You can take a look here.

    But as mentioned in the case, it's not possible to remove the service after you disconnect. You would need to re-initialize the softdevice to do that. So after a disconnection you need to go through the process to reset the softdevice before you advertise again. 

    In my opinion, it's easier that you just limit the functionality when the non-authorized app connected. For example you don't response to a write request. Or don't send the value in a read request. Then you don't need to reset the softdevice in your code. 

Children
Related