Hi,
i want to use a current time service in nordic app (nRF Toolbox) for the bgm profile. I see, that when the cts service is not found, the micro reset. Why?
Someone, can please me give some information about that?
Thanks, Anna
Hi,
i want to use a current time service in nordic app (nRF Toolbox) for the bgm profile. I see, that when the cts service is not found, the micro reset. Why?
Someone, can please me give some information about that?
Thanks, Anna
Hi, the question now, is : What is the better moment to starts the db_discovery? Because in my example i use a peer manager ( in the example cts use a device manager). I understand that the problem of reset is: app send two times the event PM_EVT_CONN_SEC_SUCCEEDED, and so the code execute twice the ble_db_discovery_start(), the second time is busy and starts the reset::
@Ana: Do you know why you received the PM_EVT_CONN_SEC_SUCCEEDED event twice ?
I assume you received 2 times the PM_EVT_CONN_SEC_SUCCEEDED because the phone updated the encryption key (which is quite rare) . You can use the procedure flag pm_evt.params.conn_sec_succeeded.procedure to distinguish if it's the first encryption (PM_LINK_SECURED_PROCEDURE_BONDING) or it's the updated encryption (PM_LINK_SECURED_PROCEDURE_ENCRYPTION)
Or you can simply use your own flag to mark if it's the first time so you only do service discovery once. Or you can also just ignore the error code busy.