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

Part Number: CC2640R2F

1. What is the default scan window and scan interval the following code is executed to connect to a sensor with a known BD address:

GAPCentralRole_EstablishLink(FALSE,FALSE, addrType, addr);

The reader is a single BLE connection application.

Is it 100% duty cycle at 10ms for both window and interval ?

which GAP parameters should I change to not use the default value ?

2. Does this API use the GAP_SetParamValue(TGAP_GEN_DISC_SCAN, DEFAULT_SCAN_DURATION); has any effect ?
#define DEFAULT_SCAN_DURATION 61000

what happens when the scan duration expires ? does it continuously scan for the advertiser's BD address ?

3. If the sensor's advertising interval is 60ms, and the reader wants to scan at 25% duty cycle, which scan window/interval option is better at capturing the advertising packets?

a. window = 30ms, interval = 120ms

b. window = 10ms, interval = 40ms

  • Hello Tony, 

    Can you provide us with the SDK version you are using? Additionally, are you using a custom board or a launch pad? We will look into the question and provide an answer as soon as possible. 

    Thanks, 

    Isaac

  • We're using SDK 1.50.0.58 for an older product and SDK 4.10.0.10 for a another one.

    We're using the simpleLinkCentral example as a baseline.

  • Hi Tony,

    1.) To understand how to change the Scan Interval and window please have a short look into our  Simplelink academy: Scanning and Advertising example. Here you can also find a detailed description on how to change the Scanning and advertising interval and window.

    2.) You set the scanning duration with this command also explained ins Simplelink academy and in our  API  documentation

    3.) There are always some trade off on time to discovery and energy consumption. I would again point out to Scanning and Advertising SLA.

    In general for getting fast discovery time I would recommend using a scanning window that is bigger than the advertising interval !! Which is the chase for both of your values. However, I would definetly not recommend   a) window = 30ms, interval = 120ms as with this configuration there is the probability that not meet for several intervals.

  • I have looked at the  Simplelink academy: Scanning and Advertising example. 

    Some follow up questions:

    1. In using this api GAPCentralRole_EstablishLink(FALSE,FALSE, addrType, addr);

    it's unclear to me which gap parameter is used in scan window parameter for this API - TGAP_CONN_SCAN_WIND or  TGAP_CONN_EST_SCAN_WIND.

    If it is TGAP_CONN_SCAN_WIND TGAP_CONN_SCAN_INT , then the code and data sheet indicates 16*0.625 = 10ms and the duty cycle is 100%.

    Is that correct ?

    2. From your earlier reply: In general for getting fast discovery time I would recommend using a scanning window that is bigger than the advertising interval !! 

    Do you mean the scan window is smaller than the scan interval ? otherwise, it will be over 100% duty cycle which doesn't make sense.

    Based on your answer, a shorter window and interval is preferred , then what would be the minimum window that one can choose ? 

    Since the sensor takes about 1.5 ms sec to send to all 3 advertising channels, I would think that the minimum shouldn't be less than 2 ms. 

    Is there any other limiting factor that needs to consider ?

    Tony

  • Hi Tony,

    to 1.)

    TGAP_CONN_SCAN_INT describes the scan interval when a connection has already been formed - and you're scanning for background information. You'll find that this is much larger than TGAP_CONN_EST_SCAN_INT

    TGAP_CONN_EST_SCAN_INT describes the scan interval when establishing a connection. Much faster than TGAP_CONN_SCAN_INT.

    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.

    to 2.) 

    NO !!!!

    The Scanning window should be bigger than the Advertisment interval, to have fast connection. Thus you ensure not to miss the advertisment window.

    For your use-case I would recommend using 70 ms Scanning Window with 210 ms scanning interval in the beginning. However, this is highly depending on what your requirements are. 

  • #1 answer is understood.

    #2 sorry, I misread your statement about advertising interval.

    I wanted to know the tradeoff of sampling frequency for a fixed duty cycle.

    The sensor only advertises for 2 sec every 2 minutes with advertising interval of 60ms. The reader power budget can only support a 25% duty cycle and can sacrifice connection speed if it can connect within 5 minutes.

    Under these constraints, what is the tradeoff if we increase the (window/interval) to 90/360 or decrease to 30/120 from your recommendation of 70/210 ?

  • Hi Tony,

    no problem.

    Changing to 90/360 would increase the worst case time to hit the interval  but this should not be an issue if I understand your explanation correctly.

    Changing the interval to to 30/120 is not recommended in your chase as in some chases the 60 ms interval in some chases might miss some Advertisement packages.

    if this is not an issue you can try it with our launchpads and Scanning Advertising example to see how the different configurations behave.

    Regards,

    Alex

  • thanks for your help.