This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF52-DK as CENTRAL not connecting to the device when using filters in ble_app_uart_c

Hello Nordic team! 

I had a post where I verified the answer by misclick: https://devzone.nordicsemi.com/f/nordic-q-a/83749/nrf52-dk-as-central-to-discover-services-on-peripheral

In resume: I'm working on a discovery service for a custom 128 UUID using the ble_app_uart_c example.

I'm adding the 128 UUID using sd_ble_uuid_vs_add() but the application is not finding this service, and I'm pretty sure I added the custom 128 UUID correctly.

Since the scan_init() is using SCAN_UUID_FILTER and NRF_BLE_SCAN_UUID_FILTER for the filters, I tried the following that worked for me in the past:

static char const m_target_periph_name[] = "M6"; 


//inside scan_init()

// Setting filters for scanning. This way we can find the M6.
err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_NAME_FILTER, false);
APP_ERROR_CHECK(err_code);

err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name);
APP_ERROR_CHECK(err_code);

Unfortunately, nrf_ble_scan_filter_set(), is generating an <error> app: Fatal error :( 

So:

1. if I add my custom 128 UUID which I'm pretty sure I did it correctly, it doesn't connect to any device, so discovery never happens

2. if I change the filters_enable and filter_set functions to look for the device name, it generates an error

How should I proceed from here? or what should I be looking at?

Thanks a lot in advance

Related