Skip to content

Commit

Permalink
Merge branch 'master' into booster2
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq authored Jun 30, 2023
2 parents 42b1bd6 + def0efa commit 5c5bbbb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
4 changes: 4 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ if (CONFIG_ENABLE_CHIP_SHELL)
chip_gn_arg_append("chip_build_libshell" "true")
endif()

if (CONFIG_ENABLE_CHIP_CONTROLLER_BUILD)
chip_gn_arg_append("chip_build_controller" "true")
endif()

if (CONFIG_ENABLE_WIFI_STATION OR CONFIG_ENABLE_WIFI_AP)
chip_gn_arg_append("chip_enable_wifi" "true")
else()
Expand Down
6 changes: 6 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ menu "CHIP Core"
help
Link the application against CHIP interactive shell.

config ENABLE_CHIP_CONTROLLER_BUILD
bool "Enable chip-controller build"
default n
help
This option enables chip-controller building.

config DISABLE_IPV4
bool "Disable IPv4 functionality in the CHIP stack"
default "n"
Expand Down
3 changes: 2 additions & 1 deletion src/app/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
mSubscriptionResumptionStorage = initParams.subscriptionResumptionStorage;
mOperationalKeystore = initParams.operationalKeystore;
mOpCertStore = initParams.opCertStore;
mSessionKeystore = initParams.sessionKeystore;

if (initParams.certificateValidityPolicy)
{
Expand Down Expand Up @@ -205,7 +206,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
SuccessOrExit(err);

err = mSessions.Init(&DeviceLayer::SystemLayer(), &mTransports, &mMessageCounterManager, mDeviceStorage, &GetFabricTable(),
*initParams.sessionKeystore);
*mSessionKeystore);
SuccessOrExit(err);

err = mFabricDelegate.Init(this);
Expand Down
11 changes: 6 additions & 5 deletions src/python_testing/matter_testing_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,14 +574,15 @@ def byte_string_from_hex(s: str) -> bytes:
return unhexlify(s.replace(":", "").replace(" ", "").replace("0x", ""))


def int_from_manual_code(s: str) -> int:
s = s.replace('-', '')
def str_from_manual_code(s: str) -> str:
"""Enforces legal format for manual codes and removes spaces/dashes."""
s = s.replace("-", "").replace(" ", "")
regex = r"^([0-9]{11}|[0-9]{21})$"
match = re.match(regex, s)
if not match:
raise ValueError("Invalid manual code format, does not match %s" % regex)

return int(s, 10)
return s


def int_named_arg(s: str) -> Tuple[str, int]:
Expand Down Expand Up @@ -701,7 +702,7 @@ def populate_commissioning_args(args: argparse.Namespace, config: MatterTestConf
# TODO: this should also allow multiple once QR and manual codes are supported.
config.qr_code_content = args.qr_code
if args.manual_code:
config.manual_code = "%d" % args.manual_code
config.manual_code = args.manual_code
else:
config.manual_code = None

Expand Down Expand Up @@ -885,7 +886,7 @@ def parse_matter_test_args(argv: List[str]) -> MatterTestConfig:

code_group.add_argument('-q', '--qr-code', type=str,
metavar="QR_CODE", help="QR setup code content (overrides passcode and discriminator)")
code_group.add_argument('--manual-code', type=int_from_manual_code,
code_group.add_argument('--manual-code', type=str_from_manual_code,
metavar="MANUAL_CODE", help="Manual setup code content (overrides passcode and discriminator)")

fabric_group = parser.add_argument_group(
Expand Down

0 comments on commit 5c5bbbb

Please sign in to comment.