NUS service connect by MAC address

I am using nRF5 SDK v17.1.0.

Is it possible to connect a peripheral device by MAC address, and the device is advertising with a different UUID from the central device?

That is, the central device has NUS_C service enabled, and the UUID is different from the peripheral. The peripheral has a dynamic UUID, so that it is desirable to connect

with MAC address. The MAC address of the peripheral is known. 

I tested the connect by MAC address with NUS service enabled on the peripheral, but the central device can not find the peripheral. 

Connect by UUID works no problem when the peripheral uses a static UUID. 

The connection by MAC address code is as the following:

        err_code=nrf_ble_scan_filters_disable(&m_scan);
        APP_ERROR_CHECK(err_code);

        err_code=nrf_ble_scan_all_filter_remove(&m_scan);
        APP_ERROR_CHECK(err_code);


        err_code = nrf_ble_scan_copy_addr_to_sd_gap_addr(&m_mac_filter, target_mac_addr);
//        memcpy(&m_mac_filter.addr,target_mac_addr, 6);

        err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_ADDR_FILTER, &m_mac_filter);
        m_mac_filter.addr_type = BLE_GAP_ADDR_TYPE_RANDOM_STATIC;    
        
        err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_ADDR_FILTER, false);
        APP_ERROR_CHECK(err_code);

Related