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

Re-evaluate the DNS-SD and BLE commissioning advertising timeouts #16693

Closed
bzbarsky-apple opened this issue Mar 26, 2022 · 0 comments · Fixed by #20007
Closed

Re-evaluate the DNS-SD and BLE commissioning advertising timeouts #16693

bzbarsky-apple opened this issue Mar 26, 2022 · 0 comments · Fixed by #20007

Comments

@bzbarsky-apple
Copy link
Contributor

Problem

Right now we have three separate commissioning-related timeouts:

  1. The timeout in the commissioning window manager (which after Fix management of the commissioning window timeout. #16692 is always present and defaults to CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS).
  2. The timeout in Dnssd.h/cpp, which defaults to CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS but can be overridden, including to "no timeout".
  3. The timeouts in the various BLEManagerImpl::_SetAdvertisingEnabled implementations. These use CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT.

Proposed Solution

We should probably align these things. In particular, we should remove the timeout handling from the BLEManagers and the Dnssd code and just have the commissioning window manager manage that state (which it already does).

@Damian-Nordic @andy31415

bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Jun 27, 2022
The commissioning window manager handles advertisement start/stop.  We
don't need per-advertisement-mechanism duplication of timeout timers.

Specific changes:

1) Remove the "stop advertisement" timing from the (few) platform BLE managers
   that did it.
2) Remove CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT altogether.
3) Remove commissioning advertisement timing from Dnssd.cpp.
4) Remove the Linux shell command for setting the "discovery timeout", because
   it's really not clear what it's supposed to do and how it should work.

Fixes project-chip#16693
andy31415 pushed a commit that referenced this issue Jun 27, 2022
The commissioning window manager handles advertisement start/stop.  We
don't need per-advertisement-mechanism duplication of timeout timers.

Specific changes:

1) Remove the "stop advertisement" timing from the (few) platform BLE managers
   that did it.
2) Remove CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT altogether.
3) Remove commissioning advertisement timing from Dnssd.cpp.
4) Remove the Linux shell command for setting the "discovery timeout", because
   it's really not clear what it's supposed to do and how it should work.

Fixes #16693
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 a pull request may close this issue.

1 participant