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.

CCS/CC2640R2F: What does GAP_DeviceDiscoveryRequest do? Will collision happen when multiple centrals start discovery for the same peripheral?

Part Number: CC2640R2F

Tool/software: Code Composer Studio

Hi,

I am just trying to figure what does GAP_DeviceDiscoveryRequest do. In SDK, it leads to some icall_ble_api(some icall_directAPI) which hides the internal logic.

I don't need details, just want to figure out the sequence, I believe the start discovery process takes some time, right?

So if multiple centrals happen to discover the same peripheral, will collision happen? 

Maybe some central will miss many GAP_DEVICE_DISCOVERY_EVENT, in worst case, never get this discovery event. Correct me if I am wrong.

Please advise. Thanks a lot.

  • The peripheral will just send out scan response if it receives  scan request. It's very unlikely to have all central to send out connection request at the exact same time.

    Currently we have not seen any connection request collision.

    If you want to characterize the time, you can first enable LNA signal to IO_27 and then set IO_28 high right before you call the start discovery, then set the same  IO_28 low again when the program reaches discovery event. Then you should be able to see the overhead.

    For LNA routing 

        #include <driverlib/ioc.h>
        // Map RFC_GPO0 to DIO13
        IOCPortConfigureSet(IOID_13, IOC_PORT_RFC_GPO0,
                        IOC_IOMODE_NORMAL);
        // Map RFC_GPO1 to DIO7
        IOCPortConfigureSet(IOID_7, IOC_PORT_RFC_GPO3,
                        IOC_IOMODE_NORMAL);
    

  • Thanks a lot, Christin.
    One more simple question, is it necessary for central to send scan request, while peripheral is broadcasting non-connectable frames?
  • If the peripheral is a broadcaster then there is no need for central to send scan request.
    In this case, then central device can set to do passive scan.

    For more information, I would recommend you to take a look at SimpleLink Academy:
    dev.ti.com/.../ble_scan_adv_basic.html
  • Thanks a lot, Christin.
  • Hi, Christin,
    one more question, although central don't need to send scan request, seems like GAP_DeviceDiscoveryRequest is necessary for central? Why?
    It ends up with icall_directAPI to some BLE service.
  • That's the comment for starting the scan.