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
  • Hi Maria

    Due to the summer vacation period here in Norway we are short on staff and delayed replies must be expected. I'm sorry for any inconvenience this might cause.

    First off, have you double checked that the address you've set in the scan filter and on the advertising device is the same? Can you provide a snippet of code showing the main() loop of your application. Are you sure it starts scanning at all?

    Best regards,

    Simon

Reply
  • Hi Maria

    Due to the summer vacation period here in Norway we are short on staff and delayed replies must be expected. I'm sorry for any inconvenience this might cause.

    First off, have you double checked that the address you've set in the scan filter and on the advertising device is the same? Can you provide a snippet of code showing the main() loop of your application. Are you sure it starts scanning at all?

    Best regards,

    Simon

Children
  • To answer your two questions: I am sure the address set matches the advertising device and I am not sure it starts scanning at all. 

    In the time since posting this inquiry I have done some debugging, made some modifications, and the application is currently crashing at nrf_ble_scan_start(&m_scan),  which is returning 9. I do not know what an error code of 9 means. 

    I will re attach all the screenshots of my code in case I modified code that was screenshotted above. All these modifications were made to the ble_central/ble_app_uart_c example in the SDK version 17 with soft device 132.

    Declaration of advertising device address:

    Definition of m_scan_param for advanced initialization:

    My scan_init() function where I initialize the scanning module and set and enable the address filter. I have connection set to false as the advertising device is a beacon:

    My scan_start() function. The application is crashing at line 153 with the app checking the ret variable, which I printed and learned that it is 9. I do not know what 9 signifies.

    Here is my main function as you requested:

    Do you know when the engineers will be back from Vacation? I have been having issues with this module for two months now and it is due in two weeks. Thank you for helping me Slight smile

    Best,

    Maria

  • Hello,

    I have attached my code if it would help to take a look. I have adapted the ble_app_uart.c example from the ble_central examples folder.

    Thanks,

    Maria

Related