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

Draft enabling wifipaf on sample apps #34716

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gladystonfranca
Copy link
Contributor

@gladystonfranca gladystonfranca commented Aug 1, 2024

Support for wifipaf is not being enabled on the example apps on the SDK Container.
SDK container is generated by using Dockerfile:
https://github.com/project-chip/connectedhomeip/blob/master/integrations/docker/images/chip-cert-bins/Dockerfile

This PR is related / should be understood in the context of this Commit:

Add --wifipaf commission in chip-tool and apps of Linux platform (#33977). 30 Jul 2024 at 00:21
SHA: 085f57f

The initial changes done here in this PR are not supposed to the complete or even the right solution for this issue but the entry point to get help from who knew the right places that must be changed in order to get wifipaf available on the sample apps (SDK container) used by Test Harness execution.

Copy link

Review changes with SemanticDiff.

@@ -25,7 +25,7 @@ declare_args() {
chip_fake_platform = false

# Include wifi-paf to commission the device or not
chip_device_config_enable_wifipaf = false
chip_device_config_enable_wifipaf = true
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have a reason to have wifipaf as a default?
Otherwise we should just change what the TH builds, like I see https://github.com/project-chip/connectedhomeip/blob/master/integrations/docker/images/chip-cert-bins/Dockerfile#L177

You could add a wifi-paf variant to build things like linux-x64-all-clusters-ipv6only-wifi-paf.

To get that variant working you add the variant in https://github.com/project-chip/connectedhomeip/blob/master/scripts/build/build/targets.py#L187 and make https://github.com/project-chip/connectedhomeip/blob/master/scripts/build/builders/host.py#L331 support some form of flag that makes the gn argument take some value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@andy31415 I don't have answer for that if it should be default or not. I just realized support was not there. Thank you for your quick answer Andrei. I will raise up this question and get back here.

Copy link
Contributor

Choose a reason for hiding this comment

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

@andy31415 we are going to use the chip-cert-bins in the TH image for testing , also the way the test plan is written , it uses the same sample app for validating the commissioning flow for BLE , Wifi and on network , so I guess we would have to enable it by default ?
Let me start a conversation with other folks in slack as well

Copy link
Contributor

Choose a reason for hiding this comment

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

Given that you also need a patched wpa_supplicant version to actually have working PAF support I don't think it's helpful to enable this by default. Is the TH not able to pass build arguments to the binaries it builds?

Copy link
Contributor

@ksperling-apple ksperling-apple Aug 4, 2024

Choose a reason for hiding this comment

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

(I also think in general it's unhelpful to treat current_os == "linux" as "you're building for development and want to enable every option under the sun". I've been thinking about adding some option like matter_enable_recommended that can be defaulted to true and then be used as the default choice for other options, so that in scenarios where I want to explicitly selected what gets turned on I can just set that one option to false, without having to see what other RPC or tracing or feature xyz options have been added recently and are now defaulting to True because I happen to build on Linux.)

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.

Marking as request changes until we get feedback from people familiar with PAF (maybe @ksperling-apple ?).

The question is if this is sufficient to just get PAF support on most linuxes. Do most linuxes support PAF or do we need special HW.

Copy link

github-actions bot commented Aug 1, 2024

PR #34716: Size comparison from 5f6f3f1 to d0c4fd3

Increases above 0.2%:

platform target config section 5f6f3f1 d0c4fd3 change % change
cc32xx lock CC3235SF_LAUNCHXL FLASH 652622 654446 1824 0.3
cyw30739 lock CYW30739B2-P5-EVK-01 FLASH 625777 627433 1656 0.3
CYW30739B2-P5-EVK-02 FLASH 645485 647149 1664 0.3
CYW30739B2-P5-EVK-03 FLASH 645485 647149 1664 0.3
efr32 lock-app BRD4338a FLASH 735108 736820 1712 0.2
Full report (50 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, mbed, nrfconnect, nxp, psoc6, qpg, stm32, tizen)
platform target config section 5f6f3f1 d0c4fd3 change % change
bl602 lighting-app bl602 FLASH 1277128 1277128 0 0.0
RAM 95888 95888 0 0.0
bl602+mfd FLASH 1291386 1291386 0 0.0
RAM 96040 96040 0 0.0
bl602+rpc FLASH 1316096 1316096 0 0.0
RAM 104312 104312 0 0.0
bl702 lighting-app bl702 FLASH 1098280 1098280 0 0.0
RAM 15241 15241 0 0.0
bl702+mfd FLASH 1108974 1108974 0 0.0
RAM 15385 15385 0 0.0
bl702+rpc FLASH 1188346 1188346 0 0.0
RAM 24237 24237 0 0.0
bl706-eth FLASH 881314 881314 0 0.0
RAM 27344 27344 0 0.0
bl706-wifi FLASH 1134412 1134412 0 0.0
RAM 14677 14677 0 0.0
bl702l lighting-app bl702l FLASH 1085434 1085434 0 0.0
RAM 21796 21796 0 0.0
bl702l+mfd FLASH 1096440 1096440 0 0.0
RAM 21948 21948 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 802368 802368 0 0.0
RAM 117620 117620 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 817044 818316 1272 0.2
RAM 125220 125220 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 809040 810600 1560 0.2
RAM 119500 119500 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 762804 762804 0 0.0
RAM 113640 113640 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 747456 747456 0 0.0
RAM 113832 113832 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 610142 610142 0 0.0
RAM 205380 205380 0 0.0
lock CC3235SF_LAUNCHXL FLASH 652622 654446 1824 0.3
RAM 205620 205620 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 671425 671425 0 0.0
RAM 78348 78348 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 691285 691285 0 0.0
RAM 80980 80980 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 691285 691285 0 0.0
RAM 80980 80980 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 648213 648213 0 0.0
RAM 73416 73416 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 610065 610065 0 0.0
RAM 71340 71340 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 629701 629701 0 0.0
RAM 73892 73892 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 629701 629701 0 0.0
RAM 73892 73892 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 625777 627433 1656 0.3
RAM 74356 74356 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 645485 647149 1664 0.3
RAM 76908 76908 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 645485 647149 1664 0.3
RAM 76908 76908 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 599533 599533 0 0.0
RAM 68372 68372 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 619393 619393 0 0.0
RAM 71004 71004 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 619393 619393 0 0.0
RAM 71004 71004 0 0.0
efr32 lighting-app BRD4187C FLASH 929456 929456 0 0.0
RAM 135148 135148 0 0.0
lock-app BRD4338a FLASH 735108 736820 1712 0.2
RAM 208436 208436 0 0.0
window-app BRD4187C FLASH 1015188 1015188 0 0.0
RAM 127084 127084 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1503780 1505388 1608 0.1
RAM 227296 227296 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 906524 906524 0 0.0
RAM 142221 142221 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 879524 879524 0 0.0
RAM 140360 140360 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 838280 838280 0 0.0
RAM 141062 141062 0 0.0
nxp contact k32w0+release FLASH 576412 576412 0 0.0
RAM 70416 70416 0 0.0
k32w1+release FLASH 592136 592136 0 0.0
RAM 74456 74456 0 0.0
light k32w0+release FLASH 612056 612056 0 0.0
RAM 69920 69920 0 0.0
k32w1+release FLASH 676968 676968 0 0.0
RAM 83232 83232 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1635716 1635716 0 0.0
RAM 210904 210904 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1540908 1540908 0 0.0
RAM 207664 207664 0 0.0
light cy8ckit_062s2_43012 FLASH 1463124 1463124 0 0.0
RAM 200776 200776 0 0.0
lock cy8ckit_062s2_43012 FLASH 1460148 1461852 1704 0.1
RAM 225120 225120 0 0.0
qpg lighting-app qpg6105+debug FLASH 655124 655124 0 0.0
RAM 105148 105148 0 0.0
lock-app qpg6105+debug FLASH 612560 612560 0 0.0
RAM 99632 99632 0 0.0
stm32 light STM32WB5MM-DK FLASH 477496 477496 0 0.0
RAM 144756 144756 0 0.0
tizen all-clusters-app arm unknown 1588 1588 0 0.0
FLASH 1701428 1701428 0 0.0
RAM 51812 51812 0 0.0
chip-tool-ubsan arm unknown 2404 2404 0 0.0
FLASH 16607826 16607618 -208 -0.0
RAM 7297180 7297180 0 0.0

@jczhang777
Copy link
Contributor

I modified the src/platform/device.gni file. I changed chip_device_config_enable_wifipaf = false to chip_device_config_enable_wifipaf = true, and then compiled the chip tool. During the compilation, I encountered an error. The error log is as follows:

ERROR at //third_party/connectedhomeip/src/include/platform/ConnectivityManager.h:39:11: Include not allowed.
#include <transport/raw/WiFiPAF.h>
^----------------------
It is not in any dependency of
//third_party/connectedhomeip/src/platform:platform
The include file is in the target(s):
//third_party/connectedhomeip/src/transport/raw:raw
which should somehow be reachable.

Is there an issue with the way I made the modification?

@andy31415
Copy link
Contributor

I modified the src/platform/device.gni file. I changed chip_device_config_enable_wifipaf = false to chip_device_config_enable_wifipaf = true, and then compiled the chip tool. During the compilation, I encountered an error. The error log is as follows:

ERROR at //third_party/connectedhomeip/src/include/platform/ConnectivityManager.h:39:11: Include not allowed. #include <transport/raw/WiFiPAF.h> ^---------------------- It is not in any dependency of //third_party/connectedhomeip/src/platform:platform The include file is in the target(s): //third_party/connectedhomeip/src/transport/raw:raw which should somehow be reachable.

Is there an issue with the way I made the modification?

The fix does not seem to work: there is a dependency loop here: tests/raw depends on platform and vice-versa. This is more complex to fix.

Copy link
Contributor

@woody-apple woody-apple left a comment

Choose a reason for hiding this comment

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

This hasn't made it into the test harness yet, and has missed enablement. Holding.

Copy link

github-actions bot commented Feb 1, 2025

This pull request has been automatically marked as stale because it has not had recent activity.

@github-actions github-actions bot added the stale Stale issue or PR label Feb 1, 2025
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.

6 participants