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: Setting GAP Parameters to Establish Link

Part Number: CC2640R2F

Hi team,

How do we optimize the follow parameters to reduce power as much as possible to use with GAPCentralRole_EstablishLink() when already knowing the peripheral that we need to connect to (no need to scan)?

GAP_SetParamValue(TGAP_CONN_SCAN_INT, DEFAULT_SCAN_INT);
GAP_SetParamValue(TGAP_CONN_SCAN_WIND, DEFAULT_SCAN_WIND);
GAP_SetParamValue(TGAP_CONN_HIGH_SCAN_INT, DEFAULT_SCAN_INT);
GAP_SetParamValue(TGAP_CONN_HIGH_SCAN_WIND, DEFAULT_SCAN_WIND);
GAP_SetParamValue(TGAP_CONN_EST_SCAN_INT, DEFAULT_SCAN_INT);
GAP_SetParamValue(TGAP_CONN_EST_SCAN_WIND, DEFAULT_SCAN_WIND);

Regards,

Akash

  • Hey Akash,

    Can you expand a bit on what you mean in this question?

    If they never need to receive scan response data, they should do passive scanning.

    You could point them to the section on Scanning in this simplelink academy:
    dev.ti.com/.../ble_scan_adv_basic.html

    However, there may be some confusion, some of those parameters are for defining scanning window when a connection has already been established for instance. More details into these can be found in this post: e2e.ti.com/.../555898

    It would be helpful to understand what they care about and what exactly the use case is, i.e. are they already connected to other devices and want to define the scanning intervals or no? Stuff like this.

    I do recommend that they review the Connection Establishment Timing Parameters like Alles says in the post above.
    "If you want more information regarding the recommendations checkout: 9.3.11 Connection Establishment Timing Parameters in Vol 3, Part C of the BLE Core Specifications."
  • Hi Evan,

    Thanks for the reply! Sorry if my original post was unclear, hopefully this is better.

    So, we are the central device and already know which device (peripheral) that we want to establish a connection with without having to scan. We are interested in reducing our power consumption and no having unnecessary scanning as we know the device we wish to connect with. How should we set the parameters in my original post to optimize for power?

    Regards,
    Akash Patel
  • Hi Akash,

    Usually you still do need to scan because you at the least have to check to see if the device is actually there in range (e.g. hasn't walked away or lost power etc). So you can't completely skip the scanning step. 

    When you say that you already know which peripheral you want to connect to, are you saying you know BD_ADDR of the device, or are you somehow identifying a device with a name or something? Can we assume there is no privacy being used? Are the devices already paired and bonded and you are talking about a reconnect, or is there no pairing happening? 

    Regards,

    Katie

  • Hi Katie,

    Katie Pier said:

    When you say that you already know which peripheral you want to connect to, are you saying you know BD_ADDR of the device, or are you somehow identifying a device with a name or something?

    We know the BD_ADDR of the device that we need to connect to and plan to use the whitelist.

    Katie Pier said:

    Are the devices already paired and bonded and you are talking about a reconnect, or is there no pairing happening?

    The devices will be pairing and bonding.

    Regards,

    Akash

  • Hi Akash,

    As Katie indicated, you can't just remove scanning entirely.

    That said, as I said in the first post, the scanning parameters that you've provided, EG TGAP_CONN_SCAN_INT etc are all scanning parameters that are used for scanning after a connection has been established. These are different from general scanning parameters such as TGAP_GEN_DISC_SCAN and TGAP_GEN_DISC_SCAN_INT etc.

    It seems like your customer is asking for the latter parameters is that correct? Or are they wanting to optimize scan parameters after a connection?

    That said, this is all highly dependent on the application and the customers use case. There are trade offs that need to be made, and I can't speak for them as to what they want. They need to make a decision on how they wish to set up these parameters. Lets say that they decide to have a very small scan window and long scan interval, this will be low power, but they won't be scanning nearly as much, so it will take the device potentially longer to connect to the target and could impact application performance/usability.

    If they chose to make the scan interval and scan window the same, they will be scanning continuously and will likely see the device they wish to connect to rapidly and connect faster, making the transition seem more fluent and seamless from the user's perspective, but this is at the cost of power. On the other hand, if the scan interval is larger than the scan window the device will duty-cycle scanning, which could save power.

    Even if the device is in the whitelist and you know what you want to connect to, you need to scan to find it. Scanning continuously will find it rather quickly. The customer will need to decide what is acceptable in terms of time to connect performance and weight that with power consumption.

    I highly suggest that they walk through the Scanning chapter of this SimpleLink Academy. It does a great job of helping users understand the parameters and visualize the tradeoffs.
    dev.ti.com/.../ble_scan_adv_basic.html