Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove notification for update process timeout. #782

Merged
merged 1 commit into from
Mar 27, 2020

Conversation

zacwbond
Copy link
Contributor

(This addresses issue #780, just like PR #781, which was closed due to some repo juggling on my end.)

From the original

This is a fix for #780, an issue I submitted earlier today.

I am connecting as a central to a remote peripheral using a connection interval of 120, latency of 90, and timeout of 3000. Due to the hard-coded 40 second timeout, it is impossible to perform a connection parameter update on this connection. Trying to do so results in a timeout followed by a disconnect 100% of the time.

My attempt to fix the problem is to compute the timeout based on the current connection parameters instead of just hard-coding a constant value.

Based on @rymanluk's comments to that PR, I have reduced the change to keeping the 40s timeout, but simply not posting an event should a timeout occur.

Copy link
Contributor

@rymanluk rymanluk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, we just need better commit message here :)

  1. Please add nimble/gap: prefix to the commit title
  2. In commit message body please write why we are removing it.

Copy link
Contributor

@rymanluk rymanluk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating commit message.

Could you please change it to following (also please try keep max 80 chars per line):

"The connection parameter update process has a hard-coded 40-second timeout,
but in reality, the time it takes to complete a connection parameter might take longer, as it
depends on the connection interval and when controller deciders to do it.
This patch changes meaning of this 40 sec timer to be only a guard so the application
does not perform too many connection update parameter requests.
Now when timeout fires, application will not be notified about that and link will not be dropped."

As you can see also Travis complains on this patch. Please check details.
You can reproduce the problem by running unit test on your PC

"newt test @apache-mynewt-nimble/nimble/host/test"

To solve it please remove ble_gap_test_util_update_no_l2cap_tmo function as we don't need it anymore.

The connection parameter update process has a hard-coded 40-second timeout,
but in reality, the time it takes to complete a connection parameter might take longer, as it
depends on the connection interval and when controller deciders to do it.
This patch changes meaning of this 40 sec timer to be only a guard so the application
does not perform too many connection update parameter requests.
Now when timeout fires, application will not be notified about that and link will not be dropped.
@apache-mynewt-bot
Copy link

Style check summary

No suggestions at this time!

Copy link
Contributor

@rymanluk rymanluk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. lgtm

@rymanluk rymanluk merged commit 403de2b into apache:master Mar 27, 2020
espressif-bot pushed a commit to espressif/esp-idf that referenced this pull request May 22, 2020
Change list:
- Reduces the size of the compiled binary, PR: espressif/esp-nimble#6
- Null pointer check, PR: apache/mynewt-nimble#701
- Pairing procedure abort on unexpected req: apache/mynewt-nimble#710
- Fix conn flags after pairing: apache/mynewt-nimble#730
- Remove notification for update process timeout (Vol 6, Part B, section 5.2 ):
  apache/mynewt-nimble#782
- CCCD fix : apache/mynewt-nimble#790 and
  apache/mynewt-nimble#804
- Host based Privacy (RPA) fix: espressif/esp-nimble#7

 Closes espressif/esp-nimble#10

 Closes #4413
mahavirj pushed a commit to mahavirj/esp-afr-sdk that referenced this pull request Jun 1, 2020
… (backport v3.3)

Change list:
- Reduces the size of the compiled binary, PR: espressif/esp-nimble#6
- Null pointer check, PR: apache/mynewt-nimble#701
- Pairing procedure abort on unexpected req: apache/mynewt-nimble#710
- Fix conn flags after pairing: apache/mynewt-nimble#730
- Remove notification for update process timeout (Vol 6, Part B, section 5.2 ):
  apache/mynewt-nimble#782
- CCCD fix : apache/mynewt-nimble#790 and
  apache/mynewt-nimble#804
- Host based Privacy (RPA) fix: espressif/esp-nimble#7

 Closes espressif/esp-nimble#10

 Closes espressif/esp-idf#4413
espressif-bot pushed a commit to espressif/esp-idf that referenced this pull request Jun 15, 2020
… (backport v4.0)

Change list:
- Reduces the size of the compiled binary, PR: espressif/esp-nimble#6
- Null pointer check, PR: apache/mynewt-nimble#701
- Pairing procedure abort on unexpected req: apache/mynewt-nimble#710
- Fix conn flags after pairing: apache/mynewt-nimble#730
- Remove notification for update process timeout (Vol 6, Part B, section 5.2 ):
  apache/mynewt-nimble#782
- CCCD fix : apache/mynewt-nimble#790 and
  apache/mynewt-nimble#804
- Host based Privacy (RPA) fix: espressif/esp-nimble#7

 Closes espressif/esp-nimble#10

 Closes #4413
projectgus pushed a commit to espressif/esp-idf that referenced this pull request Jul 22, 2020
… (backport v4.1)

Change list:
- Reduces the size of the compiled binary, PR: espressif/esp-nimble#6
- Null pointer check, PR: apache/mynewt-nimble#701
- Pairing procedure abort on unexpected req: apache/mynewt-nimble#710
- Fix conn flags after pairing: apache/mynewt-nimble#730
- Remove notification for update process timeout (Vol 6, Part B, section 5.2 ):
  apache/mynewt-nimble#782
- CCCD fix : apache/mynewt-nimble#790 and
  apache/mynewt-nimble#804
- Host based Privacy (RPA) fix: espressif/esp-nimble#7

 Closes espressif/esp-nimble#10

 Closes #4413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants