Hi everybody.
Now I trying to make BLE central device.
I'm using nrf52832.
SDK : 17.0.2
SoftDevice :S132 7.2.0
(I'm completely new at nrf52 product.)
In case of app_uart_c example, scanning is filtered by UUID to find peripheral device that example program written(ble_app_uart).
So now I'm trying to filtering by name.
Specifically...
I added
static char const m_target_periph_name[] = "Nordic_UART";
and instead of filtering by UUID, added in scan_init() function.
/* // Setting filters for scanning.(By UUID) err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_UUID_FILTER, &m_nus_uuid); APP_ERROR_CHECK(err_code); err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_UUID_FILTER, false); APP_ERROR_CHECK(err_code); */ // Setting filters for scanning.(By Name) err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name); APP_ERROR_CHECK(err_code); err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_NAME_FILTER, false); APP_ERROR_CHECK(err_code);
( I referred this post of the forum.
When I run the debugger, it break at NRF_BREAKPOIN_COND in app_error_weak.c.
then I continue, it keep at same line.
On the Debug Terminal, "app: Fatal error" is displayed.
I checked which line is causing this problem by debugger.
Then I found that it is jump to NRF_BREAKPOIN_COND after "APP_ERROR_CHECK()" of "nrf_ble_scan_filter_set()".
When I tried this example project without modification, It was working correctly.
then the Debug Terminal,"app: BLE UART central example started" was displayed.
Anybody can teach me why this problem is happening?
How can I solve it?
Thank you.