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

Remove ble_dfu service after some time

I have a buttonless device using a DFU bootloader and ble_dfu buttonless DFU service with SDK v13.0.0. I'd like to make the ble_dfu service available for 5 minutes on power up and then disable it so it isn't advertised anymore. Is there a way to remove the service while running, or would it be easier to set a flag in GPREGRET and reset after 5 minutes?

Parents
  • Nordic SoftDevice and GATT Server inside seems to have fixed provisioning so once you enable certain GATTS handles they cannot be removed from the stack easily. One way is to perform SW reset (e.g. with GPREGRET flag to know that you should now boot Soft Device differently) or you can leave it there and just treat any attempt to use it differently then before (e.g. reject or ignore all Write/Reader commands/requests).

Reply
  • Nordic SoftDevice and GATT Server inside seems to have fixed provisioning so once you enable certain GATTS handles they cannot be removed from the stack easily. One way is to perform SW reset (e.g. with GPREGRET flag to know that you should now boot Soft Device differently) or you can leave it there and just treat any attempt to use it differently then before (e.g. reject or ignore all Write/Reader commands/requests).

Children
Related