I have developed two codes based on app_ble_uart for central and peripheral and added peer manager to it for link encryption. The peripheral device advertise based on SIG UUID and its name. Central device is supposed to filter for SIG UUID and Device Name, and if both match the expected value, it would perform connection and then pairing.
Peripheral device seems to work without problem.
For central device code, when I just filter for SIG UUID, it works fine, connect to peripheral and send and receive data through UART-BLE encrypted link. But when I filter for both SIG UUID and Device Name, by adding the following:
err_code = nrf_ble_scan_filter_set(&m_scan,SCAN_NAME_FILTER,m_target_periph_name);
APP_ERROR_CHECK(err_code);
I get this following error during debugging (at app_error_weak.c line 100 NRF_BREAKPOINT_COND):
<info> app_timer: RTC: initialized.
<error> app: ERROR 7 [NRF_ERROR_INVALID_PARAM] at \nRF5_SDK_17.0.2_d674dde\examples\My Projects\uart_central_wpmg_5\main.c:409
PC at: 0x00034765
<error> app: End of error report
When I comment out "APP_ERROR_CHECK(err_code);" part of the above code the issue is gone.
Can you advise what is the issue here?