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

is the is_uuid_present function correct?

I used the example of the ble_central\ble_app_uart_c and ble_peripheral\ble_app_uart. It seems no problem for operation when I check only this example. But I modified this example for using "BONDING ENABLE" and then I checked this routine, it has any problem.

In on_ble_evt function, if "is_uuid_present" is true, the routine will process sd_ble_gap_connect() and then it will be connected. But the "is_uuid_present" function is always false.

I checked the value, please refer to below log. extracted_uuid.uuid(0x08)p_target_uuid->uuid(0x1) err_code(5) extracted_uuid.type(0x01)p_target_uuid->type(0x2) The extracted uuid and type is diffirent from p_target_uuid.

Even though I checked the original ble_central\ble_app_uart_c and ble_peripheral\ble_app_uart. This also is everytime false like blow log. extracted_uuid.uuid(0xffff)p_target_uuid->uuid(0x1) err_code(37429) extracted_uuid.type(0xff)p_target_uuid->type(0x2) But actually this example doesn't cafe of the result, it can be get the BLE_GAP_EVT_CONNECTED signal.

Could you check this problem? and could let me know how I can solve this problem?

  • sd_ble_gap_connect() is only called if is_uuid_present() is true, so it has to be true sometime. It works fine here with the original examples. What function returns the error? It is strange that you receive uuid 0x0008 and type 0x01. Maybe you can check the content of the advertising packet with for example Master Control Panel? What do you mean by "BONDING ENABLE"?

Related