Relation between BLE Connection Event Length and Connection Intervel

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Relation between BLE Connection Event Length and Connection Intervel

跳至解决方案
4,198 次查看
nidhintomy
Contributor IV

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

标签 (2)
0 项奖励
回复
1 解答
4,177 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

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

 

 

在原帖中查看解决方案

4 回复数
4,187 次查看
nidhintomy
Contributor IV

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

 

0 项奖励
回复
4,178 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

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

 

 

4,171 次查看
nidhintomy
Contributor IV

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

 

0 项奖励
回复
4,191 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

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