The NRF52840 can not filter by MAC Address other BLE devices that are from other manufacturers.

Hi all!

I am working in a BLE scanner but I have enabled the filter by MAC ADDRESS.  I can filter  beacons that are produced  based in NRF52 and NRF51. But when i try set a MAC ADDRESS of a SOC produced by other company  the filter no match.

wich could be the problem?

  • Hi eudaldo!

    That should not happen at all. May I ask how you set up the other company device? Are you certain it is advertising? Can you see it on your phone, for example, with the nRF Connect app?

    Best regards,


  • I store the MAC ADDRESS in array of char, I put them in reverse (LSB  --> MSB) attach an example:

    char target_device[][6] = {
    {0x96, 0xEA, 0x57, 0x6E, 0x91, 0xDF},
    {0x13, 0x48, 0x35, 0x79, 0xBE, 0xEB},
    {0x68, 0xDA, 0xFC, 0x71, 0x77, 0x60},
    {0xBF, 0x92, 0xD9, 0x70, 0xAF, 0xFD},
    {0x8C, 0x4B, 0x7A, 0xD6, 0xAB, 0xFE},
    {0x0E, 0x2B, 0xE6, 0x5A, 0xA8, 0xE7},
    {0xC3, 0x6B, 0xD2, 0x56, 0x79, 0xEB}

    I have try put the MAC ADDRESS in the normal form (MSB--->LSB), but it does not work.

    For set the filter I use the following code:

     //Setting filters for scanning.
        int rows =  sizeof (target_device) / 6;
        for (int t=0 ; t<rows; t++)
              char td[] = { target_device[t][0],target_device[t][1]  ,target_device[t][2]  ,target_device[t][3] ,target_device[t][4]  ,target_device[t][5]};
              err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_ADDR_FILTER, td);
         err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_ADDR_FILTER, false);

    I attach the devices that I want to scan:

  • Not sure I understood this correctly, but I don't see the addresses of the beacons in your filter list?

  • i do not place them, It is only a example of how I Set the ADDRESS filters. But, If I code the ADDRESS of the two beacons from the  images in the same formant, they does not work.

  • I just replicated your setup on my end, and it works just fine. I can see both my nRF52 DK and my headset, which most probably doesn't use a Nordic chip.

    One possibility is that the other devices are advertising with random addresses, which could change between when you recorded it into your filter code and when you run the test.

    If you force the advertising address of the nRF52 and nRF51 into one of the non-Nordic addresses you are expecting, does the filter work?

    If all fails, could you please get us a sniffer trace? We can try to see what is wrong.