Is there a relation between connection event length and connection intervel?
From my understanding connection intervel = connection event + sleep time. That is after the connection event the device sleeps, then wakes up on next intervel to process the event. Is this right?
Is only one event in one intervel?
/*
* Connection Event Length Ranges
* Size: 2 bytes.
* Unit: 0.625ms.
* Range: maximum possible (0 - (40959.375ms ~ 41s))
*/
/*
* Connection Interval Ranges
* Size: 2 bytes
* Unit: 1.25ms.
* Range: 7.5ms - 4s.
*/
How we use eventLengthMax which 41s and intervelLengthMax 4s together? How this is possible?
In KW36 sample example 'frdmkw36_wireless_examples_bluetooth_temp_coll_bm',
gapConnectionRequestParameters_t gConnReqParams =
{
.scanInterval = 36,
.scanWindow = 36,
.filterPolicy = (uint8_t)gUseDeviceAddress_c,
.ownAddressType = gBleAddrTypePublic_c,
.connIntervalMin = gcConnectionIntervalMinDefault_c,
.connIntervalMax = gcConnectionIntervalMinDefault_c,
.connLatency = 0,
.supervisionTimeout = 0x03E8,
.connEventLengthMin = 0,
.connEventLengthMax = 0xFFFF,
.initiatingPHYs = (uint8_t)gLePhy1MFlag_c,
};
Here event length is ~41 sec and connection intervel is 50 ms. Please clarify this.
Best Regards,
Nidhin
Solved! Go to Solution.
Hi, @nidhintomy
Event length should always be less than connection interval, and we can achieve this relationship because of the existence of the relation of the two units. Here the `connEventLengthMax` is a possible value that cannot be obtained due to other constraints.
Best Regards,
Gavin Jia
Hi @Gavin_Jia
Thats why i am asking how is this possible?
How is event length greater than connection interval?
Should it be lower than connection interval?
Please clarify.
Best Regards,
Nidhin
Hi, @nidhintomy
Event length should always be less than connection interval, and we can achieve this relationship because of the existence of the relation of the two units. Here the `connEventLengthMax` is a possible value that cannot be obtained due to other constraints.
Best Regards,
Gavin Jia
Hi @Gavin_Jia
Thanks for your help.
After considering the constraints link layer selects a connection event length less than connection intervel.
Is it mean the event length selected by link layer is always constant value and it will not changed after selecting it ,except calling a update connection parameter request?
Is the event length can be a variable that can change between 0 - connection intervel?
Best Regards,
Nidhin
Hi,
As shown in the code above `.connEventLengthMax = 0xFFFF`, 0xFFFF converted to decimal is 65535, then multiply by the unit 0.625ms, get the result of 40925ms(~ 41s).
And the definition of `gcConnectionIntervalMinDefault_c` could be found in the file `ble_general.h`.
#ifndef gcConnectionIntervalMinDefault_c
#define gcConnectionIntervalMinDefault_c (40U)
#endif
So, the connection interval is 40 multiplied by the unit 1.25ms to get 50ms.
Best Regards,
Gavin Jia