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.

Query about connection intervals

Other Parts Discussed in Thread: CC2540

Hi guys,

I would like to learn more about what happens during a connection interval.

Some background information. My CC2540 has 2 main tasks. It reads 18 bytes of data from sensors every 50ms and sends a notification, and it reads the ADC every minute and sends a notification. So, my main problem is what to set the connection interval to so as to minimize power consumption? I suppose I can calculate this from the questions below:

1. How many notifications can be sent out per connection interval? 

2. Can I perform a normal read/write attribute together with a notification in the same connection interval?

3. Am I right to say that the GAPRole_SendUpdateParam( uint16 connInterval, uint16 latency, uint16 connTimeout, uint8 handleFailure); function is used to dynamically change the connection interval by the peripheral? What am I supposed to put into the handleFailure parameter?

  • Hi rswl88,

    1. This depends on their size, but from Peripheral to Central, the last notification will not have been acked on the link layer at the end of an interval, so it will take up space in the buffer. So, three max-size notifications can be sent each time.

    2. No, because only one GATT subprocedure can take place at once. i.e. ones that need a response like Read/Write occupy one whole event.

    3. Yes. For handleFailure, choose between (from peripheral.h)

    #define GAPROLE_NO_ACTION 0 // Take no action upon unsuccessful parameter updates
    #define GAPROLE_RESEND_PARAM_UPDATE 1 // Continue to resend request until successful update
    #define GAPROLE_TERMINATE_LINK 2 // Terminate link upon unsuccessful parameter updates

    Best regards,
    Aslak 

  • Thanks for your help!