10 Replies Latest reply on Feb 24, 2015 10:40 PM by ArvindS_76 Branched to a new discussion.

    Connection Interval and Connection Slave Latency

    kilian.timmler@exelonix.com

      Hi,

       

      I just heard about the following paper that uses one of TIs products:

       

      http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3478807/

       

      and I'm now wondering whether I can adjust the parameters mentioned in it, in my BCM20732 related projects. Those are namely the connection interval and connection slave latency. I have found something in blecen.h that might look like it but I'm not sure whether this is at all relevant to me.

       

      The question might be whether changing the mentioned parameters will cause similar results with the BCM20732 or BCM20736. If you have any good hints at how to reduce current consumption while a connection is active I would be interested to know about them as well.

       

      Regards,

       

      Kilian

        • 1. Re: Connection Interval and Connection Slave Latency
          mitoc_1583836

          You may want to look at the function below in lel2cap.h (SDK1.0/SDK2.0):

           

          void lel2cap_sendConnParamUpdateReq(UINT16 minInterval,

                      UINT16 maxInterval, UINT16 slaveLatency, UINT16 timeout);

           

          Also there is a sample code in SDK2.0 called speed_test.c that shows the usage of this function in context. The goal is to maximize the exchange and push the protocol at its limit when a link is created.

           

          Lastly, the BCM20732 will run SDK1.0 and BCM20736 will run SDK2.0. Both are design with the same function lel2cap_sendConnParamUpdateReq(), so the behavior should be the same. In any case it has to follow the BT standard (for example the minimum connection interval set to 7.5ms, etc...)

          1 of 1 people found this helpful
          • 2. Re: Connection Interval and Connection Slave Latency
            kilian.timmler@exelonix.com

            Thanks, this is good information.

             

            What I would like to know now is whether I have to use the lel2cap_sendConnParamUpdateReq() from the inside of the connection up callback or only during a connection, and more importantly what is the unit of the timeout parameter. From the article I mentioned I would guess its milliseconds but I'm not even sure what sort of timeout it is. What I got from the article was:

            "A  supervision  timeout  happens  when  the  time  since  the  last  received  packet

            exceeds the  connSupervisionTimeout  parameter, which is in the range between 100 ms and 32 s. "

             

            I hope we are talking about the same thing here.

             

            Regards,

             

            Kilian

            • 3. Re: Connection Interval and Connection Slave Latency
              ArvindS_76

              lel2cap_sendConnParamUpdateReq() can be used anytime when there is a connection (so outside connection up callback is OK too) with a peer device. This however is only a request from the slave to the master to change the connection parameters (only the master can change these). So the change to new parameters is not instantaneous.


              The unit of the supervision timeout value is 10ms (see BT spec, host controller interface, section 7.8). Minimum value is 10 (100 ms) and it has to be larger than the max connection interval being requested, and has to be larger than (1 + slave latency) * connection interval too.

              1 of 1 people found this helpful
              • 4. Re: Connection Interval and Connection Slave Latency
                kilian.timmler@exelonix.com

                Thanks, that helps.

                 

                To wrap this up for now let me mention that during a connection I measured around 300µA without any additional communication going on (used a DMM). This is an order of magnitude more than I have been seeing with sleep mode. Since I can also set up a connection short term vs having a connection running for a while, I decided to let my experiments with the above parameters rest until this gets more urgent.

                 

                Regards,

                 

                Kilian

                1 of 1 people found this helpful
                • 5. Re: Connection Interval and Connection Slave Latency
                  ArvindS_76

                  This was a bug in SDK 2.0 and this has been fixed in the upcoming SDK 2.1.0. So between connection events (just like  between adv or scan events), you should start to see ~30uS when sleeping once you upgrade.

                  1 of 1 people found this helpful
                  • 6. Re: Connection Interval and Connection Slave Latency
                    kilian.timmler@exelonix.com

                    Good to know. I'm still at 1.1.0 with the BCM20732S, upgrading means a hardware upgrade as far as I understand. 

                    • 7. Re: Connection Interval and Connection Slave Latency
                      userc_3543

                      Any documentation on this lel2cap_sendConnParamUpdateReq() function? Like what are the units?

                       

                      For instance, you say the minimum connection interval is 7.5ms, but how do you specify that to the function if it doesn't accept floats?

                      • 8. Re: Connection Interval and Connection Slave Latency
                        ArvindS_76

                        Min and max interval parameters are in units of BT frames (=1.25ms, so 7.5ms = 6 frames).

                         

                        Slave latency is a count - i.e. how many connection intervals the slave is allowed to skip (0 = listen every interval, 1 = listen every other interval and so on).

                         

                        Timeout (or supervision timeout) is in 10mS units.

                         

                        These parameters are related to the LE Connection Update HCI command, but from the slave's side (over L2CAP).

                        1 of 1 people found this helpful
                        • 9. Re: Connection Interval and Connection Slave Latency
                          hachc_2137126

                          Hi arvinds,

                           

                            As your statement before, would you comment that this is the API for parameter update from slave to master? What if we need the 20737 as master role to change the parameter to slaves? Any other API?

                          lel2cap_sendConnParamUpdateReq() can be used anytime when there is a connection (so outside connection up callback is OK too) with a peer device. This however is only a request from the slave to the master to change the connection parameters (only the master can change these).

                           

                            Another question is about the call back function 'lel2cap_handleConnParamUpdateReq', is this the callback when parameter update request coming from master or slave role?

                          • 10. Re: Connection Interval and Connection Slave Latency
                            ArvindS_76

                            As a master, you can use either blecen_ConnUpdate() if you want to use the abstraction in blecen sample app. Or if you want finer control, use blecm_ConnectionUpdate() in blecm.h

                            1 of 1 people found this helpful