This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2340R5: Advertisement reports not generated for each scan window.

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi,

We are using the CC2340R5 EVK for our development. We have used the Basic BLE project as and have configured it for central role.

When we set a longer scan duration, we notice that the advertisement reports are not being generated for each scan interval.

For example, Scan interval is set to 1000ms, scan window is 500ms, scan period is 0 and scan duration is set to max(65535).

Using a power monitor tool we see that every 1 seconds(scan interval) the device wakes up for 500ms but we do not get the "BLEAPPUTIL_ADV_REPORT", The adv report event is received only for the first time.

I have subscribed for the event as shown below:

// Events handlers struct, contains the handlers and event masks
// of the application central role module
BLEAppUtil_EventHandler_t centralScanHandler =
{
    .handlerType    = BLEAPPUTIL_GAP_SCAN_TYPE,
    .pEventHandler  = Central_ScanEventHandler,
    .eventMask      = BLEAPPUTIL_SCAN_ENABLED |
                      BLEAPPUTIL_SCAN_DISABLED|
                      BLEAPPUTIL_SCAN_WND_ENDED|
                      BLEAPPUTIL_ADV_REPORT
};

in "Central_ScanEventHandler" we have added the BLEAPPUTIL_ADV_REPORT to the switch case as well.

Further more, we notice that the advertisement reports are only generated after restarting the scanning process.

For example, Scan interval is set to 990ms, scan window is 500ms, scan period is 0 and scan duration is set to 1000.

in the above case, after 1 second has elapsed we get a scan disabled event. After receiving the scan disabled event if we start the scan again by calling "BLEAppUtil_scanStart" we see the advertising report. In this case it is visible because the scanning has been restarted.

We wish to have a longer scan duration and receiving advertisement reports for each scan window.

Can you kindly help us resolve this?

  • Greetings,

    I have assigned this thread to an expert. They will reach out to you as soon as they can. Due to summer vacations, the responses may take longer. We thank you for your patience. 

    Best,

    Achyut Ray

  • Hi Sandeep,

    Thanks for reaching out.

    We need to first understand the terminology here.

    Scan interval is the scanning time between two successive channels. Scanning window is scanning time for single channel. And Scanning duration till when we need to Scan for. 

    According to Generic Access Profile (GAP) — SimpleLinkTm BLEAPPUTIL_SCAN_ENABLED indicates the start of scanning. After the scan has completed, a summary of discovered reports will be returned to the application with BLEAPPUTIL_SCAN_DISABLED.

    So instead of setting duration to 1000 you should try setting period for 1000. 
    Do let me know if this resolves your query.

    Regards,

    Megh 

  • Hi Megh,

    Sorry for the delay in response, We were busy with another query.

    I just tested the above changes suggested, The issue still persists.

    I will reiterate the issue.

    When scan window and scan interval are set, the expectation is to get ADV_REPORT for each scan window. Currently we see that the ADV_REPORTS are generated only for the first scan window and then no events are generated for the subsequent scan windows.

    Only upon restarting the scan process do we see the advertising reports.

    We wish to know if the above behavior is by design or if it is an issue. If it is an issue then how to resolve it.

    Thanks,

    Sandeep Singh

  • Greetings Sandeep,

    Could you please confirm/deny whether or not the duplicate filter is set under observer configurations in SysConfig for you project? If duplicate filter is enabled, you will only receive the advertising report you are interested in once per scan procedure. If it is indeed enabled, please try to remove the duplicate filter, run the test again, and let us know what the result is.

    Best,

    Achyut Ray

  • Hi Achyut,

    In my initial tests the DUP filter had been Enabled. 

    After disabling the duplicate filter, I am receiving all the advertising reports during the scan windows. 

    The report contains duplicate BD address appearing multiple times.

    I shall open a new ticket regarding the duplicate filter issue.