Skip to content

Added Connectivity Manager Implementation Basis and Delegate Objects#43537

Open
gerickson wants to merge 4 commits intoproject-chip:masterfrom
Nuovations:user/gerickson/github-issue-42516-added-basis-and-delegate-objects
Open

Added Connectivity Manager Implementation Basis and Delegate Objects#43537
gerickson wants to merge 4 commits intoproject-chip:masterfrom
Nuovations:user/gerickson/github-issue-42516-added-basis-and-delegate-objects

Conversation

@gerickson
Copy link
Contributor

@gerickson gerickson commented Mar 9, 2026

Summary

Per #42516 and this overview, this introduces two new pieces of infrastructure en route to enabling the end goal of more-pluggable Matter network management infrastructure for Linux.

  1. Connectivity Manager Implementation Network Management Delegate
  2. Connectivity Manager Implementation Network Management Basis Class
Connectivity Manager Implementation Network Management Delegate

This delegate is used by a concrete network management basis implementation to report changes in Wi-Fi medium availability to an owning coordinator (typically the platform Connectivity Manager implementation).

Wi-Fi medium availability reflects whether the underlying Wi-Fi control plane / radio resources are usable for Wi-Fi operations (for example, whether the Wi-Fi interface is present and powered, and not blocked or otherwise unavailable).

The coordinator may use these notifications to:

  • Update cached Connectivity Manager state.
  • Drive Device Layer events and diagnostic attributes.
  • Coordinate ownership or arbitration of Wi-Fi radio resources between operational Wi-Fi usage (station / AP) and the Wi-Fi Neighbor Awareness Networking (NAN) Unsynchronized Service Discovery (USD) / Public Action Frame (PAF) commissioning transport.
Connectivity Manager Implementation Network Management Basis Class

A lightweight base class providing delegate wiring for Linux Connectivity Manager network management implementations.

This (will) serve(s) as a common base for concrete Linux Connectivity Manager network management backends (for example, Connection Manager- (also known as, connman) or wpa_supplicant-based management).

The class provides:

  • Storage and management of an optional network management delegate.
  • A protected action-delegation helper for reporting Wi-Fi medium availability changes to the delegate.

This base does not define the full network management control-plane API. Instead, it provides a small amount of shared "glue" used to coordinate cross-cutting concerns between the network management backend and the owning platform Connectivity Manager implementation (which may also be coordinating the Wi-Fi NAN USD / PAF commissioning transport).

Related issues

#42516

Testing

An armvl-unknown-linux-gnu device has been successfully paired / commissioned using the iOS 26.2 Apple "Home" app with a Connectivity Manager implementation using this infrastructure.

@gerickson gerickson force-pushed the user/gerickson/github-issue-42516-added-basis-and-delegate-objects branch from 9fbe1fc to 236696d Compare March 9, 2026 22:43
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new base class NetworkManagementBasis and a delegate interface NetworkManagementDelegate to create a more pluggable network management infrastructure for Linux. The changes are well-structured and align with the goal of refactoring the connectivity manager. I have a few suggestions to improve code conciseness and adhere to C++ best practices for performance.

Note: Security Review did not run due to the size of the PR.

@github-actions
Copy link

github-actions bot commented Mar 9, 2026

PR #43537: Size comparison from d93b463 to 236696d

