This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Address Filter not working

I have an NRF52 DK, and an IM21 door sensor that advertises events. I am trying to pick up these events with the nRF52DK in the most robust way possible. I have used the scanning library to implement an address filter to identify the IM21 events by the IM21 adress. My implementation is screenshotted below and I have verified that the address and address type are correct.

This code is in the scan_init() function:

I am verfying that the sensor is found through this print statement below, which isn't printing:

I also picked up the packets that are being advertised with the NRF Sniffer. The packet advertised is highlighted in this image below:

I welcome any ideas regarding where I may have gone wrong or missed something of importance.

Thank you very much, 

Maria

Parents
  • Okay, thank you for the update. Please check out the find_peer_addr() function in nrf_ble_scan.c and make sure that the address you're searching for is corresponding in length to BLE_GAP_ADDR_LEN. Are you also sure that you haven't enabled or are using any other filters that might interfere with the ADDR_FILTER. Here's a list of the possible filters:

    /**@defgroup NRF_BLE_SCAN_FILTER_MODE Filter modes
     * @{ */
    #define NRF_BLE_SCAN_NAME_FILTER       (0x01) /**< Filters the device name. */
    #define NRF_BLE_SCAN_ADDR_FILTER       (0x02) /**< Filters the device address. */
    #define NRF_BLE_SCAN_UUID_FILTER       (0x04) /**< Filters the UUID. */
    #define NRF_BLE_SCAN_APPEARANCE_FILTER (0x08) /**< Filters the appearance. */
    #define NRF_BLE_SCAN_SHORT_NAME_FILTER (0x10) /**< Filters the device short name. */
    #define NRF_BLE_SCAN_ALL_FILTER        (0x1F) /**< Uses the combination of all filters. */
    /* @} */

Reply
  • Okay, thank you for the update. Please check out the find_peer_addr() function in nrf_ble_scan.c and make sure that the address you're searching for is corresponding in length to BLE_GAP_ADDR_LEN. Are you also sure that you haven't enabled or are using any other filters that might interfere with the ADDR_FILTER. Here's a list of the possible filters:

    /**@defgroup NRF_BLE_SCAN_FILTER_MODE Filter modes
     * @{ */
    #define NRF_BLE_SCAN_NAME_FILTER       (0x01) /**< Filters the device name. */
    #define NRF_BLE_SCAN_ADDR_FILTER       (0x02) /**< Filters the device address. */
    #define NRF_BLE_SCAN_UUID_FILTER       (0x04) /**< Filters the UUID. */
    #define NRF_BLE_SCAN_APPEARANCE_FILTER (0x08) /**< Filters the appearance. */
    #define NRF_BLE_SCAN_SHORT_NAME_FILTER (0x10) /**< Filters the device short name. */
    #define NRF_BLE_SCAN_ALL_FILTER        (0x1F) /**< Uses the combination of all filters. */
    /* @} */

Children
Related