You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/04/07 01:07:15 UTC

[GitHub] [mynewt-nimble] h2zero opened a new issue #793: min\max_ce_len, how is it used internally?

h2zero opened a new issue #793: min\max_ce_len, how is it used internally?
URL: https://github.com/apache/mynewt-nimble/issues/793
 
 
   I've been trying to track down errors when acting as a client connecting to multiple peripheral devices. What I have experienced so far is when the connection intervals are short, approx. 20ms, 2 connections are fine but once connected to a 3rd it causes an error and aborts on the esp32.
   
   I am finding by setting the min_ce_len to half of the default initial value, 0x0010 to 0x0008, the errors dissipate. 
   
   So what I'm asking is does the min_ce_len specify a fixed time slot that NimBLE reserves for that particular connection, regardless of any communication between the devices?
   
   If so would that mean in this instance with 2 devices connected, each with 20ms connection intervals and 10ms minimum connection event lengths that there would be no time available to support a 3rd connection?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] h2zero commented on issue #793: min\max_ce_len, how is it used internally?

Posted by GitBox <gi...@apache.org>.
h2zero commented on issue #793: min\max_ce_len, how is it used internally?
URL: https://github.com/apache/mynewt-nimble/issues/793#issuecomment-616022898
 
 
   Reopening this because I have found that when those parameters are set on a device with a separate controller, such as the esp32, it may use them as provided. This explains why changing them in my testing proved to have positive results.
   
   Would there be any issues for your controller if I were to submit a PR that sets these defines:
   ```
   #define BLE_GAP_INITIAL_CONN_MIN_CE_LEN     0x0010
   #define BLE_GAP_INITIAL_CONN_MAX_CE_LEN     0x0300
   ```
   To:
   ```
   #define BLE_GAP_INITIAL_CONN_MIN_CE_LEN     0x0000
   #define BLE_GAP_INITIAL_CONN_MAX_CE_LEN     0x0000
   ```
   The performance on the esp32 with these settings is absolutely fantastic, before this change the response was subpar. But if it causes issues outside the esp32 framework I will submit the proposal there perhaps.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] h2zero closed issue #793: min\max_ce_len, how is it used internally?

Posted by GitBox <gi...@apache.org>.
h2zero closed issue #793: min\max_ce_len, how is it used internally?
URL: https://github.com/apache/mynewt-nimble/issues/793
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] h2zero opened a new issue #793: min\max_ce_len, how is it used internally?

Posted by GitBox <gi...@apache.org>.
h2zero opened a new issue #793: min\max_ce_len, how is it used internally?
URL: https://github.com/apache/mynewt-nimble/issues/793
 
 
   I've been trying to track down errors when acting as a client connecting to multiple peripheral devices. What I have experienced so far is when the connection intervals are short, approx. 20ms, 2 connections are fine but once connected to a 3rd it causes an error and aborts on the esp32.
   
   I am finding by setting the min_ce_len to half of the default initial value, 0x0010 to 0x0008, the errors dissipate. 
   
   So what I'm asking is does the min_ce_len specify a fixed time slot that NimBLE reserves for that particular connection, regardless of any communication between the devices?
   
   If so would that mean in this instance with 2 devices connected, each with 20ms connection intervals and 10ms minimum connection event lengths that there would be no time available to support a 3rd connection?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on issue #793: min\max_ce_len, how is it used internally?

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek commented on issue #793: min\max_ce_len, how is it used internally?
URL: https://github.com/apache/mynewt-nimble/issues/793#issuecomment-610263805
 
 
   NimBLE controller does not use min/max CE length parameters for scheduling but it does validate them (likely there was intention to use them, but it was never implemented).
   
   There's syscfg settings which affects connection event length, namely `BLE_LL_CONN_INIT_SLOTS`, which sets minimum number of slots allocated for each connection event. It usually does not affect limit the number of concurrent connections controller is able to support since it will just skip connection events it cannot schedule. When there are 2 colliding connection events, the least recently scheduled connection has priority (the other one is skipped and that connection moves to next connection event). So with multiple connections with short connection interval just make sure supervision timeouts are long enough so controller can skip connection events without timeouts happening.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] h2zero commented on issue #793: min\max_ce_len, how is it used internally?

Posted by GitBox <gi...@apache.org>.
h2zero commented on issue #793: min\max_ce_len, how is it used internally?
URL: https://github.com/apache/mynewt-nimble/issues/793#issuecomment-610397519
 
 
   Thanks, the helps a lot 😃 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] h2zero edited a comment on issue #793: min\max_ce_len, how is it used internally?

Posted by GitBox <gi...@apache.org>.
h2zero edited a comment on issue #793: min\max_ce_len, how is it used internally?
URL: https://github.com/apache/mynewt-nimble/issues/793#issuecomment-610397519
 
 
   Thanks, that helps a lot 😃 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services