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.

CC2640R2F: Problem with BLE scanning

Part Number: CC2640R2F

Hi,


I’m working with CC2640R2F and simplelink_cc2640r2_sdk_4_20_00_04.

My project have a device with Central role and another device with Peripheral role.

So I started from the BLE simple_central example for the Central Device and BLE simple_peripheral example for the Peripheral Device.

Since my Peripheral device is battery powered, to save battery I set the following parameters:

// Advertising interval when device is discoverable (units of 625us)
#define DEFAULT_ADVERTISING_INTERVAL      1600 //1s

Instead in my Central Device I set the following parameters:

// Scan duration in units of 0.625 ms 
#define DEFAULT_SCAN_DURATION             10400 //6,500 s
// Scan interval in units of 0.625 ms
#define DEFAULT_SCAN_INTERVAL             3360 //2,100 s 
// Scan window in units of 0.625 ms
#define DEFAULT_SCAN_WINDOW               1680 //1,050 s

Why in these conditions is the peripheral almost never found?

Thanks Emanuela

  • Hi Emanuela,

    Thank you for reaching out.

    Here are a few reasons that may explain the issue. I'll provide leads to debug after:

    1. the advertisements are not properly sent
    2. the advertisements often suffer interference
    3. the advertisements are not sent when the scanner is scanning
    4. the advertisement is filtered out
    5. the scan list of the scanner is filled by other advertisements

    Here are leads to debug

    1. check with a smartphone whether the advertisements are found
    2. run the test in a less busy environment, try to keep the advertiser and scanner close
    3. you can enable the RF debug output (see here) on both boards to assess whether the advertisements are sent when the scanner is listening
    4. review the scanning filter enabled
    5. increase the list size + consider enabling filtering (e.g. RSSI-based filtering, or advertisement type-based filtering)

    I hope this will help,

    Keep us updated!

    Best regards,

  • Hi  Clément,

    Thank you for the fast answer!

    About your suggestions:

    • the advertisements are properly sent: the smartphone receives the advertisement correctly, every 1s
    • Increasing the list size from 8 to 16 increases the probability to find the Beacon, that is much better
    • I have a more reactive system with the same advertising interval and setting up the following scanning parameters:
    • // Scan duration in ms
      #define DEFAULT_SCAN_DURATION               200
      // Scan interval in units of 0.625 ms
      #define DEFAULT_SCAN_INTERVAL                96//58ms 
      // Scan window in units of 0.625 ms
      #define DEFAULT_SCAN_WINDOW                  94//60ms 
      
    • Can you send me please information about the RSSI-based filtering and advertisement type-based filtering?

      Thanks, Emanuela

  • Hi Emanuela,

    I am not totally sure which BLE stack (i.e. BLEStack or BLE5Stack) you are using.

    With the BLEStack, you can mainly filter duplicated scan reports (should be enable by default) - you can review TGAP_FILTER_ADV_REPORTS for details

    With BLE5Stack, you can refer to this piece of documentation.

    I hope this will help,

    Best regards,

  • Thank you Clément, 

    I'll try to improve the Central firmware using the parameters you suggested.

    Emanuela