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.

questions about cc2540 connection interval dynamically set

Other Parts Discussed in Thread: CC2540

i refer TI CC2540 keyfob demo to implement my anti-lost device project.

but as every one know, keyfob demo defaultly use MIN and MAX connection interval as 80 and 800.

before connecting with iPhone5,  the advertisement interval is 100ms.

and connecting with iPhone5, the advertisemnet interval change to 30ms.

and when connect with iPhone5 is complete, the interval remain 30ms

so the power comsumption is big

and how to update interval to 1S.

i try to use Gaprole_Setparameter, but it could  not act as i thought.

so i'd like to know 2 things:

1/ if i'd like to implement anti-lost device, which TI'source code could i refer? keyfob demo or simpleperipheral?

2/if i'd like to dynamically set interval, could you give me sample code to implement it?

Thanks.

  • Update process.

    i use following way, but every time parameter update, IOS will reject and disconnect with CC2540.

    So anybody can tell me why?thanks.

    #define DEFAULT_ENABLE_UPDATE_REQUEST         TRUE

    // Use limited discoverable mode to advertise for 30.72s, and then stop, or
    // use general discoverable mode to advertise indefinitely
    #define DEFAULT_DISCOVERABLE_MODE             GAP_ADTYPE_FLAGS_LIMITED
    //#define DEFAULT_DISCOVERABLE_MODE             GAP_ADTYPE_FLAGS_GENERAL

    // Minimum connection interval (units of 1.25ms, 80=100ms) if automatic parameter update request is enabled
    #define DEFAULT_DESIRED_MIN_CONN_INTERVAL     700

    // Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic parameter update request is enabled
    #define DEFAULT_DESIRED_MAX_CONN_INTERVAL     800

    // Slave latency to use if automatic parameter update request is enabled
    #define DEFAULT_DESIRED_SLAVE_LATENCY         0

    // Supervision timeout value (units of 10ms, 1000=10s) if automatic parameter update request is enabled
    #define DEFAULT_DESIRED_CONN_TIMEOUT          600

  • Hi Jun Feng Hu,

    The following post may help: http://e2e.ti.com/support/low_power_rf/f/538/p/167385/717343.aspx

    Although you seem to be following the guidelines correctly, the high values for min/max connection intervals may be an issue.

  • I dont know if this topic is still active but anyway maybe for the others. I had similar problem. But when I finally set the values according to the Apple guide it worked!

    https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf

    BLE is at page 17.

    Regards,

    Ondrej