Full report (34 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section d93b463 236696d change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1089430 1089430 0 0.0
RAM 144762 144762 0 0.0
bl616 lighting-app bl616+thread FLASH 1100108 1100108 0 0.0
RAM 104184 104184 0 0.0
bl616+wifi+shell FLASH 1586972 1586972 0 0.0
RAM 98080 98080 0 0.0
bl702 lighting-app bl702+eth FLASH 1052790 1052790 0 0.0
RAM 108357 108357 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 890814 890814 0 0.0
RAM 105748 105748 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779236 779236 0 0.0
RAM 103324 103324 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786576 786576 0 0.0
RAM 108508 108508 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732812 732812 0 0.0
RAM 97316 97316 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716248 716248 0 0.0
RAM 97476 97476 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558130 558130 0 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591262 591262 0 0.0
RAM 204744 204744 0 0.0
efr32 lock-app BRD4187C FLASH 971260 971260 0 0.0
RAM 125796 125796 0 0.0
BRD4338a FLASH 769676 769668 -8 -0.0
RAM 236528 236528 0 0.0
window-app BRD4187C FLASH 1074944 1074944 0 0.0
RAM 126440 126440 0 0.0
esp32 all-clusters-app c3devkit DRAM 98356 98356 0 0.0
FLASH 1596670 1596670 0 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 857656 857656 0 0.0
RAM 161999 161999 0 0.0
nxp contact mcxw71+release FLASH 735904 735904 0 0.0
RAM 66936 66936 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1708852 1708852 0 0.0
RAM 213940 213940 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1607524 1607524 0 0.0
RAM 210812 210812 0 0.0
light cy8ckit_062s2_43012 FLASH 1470668 1470668 0 0.0
RAM 196988 196988 0 0.0
lock cy8ckit_062s2_43012 FLASH 1497364 1497364 0 0.0
RAM 224732 224732 0 0.0
qpg lighting-app qpg6200+debug FLASH 840748 840748 0 0.0
RAM 127780 127780 0 0.0
lock-app qpg6200+debug FLASH 779408 779408 0 0.0
RAM 118728 118728 0 0.0
realtek light-switch-app rtl8777g FLASH 720776 720776 0 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767984 767984 0 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478904 478904 0 0.0
RAM 141324 141324 0 0.0
telink bridge-app tl7218x FLASH 728880 728880 0 0.0
RAM 95768 95768 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 853046 853046 0 0.0
RAM 44184 44184 0 0.0
tl7218x FLASH 844446 844446 0 0.0
RAM 99572 99572 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 725726 725726 0 0.0
RAM 55740 55740 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 788290 788290 0 0.0
RAM 74924 74924 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725726 725726 0 0.0
RAM 33228 33228 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 615502 615502 0 0.0
RAM 118232 118232 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 843242 843246 4 0.0
RAM 97280 97280 0 0.0

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.07%. Comparing base (fa956ce) to head (49e92e2).

Files with missing lines Patch % Lines
...ConnectivityManagerImpl_NetworkManagementBasis.cpp 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #43537      +/-   ##
==========================================
- Coverage   54.07%   54.07%   -0.01%     
==========================================
  Files        1548     1549       +1     
  Lines      106709   106717       +8     
  Branches    13308    13309       +1     
==========================================
+ Hits        57704    57705       +1     
- Misses      49005    49012       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gerickson gerickson force-pushed the user/gerickson/github-issue-42516-added-basis-and-delegate-objects branch 5 times, most recently from eac3ffe to 3ed0be1 Compare March 10, 2026 23:28
@github-actions
Copy link

github-actions bot commented Mar 10, 2026

PR #43537: Size comparison from dcf0576 to 3ed0be1

Full report (6 builds for cc32xx, nrfconnect, realtek, stm32)
platform target config section dcf0576 3ed0be1 change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558106 558106 0 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591230 591230 0 0.0
RAM 204744 204744 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 857504 857504 0 0.0
RAM 161999 161999 0 0.0
realtek light-switch-app rtl8777g FLASH 720520 720520 0 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767728 767728 0 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478804 478804 0 0.0
RAM 141324 141324 0 0.0

@gerickson gerickson requested a review from andy31415 March 11, 2026 00:32
Copy link
Contributor

@andy31415 andy31415 left a comment

Choose a reason for hiding this comment

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

Seems ok, assuming we replace const bool & with just bool

@andy31415
Copy link
Contributor

@gerickson it seems master zap was broken (not your PR). You probably need to merge with master again after the fix in #43554

@gerickson gerickson force-pushed the user/gerickson/github-issue-42516-added-basis-and-delegate-objects branch from 3ed0be1 to 97cd103 Compare March 11, 2026 17:00
@github-actions
Copy link

github-actions bot commented Mar 11, 2026

PR #43537: Size comparison from 2c98999 to 97cd103

Full report (34 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 2c98999 97cd103 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1089396 1089396 0 0.0
RAM 144762 144762 0 0.0
bl616 lighting-app bl616+thread FLASH 1100324 1100324 0 0.0
RAM 104184 104184 0 0.0
bl616+wifi+shell FLASH 1586916 1586916 0 0.0
RAM 98080 98080 0 0.0
bl702 lighting-app bl702+eth FLASH 1052752 1052752 0 0.0
RAM 108357 108357 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 890764 890764 0 0.0
RAM 105748 105748 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779164 779164 0 0.0
RAM 103324 103324 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786528 786528 0 0.0
RAM 108508 108508 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732724 732724 0 0.0
RAM 97316 97316 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716160 716160 0 0.0
RAM 97476 97476 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558106 558106 0 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591230 591230 0 0.0
RAM 204744 204744 0 0.0
efr32 lock-app BRD4187C FLASH 971196 971196 0 0.0
RAM 125796 125796 0 0.0
BRD4338a FLASH 769284 769276 -8 -0.0
RAM 236528 236528 0 0.0
window-app BRD4187C FLASH 1074656 1074656 0 0.0
RAM 126440 126440 0 0.0
esp32 all-clusters-app c3devkit DRAM 98356 98356 0 0.0
FLASH 1596564 1596564 0 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 857588 857588 0 0.0
RAM 161999 161999 0 0.0
nxp contact mcxw71+release FLASH 735808 735808 0 0.0
RAM 66936 66936 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1708508 1708508 0 0.0
RAM 213940 213940 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1607180 1607180 0 0.0
RAM 210812 210812 0 0.0
light cy8ckit_062s2_43012 FLASH 1470412 1470412 0 0.0
RAM 196988 196988 0 0.0
lock cy8ckit_062s2_43012 FLASH 1497092 1497092 0 0.0
RAM 224732 224732 0 0.0
qpg lighting-app qpg6200+debug FLASH 840636 840636 0 0.0
RAM 127780 127780 0 0.0
lock-app qpg6200+debug FLASH 779312 779312 0 0.0
RAM 118728 118728 0 0.0
realtek light-switch-app rtl8777g FLASH 720520 720520 0 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767736 767736 0 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478820 478820 0 0.0
RAM 141324 141324 0 0.0
telink bridge-app tl7218x FLASH 728648 728648 0 0.0
RAM 95760 95760 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 852792 852792 0 0.0
RAM 44176 44176 0 0.0
tl7218x FLASH 844196 844196 0 0.0
RAM 99564 99564 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 725462 725462 0 0.0
RAM 55740 55740 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 788030 788030 0 0.0
RAM 74916 74916 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725458 725458 0 0.0
RAM 33220 33220 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 616200 616200 0 0.0
RAM 118232 118232 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 842966 842970 4 0.0
RAM 97272 97272 0 0.0

…ement delegate.

This delegate is used by a concrete network management basis
implementation to report changes in Wi-Fi medium availability to
an owning coordinator (typically the platform Connectivity Manager
implementation).

Wi-Fi medium availability reflects whether the underlying Wi-Fi
control plane / radio resources are usable for Wi-Fi operations
(for example, whether the Wi-Fi interface is present and powered,
and not blocked or otherwise unavailable).

The coordinator may use these notifications to:

  * Update cached Connectivity Manager state.
  * Drive Device Layer events and diagnostic attributes.
  * Coordinate ownership or arbitration of Wi-Fi radio resources
    between operational Wi-Fi usage (station / AP) and the
    Wi-Fi Neighbor Awareness Networking (NAN) Unsynchronized Service
    Discovery (USD) / Public Action Frame (PAF) commissioning
    transport.

Concrete implementations should assume that notifications may be
delivered from an implementation-defined execution
context. Delegates should avoid blocking for extended periods.
A lightweight base class providing delegate wiring for Linux
Connectivity Manager network management implementations.

This serves as a common base for concrete Linux Connectivity
Manager network management backends (for example, Connection
Manager- (also known as, connman) or wpa_supplicant-based
management).

The class provides:

  * Storage and management of an optional network management
    delegate.
  * A protected action-delegation helper for reporting Wi-Fi
    medium availability changes to the delegate.

This base does not define the full network management
control-plane API. Instead, it provides a small amount of shared
"glue" used to coordinate cross-cutting concerns between the
network management backend and the owning platform Connectivity
Manager implementation (which may also be coordinating the Wi-Fi
NAN USD / PAF commissioning transport).
@gerickson gerickson force-pushed the user/gerickson/github-issue-42516-added-basis-and-delegate-objects branch from 97cd103 to 49e92e2 Compare March 13, 2026 14:37
@gerickson
Copy link
Contributor Author

@enkiusz or @arkq, any thoughts on this one?

@github-actions
Copy link

github-actions bot commented Mar 13, 2026

PR #43537: Size comparison from fa956ce to 49e92e2

Full report (34 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section fa956ce 49e92e2 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1089396 1089396 0 0.0
RAM 144762 144762 0 0.0
bl616 lighting-app bl616+thread FLASH 1100324 1100324 0 0.0
RAM 104184 104184 0 0.0
bl616+wifi+shell FLASH 1586916 1586916 0 0.0
RAM 98080 98080 0 0.0
bl702 lighting-app bl702+eth FLASH 1052752 1052752 0 0.0
RAM 108357 108357 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 890764 890764 0 0.0
RAM 105748 105748 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779164 779164 0 0.0
RAM 103324 103324 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786528 786528 0 0.0
RAM 108508 108508 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732724 732724 0 0.0
RAM 97316 97316 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716160 716160 0 0.0
RAM 97476 97476 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558106 558106 0 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591230 591230 0 0.0
RAM 204744 204744 0 0.0
efr32 lock-app BRD4187C FLASH 971196 971196 0 0.0
RAM 125796 125796 0 0.0
BRD4338a FLASH 769268 769260 -8 -0.0
RAM 236544 236544 0 0.0
window-app BRD4187C FLASH 1074656 1074656 0 0.0
RAM 126440 126440 0 0.0
esp32 all-clusters-app c3devkit DRAM 98356 98356 0 0.0
FLASH 1596564 1596564 0 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 857588 857588 0 0.0
RAM 161999 161999 0 0.0
nxp contact mcxw71+release FLASH 735808 735808 0 0.0
RAM 66936 66936 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1708508 1708508 0 0.0
RAM 213940 213940 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1607180 1607180 0 0.0
RAM 210812 210812 0 0.0
light cy8ckit_062s2_43012 FLASH 1470412 1470412 0 0.0
RAM 196988 196988 0 0.0
lock cy8ckit_062s2_43012 FLASH 1497092 1497092 0 0.0
RAM 224732 224732 0 0.0
qpg lighting-app qpg6200+debug FLASH 840636 840636 0 0.0
RAM 127780 127780 0 0.0
lock-app qpg6200+debug FLASH 779312 779312 0 0.0
RAM 118728 118728 0 0.0
realtek light-switch-app rtl8777g FLASH 720520 720520 0 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767736 767736 0 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478820 478820 0 0.0
RAM 141324 141324 0 0.0
telink bridge-app tl7218x FLASH 728648 728648 0 0.0
RAM 95760 95760 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 852792 852792 0 0.0
RAM 44176 44176 0 0.0
tl7218x FLASH 844196 844196 0 0.0
RAM 99564 99564 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 725462 725462 0 0.0
RAM 55740 55740 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 788030 788030 0 0.0
RAM 74916 74916 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725458 725458 0 0.0
RAM 33220 33220 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 616200 616200 0 0.0
RAM 118232 118232 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 842966 842970 4 0.0
RAM 97272 97272 0 0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants