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.

RTOS/CC2640R2F: How to scan for both connectable and non connectable advertisements in BLE 5

Part Number: CC2640R2F

Tool/software: TI-RTOS

Hello guys,

I want to scan for both connectable and non connectable advertisements on my central device, and I see in the gap_scanner file and it says these are mutually exclusive events, any work around to be able to scan for both connectable and non connectable advertisements? 

Thank you

Harsha

  • Hi Harsha,
    I have assigned one of the experts to answer. Stay tuned
  • Hi Harsha,

    As you say, connectable and non connectable advertisements are mutually exclusive for one scanning duration. So you will have to implement alternations between scanning for the two. E.g.
    1) Set SCAN_PARAM_FLT_PDU_TYPE to connectable advertisements
    2) Start scanning for a fixed period of time (e.g. 500 ms)
    3) Disable scanning
    4) Set SCAN_PARAM_FLT_PDU_TYPE to non-connectable advertisements
    5) Start scanning for a fixed period of time (e.g. 500 ms)
    6) Disable scanning

    ...etc.
  • Hello Marie,

    Thank you for your response, I am looking at gap_scanner file, and the default configurations for the scanning are defined here, although when I am trying to change the parameters like SCAN_PARAM_DFLT_FLT_POLICY, SCAN_PARAM_DFLT_FLT_DISC, i dont see any change in the result, Am I configuring the parameters in the right file? because I dont see any of these configurations in the simpleCentral_init function.

    Any advice on this?

    Cheers,
    Harsha
  • Hi Harsha,

    You should use the GapScan_setParam() api to change the parameters at runtime.