BLE Service Discovery Start log is printed twice even though it's called once

Hello there

In the project of the company I work for, we have a device working as a BLE central which connects to a nearby device and checks if that device is registered with our desiring Service. Hence we call the ble_db_discovery_start (ONLY ONCE). But when checking the logs in Debug mode I see that the log which indicates the Service Discovery Start is printed twice. I tracked the printed log and ended up with a variable named m_num_of_handlers_reg which all of a sudden comes to be 2 (ble_db_discovery.c file).

Can anyone tell me why this variable is suddenly 2 while there is only one handler registered and registered_handler_set function (which is the only function that increases the value of m_num_of_handlers_reg) is never called?

SDK version: 17.1.0

Softdevice version 6.1.1

Parents
  • Hi

    So you have only registered one handler with the discovery module? Have you seen where the registered_handler_set() function has been called from? As it generally has to be called from another function because the application thinks it needs to increase the number of handlers registered.

    Do you have any logs or information on the registered_handler_set() function in your application?

    It's also worth noting that SoftDevice v6.1.1 and SDK v17.1.0 are not tested with each other and it's recommended to move to SoftDevice v7.2.0 or 7.3.0.

    Best regards,

    Simon

Reply
  • Hi

    So you have only registered one handler with the discovery module? Have you seen where the registered_handler_set() function has been called from? As it generally has to be called from another function because the application thinks it needs to increase the number of handlers registered.

    Do you have any logs or information on the registered_handler_set() function in your application?

    It's also worth noting that SoftDevice v6.1.1 and SDK v17.1.0 are not tested with each other and it's recommended to move to SoftDevice v7.2.0 or 7.3.0.

    Best regards,

    Simon

Children
Related