Enable and disable profile in runtime

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
5 posts / 0 new
Last post
Sparta
Offline
Last seen:1 year 1 month ago
Joined:2016-03-14 14:22
Enable and disable profile in runtime

Hello Dialog experts. I need to enable (create app) and disable (destroy app) profile in runtime. For example I want to use or not to use BASS profile in run time depend on some reason.
Is that possible to do?
Thanks in advance.

Device:
MT_dialog
Offline
Last seen:3 months 3 days ago
Staff
Joined:2015-06-08 11:34
Hi Sparta,

Hi Sparta,

As far as i am aware there is the attmdb_destroy() that will destroy all the databases created but its only for debugging purposes therefore not tested, so its not recommended for usage. If you are interested in something similar, there is the functionallity to hide a service, please have a look at this posthttps://support.dialog-semiconductor.com/disabling-hiding-service.

Thanks MT_dialog

Sparta
Offline
Last seen:1 year 1 month ago
Joined:2016-03-14 14:22
How about read/write custom

读/写自定义特征cus怎么样tom profile. I need to know for exmple that on app there is read event and know what app want to read. How can I do that?

MT_dialog
Offline
Last seen:3 months 3 days ago
Staff
Joined:2015-06-08 11:34
Hi Sparta,

Hi Sparta,

I 've explained in your other post (herehttps://support.dialog-semiconductor.com/gattcreadcmdind-da14580) how you can get indications on your application when a central reads your database, as far as writes is concerned the example that you should have a look at is the ble_app_peripheral, the write events for the custom service are reported to your application through the user_catch_rest_hndl() function in the user_peripheral.c file. For example try to write the control point characteristic from a central, that will trigger the user_catch_rest_hndl() function and depending on the characteristic written the proper function will execute though the switch case structure. Please check the UM-B-050 Software Developer.pdf for more details.

Thanks MT_dialog

Sparta
Offline
Last seen:1 year 1 month ago
Joined:2016-03-14 14:22
Thanks MT_dialog. Very

Thanks MT_dialog. Very helpful.