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: CC2640R2F central scan

Part Number: CC2640R2F


Tool/software:

Hello, I have a question.
I am currently using the CC2640R2F central example, and the target I am trying to connect is a device based on the CC2640R2F peripheral.

This is the scan structure of the Bluetooth peripheral.


static uint8 advertData[32] =
{
8, // length of this data
GAP_ADTYPE_LOCAL_NAME_COMPLETE,
'G','F','M','-','4','0','0',
};

// Scan Response Data

static uint8_t scanRspData[] =
{
0x02, // length of this data
GAP_ADTYPE_FLAGS,
GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED,

// 25 byte beacon advertisement data
// Preamble: Company ID - 0x000D for TI, refer to www.bluetooth.org/.../company-identifiers
// Data type: Beacon (0x02)
// Data length: 0x15
// UUID: 00000000-0000-0000-0000-000000000000 (null beacon)
// Major: 1 (0x0001)
// Minor: 1 (0x0001)
// Measured Power: -59 (0xc5)
0x15, // length of this data including the data type byte
GAP_ADTYPE_MANUFACTURER_SPECIFIC, // manufacturer specific adv data type
0x4c, // Company ID - Fixed --> 0x4c (IOS)
0x00, // Company ID - Fixed
0x02, // Data Type - Fixed
0x15, // Data Length - Fixed
0x00, // UUID - Variable based on different use cases/applications
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x01, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID 24
0x00, // UUID
0x00, // UUID
0x00, // UUID
};
The problem is that the central device is not scanning the peripheral devices. Is there a way to fix this?



  • Hello,

    Thank you for reaching out! There could a lot of reasons for this behavior, so I will need some information from you to be able to successfully pinpoint the issue.

    1. Are you able to see the peripheral advertising on different devices?
    2. Is the central scanning any devices in general?
    3. Is the central scanning actively or passively?
    4. Can you provide the scanning parameters?

    Please provide an answer to my questions and we'll hopefully solve this issue!

    Best regards,

    Tarek D

  • Hello, this is about the parameters and functions of the central device.
    
    1. Currently, various devices are being searched in the central device.
    
    2. The scanning device is using the launchpad.
    
    3. The scan is currently being manually scanned using the keys on the launchpad for testing.
    
    4. These are the scan parameter values.
    GapScan_setPhyParams(DEFAULT_SCAN_PHY, SCAN_TYPE_PASSIVE,
    SCAN_PARAM_DFLT_INTERVAL, SCAN_PARAM_DFLT_INTERVAL);
    
    // Filtering parameters
    uint16_t rptFields = SC_ADV_RPT_FIELDS;
    GapScan_setParam(SCAN_PARAM_RPT_FIELDS, &rptFields);
    
    uint8_t scanPhy = DEFAULT_SCAN_PHY;
    GapScan_setParam(SCAN_PARAM_PRIM_PHYS, &scanPhy);
    
    uint8_t dupFilter = SCAN_FLT_DUP_ENABLE;
    GapScan_setParam(SCAN_PARAM_FLT_DUP, &dupFilter);
    
    uint16_t pduFilter = SCAN_FLT_PDU_CONNECTABLE_ONLY | SCAN_FLT_PDU_COMPLETE_ONLY;
    GapScan_setParam(SCAN_PARAM_FLT_PDU_TYPE, &pduFilter);
  • Hello,

    Thank you for providing this information! I believe the issue is in your scan parameters. A BLE central cannot connect to a peripheral if it's scanning passively. I believe changing the scanning to active should solve your problem!

    Best Regards,

    Tarek D