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

  • Hello,

    Apologies for being unclear; the scanning library recognizes all 6 bytes, I was just printing the first 3. When I print the full 6 bytes it matches the address of the iBeacon door sensor.

    I used the nrfSniffer firmware with the nrfConnect application to get the complete address and payload. You can see the full address in the image below under iSensor, and you can see the full payload below under ManufacturerSpecificData. Let me know if you have any more thoughts.

    Thanks,

    Maria

  • Hi

    Okay, sorry for the misunderstanding. Is there any reason that the address is flipped in your ble_gap_addr_t() function compared to what the iSensor is advertising as? In nRFConnect it seems to be backwards, where each byte is flipped. So if your central's filter is looking for the flipped address compared to what is actually advertised that might explain why it's not able to match the addresses.

    Best regards,

    Simon

  • Hello,

    The address was flipped as I read somewhere to input the address LSB first.  Regardless, I changed the ble_gap_addr_t() function to the below, and this had no effect on the output. The iSensor is still not being recongized by the application.

    Here are the relevant parts of the scan_evt_handler function:

    I am judging whether or not the scanner has picked up the iSensor by whether or not line 171 is printed.

    Thanks,

    Maria

  • What is the 

    NRF_BLE_SCAN_ADDRESS_CNT define set as in your central's sdk_config.h file? Just to makre sure, the issue is that the "Door Sensor Found" message is not printed as you say in your initial question, right? So the EVT_FILTER_MATCH event is not triggered for some reason even though the address filter should match.
    Best regards,
    Simon
  • Hello,

    NRF_BLE_SCAN_ADDRESS_CNT is set to 1 in my sdk_config.h file.

    To confirm, yes, the issue is that the EVT_FILTER_MATCH function is not being triggered for whatever reason.

    Thanks,

    Maria

Related